summaryrefslogtreecommitdiff
path: root/lib/sbin/RunTestUtils.pl
diff options
context:
space:
mode:
authorgoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>2004-05-19 09:53:23 +0000
committergoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>2004-05-19 09:53:23 +0000
commit88bd58c546d70805d02a43d51a1640fb398aa5be (patch)
tree66b93f4b66f8e14189aeb6af6cd89841a27510c9 /lib/sbin/RunTestUtils.pl
parent0ead39f665ce2925e8818b5c1be319453abdb01e (diff)
Changed to using the cygwin version of Perl under cygwin. This has
the translation of CCTK_HOME to a windows format from the master Makefile, and forced the addition of a new Make macro TRANSLATE_DIRS which is used in various places in Make to translate things like /cygwin/f/... into f:\... This is a 'call'able macro in Make, and defaults to $(1). There is a new subroutine in RunTestUtils which serves the same purpose. This change should not affect anyone not using Cactus on Windows. If you are using Windows you will need to reconfigure, making sure that the Perl you use is the cygwin one and not the ActiveState one. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3742 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/RunTestUtils.pl')
-rw-r--r--lib/sbin/RunTestUtils.pl17
1 files changed, 14 insertions, 3 deletions
diff --git a/lib/sbin/RunTestUtils.pl b/lib/sbin/RunTestUtils.pl
index 9ab11ff6..af51f9bb 100644
--- a/lib/sbin/RunTestUtils.pl
+++ b/lib/sbin/RunTestUtils.pl
@@ -843,7 +843,7 @@ sub RunTest
my ($test_dir,$config);
my ($retcode);
- $arrangement = $testdata->{"$thorn ARRANGEMENT"};
+ my $arrangement = $testdata->{"$thorn ARRANGEMENT"};
$testdata->{"$thorn $test TESTRUNDIR"} = $config_data->{"TESTS_DIR"}.$sep.$config_data->{"CONFIG"}.$sep.$thorn;
@@ -852,7 +852,7 @@ sub RunTest
# Make any necessary directories
&MakeTestRunDir($testdata->{"$thorn $test TESTRUNDIR"});
- $parfile = $test.".par";
+ my $parfile = TransformDirs($testdata->{"$thorn TESTSDIR"}. "/" . $test . ".par");
# Clean the output directory for this test
&CleanDir($testdata->{"$thorn $test TESTOUTPUTDIR"});
@@ -860,7 +860,8 @@ sub RunTest
# Run the test from the test thorn directory
chdir ($testdata->{"$thorn $test TESTRUNDIR"}) ;
- $cmd = "$config_data->{\"COMMAND\"} $config_data->{\"EXE\"} $testdata->{\"$thorn TESTSDIR\"}${sep}$parfile";
+
+ $cmd = "$config_data->{\"COMMAND\"} $config_data->{\"EXE\"} $parfile";
$retcode = &RunCactus($output,$test,$cmd);
chdir $config_data->{"CCTK_DIR"};
@@ -1461,4 +1462,14 @@ sub ViewResults
}
+sub TransformDirs
+{
+ my ($in) = @_;
+
+ $in =~ s,^/cygdrive/(.)/,\1:/,;
+ $in =~ s,^//(.)/,\1:/,;
+
+ return $in;
+}
+
1;