Author: jhorwitz
Date: Sun Jul 29 12:39:08 2007
New Revision: 232
Modified:
mod_parrot/trunk/Configure.pl
mod_parrot/trunk/t/00nci.t
Log:
use parrot_build_dir instead of path to find the parrot executable
Modified: mod_parrot/trunk/Configure.pl
==============================================================================
--- mod_parrot/trunk/Configure.pl (original)
+++ mod_parrot/trunk/Configure.pl Sun Jul 29 12:39:08 2007
@@ -119,6 +119,7 @@
package main;
use Apache::TestMM;
push(@ARGV, '-apxs', $apxs);
+ push(@ARGV, '-defines', "PARROT_BUILD_DIR=$parrot_build_dir");
Apache::TestMM::filter_args();
ModParrot::TestRun->generate_script();
print "done.\n";
Modified: mod_parrot/trunk/t/00nci.t
==============================================================================
--- mod_parrot/trunk/t/00nci.t (original)
+++ mod_parrot/trunk/t/00nci.t Sun Jul 29 12:39:08 2007
@@ -9,18 +9,30 @@
plan tests => scalar @sigs + 1;
# test parrot path
-if (system("parrot -V")) {
- print "Bail Out! Couldn't find parrot executable in path";
+# WOW, what a kludge. We load Apache::Test to find the parrot build directory,
+# but since this will conflict with Test::More, we do it in a closure using
+# require.
+my $parrot_build_dir;
+my $defines;
+{
+ require Apache::Test;
+ $defines = Apache::Test::vars('defines');
+}
+if (defined($defines) && $defines =~ /PARROT_BUILD_DIR=(.+)/) {
+ $parrot_build_dir = $1;
+}
+if (!defined($parrot_build_dir) || system("$parrot_build_dir/parrot -V")) {
+ print "Bail Out! Parrot executable not found";
exit(0);
}
-pass("find parrot executable in path");
+pass("find parrot executable");
# test each signature
my @bad;
my $nci_sig_test = File::Spec->catfile(qw(t src nci_sig_test.pir));
foreach my $sig (@sigs) {
$sig =~ s/\s//g;
- if (system('parrot', $nci_sig_test, $sig)) {
+ if (system("$parrot_build_dir/parrot", $nci_sig_test, $sig)) {
push(@bad, $sig);
fail($sig);
}
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.