Permalink
Browse files

Make the tests run on Windows

  The tests still hang, but at least they start running.
  • Loading branch information...
1 parent a174473 commit 8fecb9cad3351d202bbf71982fafe76f55e00c3f @madsen madsen committed Jun 18, 2012
Showing with 21 additions and 2 deletions.
  1. +1 −0 MANIFEST
  2. +2 −2 Makefile.PL
  3. +1 −0 t/ack-g.t
  4. +17 −0 t/runtests.pl
View
@@ -88,6 +88,7 @@ t/pod.t
t/process-substitution.t
t/r-lang-ext.t
t/resource-iterator.t
+t/runtests.pl
t/zero.t
t/home/.ackrc
View
@@ -119,10 +119,10 @@ bininst : $(ACK)
test: test_classic test_standalone
test_classic: all
- ACK_TEST_STANDALONE=0 PERL_DL_NONLAZY=1 $(FULLPERLRUN) "-MExtUtils::Command::MM" "-e" "test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')" $(TEST_FILES)
+ $(FULLPERLRUN) t/runtests.pl 0 $(TEST_VERBOSE) "$(INST_LIB)" "$(INST_ARCHLIB)" $(TEST_FILES)
test_standalone: all $(ACK_STANDALONE)
- ACK_TEST_STANDALONE=1 PERL_DL_NONLAZY=1 $(FULLPERLRUN) "-MExtUtils::Command::MM" "-e" "test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')" $(TEST_FILES)
+ $(FULLPERLRUN) t/runtests.pl 1 $(TEST_VERBOSE) "$(INST_LIB)" "$(INST_ARCHLIB)" $(TEST_FILES)
MAKE_FRAG
View
@@ -80,6 +80,7 @@ subtest 'Front anchor' => sub {
subtest 'Back anchor' => sub {
my @expected = qw(
+ t/runtests.pl
t/swamp/options.pl
t/swamp/perl.pl
);
View
@@ -0,0 +1,17 @@
+#! /usr/bin/perl
+#---------------------------------------------------------------------
+# Run tests for ack
+#
+# Windows makes it hard to temporarily set environment variables, and
+# has horrible quoting rules, so what should be a one-liner gets its
+# own script.
+#---------------------------------------------------------------------
+
+use ExtUtils::Command::MM;
+
+$ENV{PERL_DL_NONLAZY} = 1;
+$ENV{ACK_TEST_STANDALONE} = shift;
+
+printf("Running tests on %s\n",
+ $ENV{ACK_TEST_STANDALONE} ? 'ack-standalone' : 'blib/script/ack');
+test_harness(shift, shift, shift);

0 comments on commit 8fecb9c

Please sign in to comment.