From bdbae7d46b1ce67f6cfb387b9532c1834f977b8c Mon Sep 17 00:00:00 2001 From: Bartosz Sosnowski Date: Wed, 4 Oct 2017 09:29:19 +0200 Subject: [PATCH] test: keep platform_output as first test When sorting tests, keeps platform_output as the first test. PR-URL: https://github.com/libuv/libuv/pull/1584 Reviewed-By: Colin Ihrig Reviewed-By: Ben Noordhuis Reviewed-By: Santiago Gimeno --- test/runner.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/runner.c b/test/runner.c index 5e4411877..b766097ce 100644 --- a/test/runner.c +++ b/test/runner.c @@ -81,6 +81,7 @@ int run_tests(int benchmark_output) { int skipped; int current; int test_result; + int skip; task_entry_t* task; /* Count the number of tests. */ @@ -92,7 +93,9 @@ int run_tests(int benchmark_output) { } } - qsort(TASKS, actual, sizeof(TASKS[0]), compare_task); + /* Keep platform_output first. */ + skip = (actual > 0 && 0 == strcmp(TASKS[0].task_name, "platform_output")); + qsort(TASKS + skip, actual - skip, sizeof(TASKS[0]), compare_task); fprintf(stderr, "1..%d\n", total); fflush(stderr);