X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2Fautovivification.git;a=blobdiff_plain;f=t%2F51-threads-teardown.t;h=4ff53452e15023ebd1e94bf8a9b14b06b4463deb;hp=dc55d2ac93555dfbb76b7f3b02b4b3490ef6903a;hb=e2cf50a4ad234e0ab9844ac0cb45f2a363abe217;hpb=7839df4d069fb2962a189f08bf7c92ff63d261fa diff --git a/t/51-threads-teardown.t b/t/51-threads-teardown.t index dc55d2a..4ff5345 100644 --- a/t/51-threads-teardown.t +++ b/t/51-threads-teardown.t @@ -4,8 +4,10 @@ use strict; use warnings; use lib 't/lib'; -use VPIT::TestHelpers; -use autovivification::TestThreads; +use VPIT::TestHelpers ( + threads => [ 'autovivification' => 'autovivification::A_THREADSAFE()' ], + 'run_perl', +); use Test::Leaner tests => 2; @@ -25,10 +27,12 @@ SKIP: ? 0 : 4; exit $code; RUN - is $status, 0, 'loading the pragma in a thread and using it outside doesn\'t segfault'; + skip RUN_PERL_FAILED() => 1 unless defined $status; + is $status, 0, + 'loading the pragma in a thread and using it outside doesn\'t segfault'; } -{ +SKIP: { my $status = run_perl <<' RUN'; use threads; BEGIN { require autovivification; } @@ -43,5 +47,6 @@ SKIP: })->join; exit $code; RUN + skip RUN_PERL_FAILED() => 1 unless defined $status; is $status, 0, 'autovivification can be loaded in eval STRING during global destruction at the end of a thread'; }