Commits

fperrad_ committed 92b8e34

refactor spectest with TAP/Harness.pbc (instead of Perl5 prove)

  • Participants
  • Parent commits c79f488

Comments (0)

Files changed (1)

     .param pmc kv :slurpy :named
     run_step('build', kv :flat :named)
 
-    .local string cmd
-    cmd = 'prove --exec=ruby t/test.rb'
-    system(cmd, 1 :named('verbose'))
+    load_bytecode 'TAP/Harness.pbc'
+    .local pmc opts, files, harness, aggregate
+    opts = new 'Hash'
+    opts['exec'] = 'ruby'
+    files = split ' ', 't/test.rb'
+    harness = new ['TAP';'Harness']
+    harness.'process_args'(opts)
+    aggregate = harness.'runtests'(files)
+    $I0 = aggregate.'has_errors'()
+    unless $I0 goto L1
+    die "test fails"
+  L1:
 .end
 
 # Local Variables: