tests: Clean up interactive test build

The build for interactive tests creates symbolic links for the data
under tests/data; it also uses symbolic links for creating "binaries"
for each interactive test. This is less than ideal, though.

Instead, the tests should build a path to the data files by using
a pre-processor define like TESTS_DATADIR; both g_build_filename() and
pre-processor string concatenation can be used to generate a valid
file name with the full path to the files.

The build system should also create wrapper scripts, just like we
do inside the conformance test suite, to be able to launch single
tests.
This commit is contained in:
Emmanuele Bassi
2009-11-05 17:30:33 +00:00
parent c3368c0d15
commit 0b4899ef23
27 changed files with 256 additions and 158 deletions

View File

@ -136,6 +136,7 @@ test_script_main (int argc, char *argv[])
{
GObject *stage, *blue_button, *red_button;
GError *error = NULL;
gchar *file;
gint res;
clutter_init (&argc, &argv);
@ -152,17 +153,21 @@ test_script_main (int argc, char *argv[])
g_object_unref (script);
return EXIT_FAILURE;
}
clutter_script_load_from_file (script, "test-script.json", &error);
file = g_build_filename (TESTS_DATADIR, "test-script.json", NULL);
clutter_script_load_from_file (script, file, &error);
if (error)
{
g_print ("*** Error:\n"
"*** %s\n", error->message);
g_error_free (error);
g_object_unref (script);
g_free (file);
return EXIT_FAILURE;
}
g_free (file);
merge_id = clutter_script_load_from_data (script, test_unmerge, -1, &error);
if (error)
{