]> git.vpit.fr Git - perl/modules/autovivification.git/blobdiff - t/51-threads-teardown.t
Update VPIT::TestHelpers to 2a6ac0f1
[perl/modules/autovivification.git] / t / 51-threads-teardown.t
index dc55d2ac93555dfbb76b7f3b02b4b3490ef6903a..4ff53452e15023ebd1e94bf8a9b14b06b4463deb 100644 (file)
@@ -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';
 }