Commit 0b10da80 authored by Richard Levitte's avatar Richard Levitte
Browse files

testutil: Fix non-standard subtest output



In some cases, testutil outputs subtests like this:

    1..6 # Subtest: progname

The standard set by Test::More (because there really is no actual
standard yet) gives this display:

    # Subtest: progname
    1..6

Until the standard is actually agreed upon, let's do it like
Test::More.

Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3446)
parent 46fcbf77
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -134,14 +134,14 @@ int run_tests(const char *test_prog_name)
    char *verdict = NULL;
    int i, j;

    if (num_tests < 1)
    if (num_tests < 1) {
        test_printf_stdout("%*s1..0 # Skipped: %s\n", level, "",
                           test_prog_name);
    else if (level > 0)
        test_printf_stdout("%*s1..%d # Subtest: %s\n", level, "", num_tests,
                           test_prog_name);
    else
    } else {
        if (level > 0)
            test_printf_stdout("%*s# Subtest: %s\n", level, "", test_prog_name);
        test_printf_stdout("%*s1..%d\n", level, "", num_tests);
    }
    test_flush_stdout();

    for (i = 0; i != num_tests; ++i) {