Author: colink
Date: Tue Oct 2 09:45:49 2007
New Revision: 21748
Modified:
branches/unified_testing/tools/util/runtests
Log:
[unified testing] use FindBin for parrot location detection
Modified: branches/unified_testing/tools/util/runtests
==============================================================================
--- branches/unified_testing/tools/util/runtests (original)
+++ branches/unified_testing/tools/util/runtests Tue Oct 2 09:45:49 2007
@@ -8,11 +8,12 @@
use Cwd;
use File::Spec;
+use FindBin;
-my $currentDir = getcwd();
-my @path_parts = File::Spec->splitdir( $currentDir );
-my $current_directory = pop @path_parts;
-my $parent_directory = pop @path_parts;
+my $parrotDir = File::Spec->catdir( $FindBin::Bin, (File::Spec->updir) x 2 );
+$parrotDir = Cwd::realpath($parrotDir);
+
+my $parrot = File::Spec->catfile($parrotDir, 'parrot');
my $prove = App::Prove->new;
unshift @ARGV, qw(--harness Parrot::TAP::Harness);
@@ -42,8 +43,7 @@
);
if ($options{RT1}) {
- warn "Your parent directory is : ".$parent_directory."\n";
- die "Your working directory is: ".$current_directory."\n";
+ die "Your parrot directory is: ".$parrotDir."\n";
}
$prove->{argv} = [EMAIL PROTECTED];