aboutsummaryrefslogtreecommitdiff
path: root/tools/build
diff options
context:
space:
mode:
authortyil <p.spek@tyil.nl>2019-12-05 23:50:26 +0000
committertyil <p.spek@tyil.nl>2019-12-05 23:50:26 +0000
commitbb0f25ff2bf207a8c478559f0b6fa572b3cd6514 (patch)
tree949a27f98ebbbc7b3c15c2d41aae7cab3b0fe94d /tools/build
parent0bd6af6b9ccb4760dc8ac57ed25084ab36668aa8 (diff)
parent6e8c904bbf0ad34b21e645897490de5ebc405d2a (diff)
Merge branch '2019.11-rc1' into 'master'
Rakudo Star 2019.11 See merge request tyil/rakudo-star!2
Diffstat (limited to 'tools/build')
-rw-r--r--tools/build/Makefile.in6
-rw-r--r--tools/build/module-install.pl12
-rw-r--r--tools/build/modules-test.pl49
3 files changed, 49 insertions, 18 deletions
diff --git a/tools/build/Makefile.in b/tools/build/Makefile.in
index 59f9480..5ce58e2 100644
--- a/tools/build/Makefile.in
+++ b/tools/build/Makefile.in
@@ -3,7 +3,7 @@
MOAR_DIR = moarvm
NQP_DIR = nqp
RAKUDO_DIR = rakudo
-STAR_VERSION = 2019.07
+STAR_VERSION = 2019.11
# install location
PREFIX_DIR = @prefix@
@@ -67,12 +67,12 @@ modules-install-m: rakudo-install
modules-test: @backend_modules_test@
verbose-modules-test: @backend_modules_test@
-modules-test-j: modules-install-j
+modules-test-j:
$(PERL) tools/build/modules-test.pl $(CURDIR) $(DESTDIR)$(PERL6_J_INSTALL) $(MODULES)
verbose-modules-test-j: modules-install-j
$(PERL) tools/build/modules-test.pl --verbose $(CURDIR) $(DESTDIR)$(PERL6_J_INSTALL) $(MODULES)
-modules-test-m: modules-install-m
+modules-test-m:
$(PERL) tools/build/modules-test.pl $(CURDIR) $(DESTDIR)$(PERL6_M_INSTALL) $(MODULES)
verbose-modules-test-m: modules-install-m
$(PERL) tools/build/modules-test.pl --verbose $(CURDIR) $(DESTDIR)$(PERL6_M_INSTALL) $(MODULES)
diff --git a/tools/build/module-install.pl b/tools/build/module-install.pl
index af6845f..eadb99e 100644
--- a/tools/build/module-install.pl
+++ b/tools/build/module-install.pl
@@ -17,9 +17,15 @@ while (<>) {
# Create the command list
my @cmd = (
- $perl6bin, $zefbin,
- '--/build-depends', '--/test-depends', '--/depends',
- '--force', 'install', "./modules$path_sep$module"
+ $perl6bin,
+ $zefbin,
+ '--/build-depends',
+ '--/depends',
+ '--/test',
+ '--/test-depends',
+ '--force',
+ 'install',
+ "./modules$path_sep$module"
);
# Show the command that's going to be ran, for debugging purposes
diff --git a/tools/build/modules-test.pl b/tools/build/modules-test.pl
index 396f066..3d70fcf 100644
--- a/tools/build/modules-test.pl
+++ b/tools/build/modules-test.pl
@@ -1,5 +1,8 @@
#! perl
+use warnings;
+use strict;
+
use Cwd;
use Getopt::Long;
@@ -9,17 +12,39 @@ my $base = shift @ARGV;
my $perl6 = shift @ARGV;
while (<>) {
- next if /^\s*(#|$)/;
- my ($moduledir) = /(\S+)/;
- print "Testing modules/$moduledir with $perl6...\n";
- if (-d "$base/modules/$moduledir/t") {
- chdir("$base/modules/$moduledir");
- system('prove', $verbose ? '-v' : (), '-e', $perl6, '-r', 't');
- }
- else {
- print "...no t/ directory found.\n";
- }
- print "\n";
+ # Skip comments
+ next if /^\s*(#|$)/;
+
+ # Extract only the module name from the current line
+ my ($moduledir) = /(\S+)/;
+
+ # Run the tests through prove
+ if (-d "$base/modules/$moduledir/t") {
+ chdir("$base/modules/$moduledir");
+
+ my @cmd = (
+ 'prove',
+ $verbose ? '-v' : (),
+ '-e', $perl6,
+ '-r',
+ 't',
+ );
+
+ # Show the command that's going to be ran, for debugging purposes
+ print "[" . getcwd . "] @cmd\n";
+
+ # Actually run the command
+ my $exit = system "@cmd";
+
+ # Exit early if any errors occurred
+ exit 1 if $exit;
+ }
+ else {
+ print "...no t/ directory found.\n";
+ }
+
+ print "\n";
}
-0;
+# If we reach this, no errors have been found
+exit 0;