mirror of https://github.com/perkeep/perkeep.git
build: run tests in cmd directories with gotest, not Make
Change-Id: Ib56ce9c243418f2a5925f3e6b5b3677fa466d7b9
This commit is contained in:
parent
443cfd5268
commit
c4f72cf2da
9
build.pl
9
build.pl
|
@ -147,6 +147,7 @@ if (@matches > 1) {
|
|||
}
|
||||
|
||||
build($matches[0]);
|
||||
test($matches[0]);
|
||||
|
||||
sub v {
|
||||
return unless $opt_verbose;
|
||||
|
@ -278,13 +279,17 @@ sub test {
|
|||
my @test_files = grep { /_test\.go$/ } readdir($dh);
|
||||
closedir($dh);
|
||||
if (@test_files) {
|
||||
if ($target =~ m!\blib/go\b!) {
|
||||
my @quiet = ("--silent");
|
||||
@quiet = () if $opt_verbose;
|
||||
if (system("make", @quiet, "-C", dir($target), "test") != 0) {
|
||||
use Data::Dumper;
|
||||
print Dumper($t);
|
||||
die "Tests failed for $target\n";
|
||||
}
|
||||
} else {
|
||||
if (system("cd $target && gotest") != 0) {
|
||||
die "gtest failed for $target\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue