You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Daniel Shahaf <d....@daniel.shahaf.name> on 2020/01/17 18:00:54 UTC
Re: svn commit: r1872919 -
/subversion/trunk/subversion/tests/libsvn_subr/mergeinfo-test.c
julianfoad@apache.org wrote on Fri, Jan 17, 2020 at 14:54:46 -0000:
> @@ -2089,18 +2130,22 @@ test_rangelist_merge_random_canonical_in
> + if (failure_mode)
> {
> - printf("testcase FAIL: %s / %s\n",
> + printf("first example of a failure mode: %s / %s\n"
> + " %s\n",
> rangelist_to_string(rlx, iterpool),
> + rangelist_to_string(rly, iterpool),
> + failure_mode);
Test programs aren't supposed to print arbitrary stuff to stdout.
Specifically, the interface between run_tests.py and the test programs
specifies¹ that test programs shall only print "PASS:" and "FAIL:" lines by
default. We could of course extend that to support printing of new info, for
example, as "INFO:" lines. So would it make sense to prepend "INFO:" to that
line?
Cheers,
Daniel
¹ Citation: subversion/tests/README:34
Re: svn commit: r1872919 -
/subversion/trunk/subversion/tests/libsvn_subr/mergeinfo-test.c
Posted by Julian Foad <ju...@apache.org>.
Daniel Shahaf wrote:
> julianfoad@apache.org wrote on Fri, Jan 17, 2020 at 14:54:46 -0000:
>> @@ -2089,18 +2130,22 @@ test_rangelist_merge_random_canonical_in
>> + if (failure_mode)
>> {
>> - printf("testcase FAIL: %s / %s\n",
>> + printf("first example of a failure mode: %s / %s\n"
[...]
> Test programs aren't supposed to print arbitrary stuff to stdout.
>
> Specifically, the interface between run_tests.py and the test programs
> specifies¹ that test programs shall only print "PASS:" and "FAIL:" lines by
> default. ¹ Citation: subversion/tests/README:34
Thanks for querying this, and for pinging me as I'd forgotten to get
back to it.
That README does not say "only" or "by default"; it says "Upon finishing
a test, the program reports the results in [this] format [...]".
Many tests print non-prefixed informative lines before the
PASS/FAIL/XPASS/XFAIL/SKIP line when they XFAIL, and a few tests do when
they pass.
This test is in line with existing tests: it prints these diagnostics
only when it XFAILs.
> We could of course extend that to support printing of new info, for
> example, as "INFO:" lines. So would it make sense to prepend "INFO:" to that
> line?
This sounds like a reasonable wish for general improvement of the test
suite.
- Julian
Re: svn commit: r1872919 -
/subversion/trunk/subversion/tests/libsvn_subr/mergeinfo-test.c
Posted by Branko Čibej <br...@apache.org>.
On 17.01.2020 19:00, Daniel Shahaf wrote:
> julianfoad@apache.org wrote on Fri, Jan 17, 2020 at 14:54:46 -0000:
>> @@ -2089,18 +2130,22 @@ test_rangelist_merge_random_canonical_in
>> + if (failure_mode)
>> {
>> - printf("testcase FAIL: %s / %s\n",
>> + printf("first example of a failure mode: %s / %s\n"
>> + " %s\n",
>> rangelist_to_string(rlx, iterpool),
>> + rangelist_to_string(rly, iterpool),
>> + failure_mode);
> Test programs aren't supposed to print arbitrary stuff to stdout.
>
> Specifically, the interface between run_tests.py and the test programs
> specifies¹ that test programs shall only print "PASS:" and "FAIL:" lines by
> default. We could of course extend that to support printing of new info, for
> example, as "INFO:" lines. So would it make sense to prepend "INFO:" to that
> line?
We have test debugging with DBG: as the prefix.
-- Brane