Skip to content

Commit

Permalink
[test] improve gc stress test
Browse files Browse the repository at this point in the history
use pir not pasm,
print cmdline when failing
  • Loading branch information
Reini Urban committed Nov 6, 2014
1 parent 49cd2df commit 2d74c3e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/Parrot/Test.pm
Expand Up @@ -835,7 +835,7 @@ sub _generate_test_functions {
}
else {
$builder->ok(0, $desc);
$builder->diag( "Exited with error code: $exit_code, expected: $expected\n"
$builder->diag( "$cmd\nExited with error code: $exit_code, expected: $expected\n"
. "STDOUT:\n$real_output\n"
);
return 0;
Expand All @@ -848,7 +848,7 @@ sub _generate_test_functions {
}
elsif ($exit_code) {
$builder->ok( 0, $desc );
$builder->diag( "Exited with error code: $exit_code\n"
$builder->diag( "$cmd\nExited with error code: $exit_code\n"
. "Received:\n$real_output\nExpected:\n$expected\n"
. $ori_output ne $real_output ? "$ori_output\n" : "");
return 0;
Expand Down
7 changes: 4 additions & 3 deletions t/stress/gc.t
Expand Up @@ -31,11 +31,12 @@ for my $gc (@gc, '--no-gc') {
my $gc_arg = $gc eq '--no-gc' ? $gc : "--gc $gc";
local $ENV{TEST_PROG_ARGS} = "-t $gc_arg --gc-debug --gc-nursery-size=0.0001 ";

pasm_exit_code_is( <<'CODE', 0, "arraystress $gc_arg" );
pir_exit_code_is( <<'CODE', 0, "arraystress $gc_arg" );
.sub 'main' :main
print "starting\n"
new P0, 'Integer'
$P0 = new ['Integer']
print "ending\n"
end
.end
CODE

pir_exit_code_is( <<'CODE', 0, "ResizablePMCArray stress $gc_arg" );
Expand Down

0 comments on commit 2d74c3e

Please sign in to comment.