]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Apply recent changs in libarvhie/test/main.c to {tar,cpio,cat}/test/main.c for keepin...
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Sun, 29 Jun 2014 05:28:04 +0000 (14:28 +0900)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Sun, 29 Jun 2014 05:28:04 +0000 (14:28 +0900)
cat/test/main.c
cpio/test/main.c
tar/test/main.c

index f3cec3d7aef552cd6ebe98102773537274e8cbee..d96a64a286d7c8096b87c11d60014cacc68555d7 100644 (file)
@@ -2253,7 +2253,7 @@ struct test_list_t tests[] = {
  * Summarize repeated failures in the just-completed test.
  */
 static void
-test_summarize(int failed)
+test_summarize(int failed, int skips_num)
 {
        unsigned int i;
 
@@ -2263,7 +2263,7 @@ test_summarize(int failed)
                fflush(stdout);
                break;
        case VERBOSITY_PASSFAIL:
-               printf(failed ? "FAIL\n" : "ok\n");
+               printf(failed ? "FAIL\n" : skips_num ? "ok (S)\n" : "ok\n");
                break;
        }
 
@@ -2288,6 +2288,7 @@ test_run(int i, const char *tmpdir)
        char workdir[1024];
        char logfilename[64];
        int failures_before = failures;
+       int skips_before = skips;
        int oldumask;
 
        switch (verbosity) {
@@ -2344,7 +2345,7 @@ test_run(int i, const char *tmpdir)
        }
        /* Report per-test summaries. */
        tests[i].failures = failures - failures_before;
-       test_summarize(tests[i].failures);
+       test_summarize(tests[i].failures, skips - skips_before);
        /* Close the per-test log file. */
        fclose(logfile);
        logfile = NULL;
index f83661637d79d78989801daf4fc072edb361c86f..92f216333630c3035c2fa1f9ef9547e8603eeecc 100644 (file)
@@ -2253,7 +2253,7 @@ struct test_list_t tests[] = {
  * Summarize repeated failures in the just-completed test.
  */
 static void
-test_summarize(int failed)
+test_summarize(int failed, int skips_num)
 {
        unsigned int i;
 
@@ -2263,7 +2263,7 @@ test_summarize(int failed)
                fflush(stdout);
                break;
        case VERBOSITY_PASSFAIL:
-               printf(failed ? "FAIL\n" : "ok\n");
+               printf(failed ? "FAIL\n" : skips_num ? "ok (S)\n" : "ok\n");
                break;
        }
 
@@ -2288,6 +2288,7 @@ test_run(int i, const char *tmpdir)
        char workdir[1024];
        char logfilename[64];
        int failures_before = failures;
+       int skips_before = skips;
        int oldumask;
 
        switch (verbosity) {
@@ -2344,7 +2345,7 @@ test_run(int i, const char *tmpdir)
        }
        /* Report per-test summaries. */
        tests[i].failures = failures - failures_before;
-       test_summarize(tests[i].failures);
+       test_summarize(tests[i].failures, skips - skips_before);
        /* Close the per-test log file. */
        fclose(logfile);
        logfile = NULL;
index b92ef2c7d3b1e845b814dabf4eac33f490121d14..9efdf51f96549e0268aed9a9e50db4d436ef0413 100644 (file)
@@ -2254,7 +2254,7 @@ struct test_list_t tests[] = {
  * Summarize repeated failures in the just-completed test.
  */
 static void
-test_summarize(int failed)
+test_summarize(int failed, int skips_num)
 {
        unsigned int i;
 
@@ -2264,7 +2264,7 @@ test_summarize(int failed)
                fflush(stdout);
                break;
        case VERBOSITY_PASSFAIL:
-               printf(failed ? "FAIL\n" : "ok\n");
+               printf(failed ? "FAIL\n" : skips_num ? "ok (S)\n" : "ok\n");
                break;
        }
 
@@ -2289,6 +2289,7 @@ test_run(int i, const char *tmpdir)
        char workdir[1024];
        char logfilename[64];
        int failures_before = failures;
+       int skips_before = skips;
        int oldumask;
 
        switch (verbosity) {
@@ -2345,7 +2346,7 @@ test_run(int i, const char *tmpdir)
        }
        /* Report per-test summaries. */
        tests[i].failures = failures - failures_before;
-       test_summarize(tests[i].failures);
+       test_summarize(tests[i].failures, skips - skips_before);
        /* Close the per-test log file. */
        fclose(logfile);
        logfile = NULL;