Commit 2e6cad94 authored by Dan Williams's avatar Dan Williams
Browse files

ifnet: simplify testcase

parent 5ff6ad26
......@@ -398,16 +398,28 @@ test_missing_config ()
"get connection should fail with 'Unknown config for eth8'");
}
static void
run_all (const char *testdir_path, const char *temp_path)
int
main (int argc, char **argv)
{
char *f;
g_type_init ();
f = g_build_filename (argv[1], "net", NULL);
ifnet_init (f);
g_free (f);
f = g_build_filename (argv[1], "wpa_supplicant.conf", NULL);
wpa_parser_init (f);
g_free (f);
test_strip_string ();
test_is_static ();
test_has_ip6_address ();
test_has_default_route ();
test_getdata ();
test_read_hostname (testdir_path);
test_write_hostname (temp_path);
test_read_hostname (argv[1]);
test_write_hostname (argv[2]);
test_is_ip4_address ();
test_is_ip6_address ();
test_convert_ipv4_config_block ();
......@@ -420,26 +432,12 @@ run_all (const char *testdir_path, const char *temp_path)
test_add_connection ();
test_delete_connection ();
test_missing_config ();
}
int
main (int argc, char **argv)
{
char *f;
g_type_init ();
f = g_build_filename (argv[1], "net", NULL);
ifnet_init (f);
g_free (f);
f = g_build_filename (argv[1], "wpa_supplicant.conf", NULL);
wpa_parser_init (f);
g_free (f);
run_all (argv[1], argv[2]);
ifnet_destroy ();
wpa_parser_destroy ();
f = g_path_get_basename (argv[0]);
fprintf (stdout, "%s: SUCCESS\n", f);
g_free (f);
return 0;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment