Skip to content

Commit

Permalink
Make the tests run on Windows
Browse files Browse the repository at this point in the history
  The tests still hang, but at least they start running.
  • Loading branch information
madsen committed Jul 2, 2012
1 parent a174473 commit 8fecb9c
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
1 change: 1 addition & 0 deletions MANIFEST
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Makefile.PL
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions t/ack-g.t
Expand Up @@ -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
);
Expand Down
17 changes: 17 additions & 0 deletions t/runtests.pl
@@ -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.