Shlomi Fish avatar Shlomi Fish committed defe8ee

Add "make runtest" and "make distruntest".

Comments (0)

Files changed (2)

     - In the process made "Encode" and perl-5.8.1. pre-requisites of this
     distribution.
 
+    - Add the "make runtest" and "make distruntest" targets to test using
+    Test-Run.
+
 1.73            Sun Oct  9 17:32:30 IST 2011
     - Possible fix for https://rt.cpan.org/Ticket/Display.html?id=71456 :
         - made the port reservation on t/14security.t for the non-existent
     print "yes\n";
     return 1;
 }
+
+sub MY::postamble {
+  return <<'MAKE_FRAG';
+
+runtest: pure_all
+	perl -MFile::Spec -MTest::Run::CmdLine::Iface -e \
+        "local @INC = @INC;	unshift @INC, map { File::Spec->rel2abs(\$$_) } ('$(INST_LIB)', '$(INST_ARCHLIB)'); Test::Run::CmdLine::Iface->new({test_files => [glob(q{t/*.t})]})->run();"
+
+distruntest: distdir
+	cd $(DISTVNAME) && $(ABSPERLRUN) Makefile.PL
+	cd $(DISTVNAME) && $(MAKE) $(PASTHRU)
+	cd $(DISTVNAME) && $(MAKE) runtest $(PASTHRU)
+
+MAKE_FRAG
+}
+
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.