Skip to content

Instantly share code, notes, and snippets.

@zoffixznet

zoffixznet/p6.p6 Secret

Created July 21, 2017 09:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zoffixznet/01f1c87b369681efb1f753c6712279ea to your computer and use it in GitHub Desktop.
Save zoffixznet/01f1c87b369681efb1f753c6712279ea to your computer and use it in GitHub Desktop.
zoffix@VirtualBox~/CPANPRC/rakudo (nom)$ PERL6_TEST_DIE_ON_FAIL=1 prove -e './perl6 -Ilib' -vlr bar.t
bar.t ..
1..2
not ok 1 -
# Failed test at bar.t line 1
# Test failed. Stopping test suite, because PERL6_TEST_DIE_ON_FAIL environmental variable is set to a true value.
["calling exit"]
Dubious, test returned 1 (wstat 256, 0x100)
Failed 2/2 subtests
Test Summary Report
-------------------
bar.t (Wstat: 256 Tests: 0 Failed: 0)
Non-zero exit status: 1
Parse errors: Bad plan. You planned 2 tests but ran 0.
Files=1, Tests=0, 1 wallclock secs ( 0.02 usr 0.00 sys + 0.16 cusr 0.02 csys = 0.20 CPU)
Result: FAIL
zoffix@VirtualBox~/CPANPRC/rakudo (nom)$ echo $?
1
zoffix@VirtualBox~/CPANPRC/rakudo (nom)$
sub die-on-fail {
if !$todo_reason && !$subtest_todo_reason && nqp::iseq_i($die_on_fail,1) {
_diag 'Test failed. Stopping test suite, because'
~ ' PERL6_TEST_DIE_ON_FAIL environmental variable is set'
~ ' to a true value.';
dd ['calling exit'];
exit 255;
dd ['wtf?'];
}
$todo_reason = '' if $todo_upto_test_num == $num_of_tests_run;
False;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment