aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpmichaud <pmichaud@pobox.com>2012-08-29 07:12:49 -0500
committerpmichaud <pmichaud@pobox.com>2012-08-29 07:12:49 -0500
commit900c0c422b951f3eefcda677b5fdcb2b2056f62e (patch)
tree551632437a31fdf6f0f160a8e4844c5e8f3a7282
parent7a5d72ceddfb7af387727b12363ecf33ecab7c1e (diff)
Add script to run module tests.
-rw-r--r--tools/build/modules-test.pl22
-rw-r--r--tools/star/Makefile3
2 files changed, 24 insertions, 1 deletions
diff --git a/tools/build/modules-test.pl b/tools/build/modules-test.pl
new file mode 100644
index 0000000..b469d6c
--- /dev/null
+++ b/tools/build/modules-test.pl
@@ -0,0 +1,22 @@
+#! perl
+
+use Cwd;
+
+my $base = shift @ARGV;
+my $perl6 = shift @ARGV;
+
+while (<>) {
+ next if /^\s*(#|$)/;
+ my ($moduledir) = /(\S+)/;
+ print "Testing modules/$moduledir...\n";
+ if (-d "$base/modules/$moduledir/t") {
+ chdir("$base/modules/$moduledir");
+ system('prove', '-e', $perl6, '-r', 't');
+ }
+ else {
+ print "...no t/ directory found.\n";
+ }
+ print "\n";
+}
+
+0;
diff --git a/tools/star/Makefile b/tools/star/Makefile
index 333bae4..f849825 100644
--- a/tools/star/Makefile
+++ b/tools/star/Makefile
@@ -55,7 +55,8 @@ manifest:
cut -d' ' -f1 parrot/MANIFEST | $(PREFIX) parrot/ >>MANIFEST
git submodule foreach --quiet 'git ls-files | $(PREFIX) $$path/' >>MANIFEST
grep -v -f tools/star/MANIFEST.exclude MANIFEST >MANIFEST.1
- sort -o MANIFEST MANIFEST.1
+ $(PERL) -n -e 'chomp; -f && print "$$_\n"' MANIFEST.1 >MANIFEST
+ sort -o MANIFEST MANIFEST
rm MANIFEST.1
tarball: manifest