Re: [PATCH v2] sparse: Reduce 'test-suite' run output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 30, 2011 at 12:24 PM, Pekka Enberg <penberg@xxxxxxxxxx> wrote:
> -
> -       echo "     TEST    $test_name ($file)"
> +       if test -t 1; then
> +               printf "\r     TEST    %-80s" "$file ($test_name)"
> +       else
> +               echo "     TEST    $test_name ($file)"
> +       fi

Can you test the terminal once and save the result to a local variable?
There is no need to run the test over and over again for every line of output.

>                if [ "$?" -ne "0" ]; then
> +                       echo ""

Please just echo. Empty argument is not necessary.
Also, shouldn't this wrap by "if terminial" test as well?
You are adding new lines for non terminal case.

>                        error "actual $stream text does not match expected $stream text."
>                        error  "see $file.$stream.* for further investigation."
>                        cat "$file".$stream.diff
> @@ -163,6 +167,7 @@ do_test_suite()
>
>        # prints some numbers
>        tests_nr=`expr $ok_tests + $ko_tests`
> +       echo ""

Same here.

Chris
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux