1 # Copyright (C) 2009, Jonathan "Duke" Leto <jonathan@leto.net>
3 .include 'lib/Tapir/Parser.pir'
4 .include 'lib/Tapir/Stream.pir'
8 $S0 = shift argv # get rid of harness.pir in the args list
12 .local pmc tapir, klass
13 klass = newclass [ 'Tapir'; 'Parser' ]
21 .local int total_files, failing_files
31 output = qx('parrot',file)
32 stream = tapir.'parse_tapstream'(output)
33 success = stream.'is_pass'()
34 unless success goto fail
36 $I0 = stream.'get_pass'()
42 $I0 = stream.'get_fail'()
45 $S1 = stream.'total'()
54 if failing_files goto print_fail
62 .param pmc command_and_args :slurpy
65 cmd = join ' ', command_and_args
69 unless pipe goto pipe_open_error
72 pipe.'encoding'('utf8')
73 output = pipe.'readall'()
76 .local pmc exit_status
77 $I0 = pipe.'exit_status'()
80 find_dynamic_lex $P0, '$!'
81 if null $P0 goto skip_exit_status
82 store_dynamic_lex '$!', exit_status
88 $S0 = 'Unable to execute "'
98 # vim: expandtab shiftwidth=4 ft=pir: