Commit a537e538 authored by Simon McVittie's avatar Simon McVittie

testing: Run tests specified with -p in the order specified

Closes: #1763Signed-off-by: Simon McVittie's avatarSimon McVittie <smcv@collabora.com>
parent 48cc3abe
......@@ -1242,6 +1242,11 @@ parse_args (gint *argc_p,
exit (0);
}
}
/* We've been prepending to test_paths, but its order matters, so
* permute it */
test_paths = g_slist_reverse (test_paths);
/* collapse argv */
e = 1;
for (i = 1; i < argc; i++)
......
......@@ -122,9 +122,9 @@ test_message (void)
(gchar*)argv0,
NULL,
"--GTestSubprocess",
"-p", "/glib/testing/protocol/debug",
"-p", "/glib/testing/protocol/message",
"-p", "/glib/testing/protocol/gtest-message",
"-p", "/glib/testing/protocol/message",
"-p", "/glib/testing/protocol/debug",
NULL
};
GTestLogBuffer* tlb;
......
......@@ -1163,12 +1163,10 @@ test_tap (void)
NULL, NULL, &output, NULL, &status,
&error);
g_assert_no_error (error);
/* FIXME: Tests are run in an order that is the reverse of the order
* of -p options. */
g_assert_nonnull (strstr (output, "\nok 1 /b/a\n"));
g_assert_nonnull (strstr (output, "\nok 2 /b/b\n"));
g_assert_nonnull (strstr (output, "\nok 3 /c/a\n"));
g_assert_nonnull (strstr (output, "\nok 4 /c/a\n"));
g_assert_nonnull (strstr (output, "\nok 1 /c/a\n"));
g_assert_nonnull (strstr (output, "\nok 2 /c/a\n"));
g_assert_nonnull (strstr (output, "\nok 3 /b/a\n"));
g_assert_nonnull (strstr (output, "\nok 4 /b/b\n"));
g_assert_nonnull (strstr (output, "\n1..4\n"));
g_spawn_check_exit_status (status, &error);
......
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