Skip to content

Commit

Permalink
Test depends also relied on the $*EXECUTABLE being altered
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanstowe committed Jul 19, 2015
1 parent a9407b4 commit 7df467b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/Panda/Bundler.pm
Expand Up @@ -82,7 +82,7 @@ method bundle($panda, :$notests, Str :$name, Str :$auth, Str :$ver, Str :$desc)

unless $notests {
$panda.announce('testing', $bone);
unless $_ = $panda.tester.test($dir) {
unless $_ = $panda.tester.test($dir, :deps) {
die X::Panda.new($bone.name, 'test', $_)
}
if %*ENV<PANDA_DEPTRACKER_FILE>.IO.e {
Expand Down
5 changes: 3 additions & 2 deletions lib/Panda/Tester.pm
@@ -1,7 +1,7 @@
class Panda::Tester {
use Panda::Common;

method test($where, :$bone, :$prove-command = $*DISTRO.name eq 'mswin32' ?? 'prove.bat' !! 'prove') {
method test($where, :$bone, :$prove-command = $*DISTRO.name eq 'mswin32' ?? 'prove.bat' !! 'prove', $deps) {
indir $where, {
my Bool $run-default = True;
if "Build.pm".IO.f {
Expand All @@ -21,7 +21,8 @@ method test($where, :$bone, :$prove-command = $*DISTRO.name eq 'mswin32' ?? 'pro
my $stdout = '';
my $stderr = '';

my $proc = Proc::Async.new($prove-command, '-e', "$*EXECUTABLE -Ilib", '-r', 't/');
my $p6command = $deps ?? "$*EXECUTABLE -MPanda::DepTracker" !! $*EXECUTABLE;
my $proc = Proc::Async.new($prove-command, '-e', "$p6command -Ilib", '-r', 't/');
$proc.stdout.tap(-> $chunk {
print $chunk;
$output ~= $chunk;
Expand Down

0 comments on commit 7df467b

Please sign in to comment.