Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
handle succeeded C++ compilation even better
  • Loading branch information
FROGGS committed Sep 14, 2015
1 parent 00bd81b commit 54ce37c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions t/04-nativecall/CompileTestLib.pm
Expand Up @@ -44,18 +44,19 @@ sub compile_cpp_test_lib($name) is export {
"clang++ -stdlib=libc++ --shared -fPIC -o $name.$so t/04-nativecall/$name.cpp",
}
my @fails;
my (@fails, $succeeded);
for @cmds -> $cmd {
my $handle = shell("$cmd 2>&1", :out);
my $output = $handle.out.slurp-rest;
if $handle.out.close.status {
@fails.push: "Running '$cmd':\n$output"
}
else {
$succeeded = 1;
last
}
}
fail @fails.join('=' x 80 ~ "\n") if @fails;
fail @fails.join('=' x 80 ~ "\n") unless $succeeded;
}
END {
Expand Down

0 comments on commit 54ce37c

Please sign in to comment.