From defac6623afe8b7d765a9477371fbc47da855c19 Mon Sep 17 00:00:00 2001 From: Martin Ebourne Date: Sat, 4 Mar 2006 01:33:46 +0000 Subject: This is part 1 of a patch from James O'Gorman. configure now detects perl executable location and updates all scripts to use the correct path; also adds PERL_EXECUTABLE define to BoxConfig.h. makebuildenv.pl adds PERL define to all makefiles. --- test/backupstorefix/testbackupstorefix.cpp | 16 ++++++++-------- test/backupstorefix/testfiles/testbackupstorefix.pl | 2 +- test/basicserver/Makefile.extra | 8 ++++---- test/bbackupd/testfiles/bbackupd.conf | 2 +- test/bbackupd/testfiles/extcheck1.pl | 2 +- test/bbackupd/testfiles/extcheck2.pl | 2 +- test/bbackupd/testfiles/notifyscript.pl | 2 +- 7 files changed, 17 insertions(+), 17 deletions(-) (limited to 'test') diff --git a/test/backupstorefix/testbackupstorefix.cpp b/test/backupstorefix/testbackupstorefix.cpp index c36bb8b8..92928cc6 100644 --- a/test/backupstorefix/testbackupstorefix.cpp +++ b/test/backupstorefix/testbackupstorefix.cpp @@ -312,7 +312,7 @@ int test(int argc, const char *argv[]) TEST_THAT(ServerIsAlive(pid)); // Run the perl script to create the initial directories - TEST_THAT_ABORTONFAIL(::system("perl testfiles/testbackupstorefix.pl init") == 0); + TEST_THAT_ABORTONFAIL(::system(PERL_EXECUTABLE " testfiles/testbackupstorefix.pl init") == 0); int bbackupd_pid = LaunchServer("../../bin/bbackupd/bbackupd testfiles/bbackupd.conf", "testfiles/bbackupd.pid"); TEST_THAT(bbackupd_pid != -1 && bbackupd_pid != 0); @@ -367,7 +367,7 @@ int test(int argc, const char *argv[]) // Fix it RUN_CHECK // Check everything is as it was - TEST_THAT(::system("perl testfiles/testbackupstorefix.pl check 0") == 0); + TEST_THAT(::system(PERL_EXECUTABLE " testfiles/testbackupstorefix.pl check 0") == 0); // Check the random file doesn't exist { TEST_THAT(!RaidFileRead::FileExists(discSetNum, storeRoot + "01/randomfile")); @@ -425,7 +425,7 @@ int test(int argc, const char *argv[]) // Fix it RUN_CHECK // Check - TEST_THAT(::system("perl testfiles/testbackupstorefix.pl check 1") == 0); + TEST_THAT(::system(PERL_EXECUTABLE " testfiles/testbackupstorefix.pl check 1") == 0); // Check the modified file doesn't exist TEST_THAT(!RaidFileRead::FileExists(discSetNum, fn)); @@ -471,7 +471,7 @@ int test(int argc, const char *argv[]) // Fix it RUN_CHECK // Check everything is as it should be - TEST_THAT(::system("perl testfiles/testbackupstorefix.pl check 2") == 0); + TEST_THAT(::system(PERL_EXECUTABLE " testfiles/testbackupstorefix.pl check 2") == 0); { BackupStoreDirectory dir; LoadDirectory("Test1/foreomizes/stemptinevidate/ict", dir); @@ -527,7 +527,7 @@ int test(int argc, const char *argv[]) // Fix it RUN_CHECK // Check everything is as it should be - TEST_THAT(::system("perl testfiles/testbackupstorefix.pl check 3") == 0); + TEST_THAT(::system(PERL_EXECUTABLE " testfiles/testbackupstorefix.pl check 3") == 0); { BackupStoreDirectory dir; LoadDirectory("Test1/foreomizes/stemptinevidate/ict", dir); @@ -541,7 +541,7 @@ int test(int argc, const char *argv[]) // Fix it RUN_CHECK // Check everything is where it is predicted to be - TEST_THAT(::system("perl testfiles/testbackupstorefix.pl check 4") == 0); + TEST_THAT(::system(PERL_EXECUTABLE " testfiles/testbackupstorefix.pl check 4") == 0); // ------------------------------------------------------------------------------------------------ ::printf(" === Corrupt file and dir\n"); @@ -552,7 +552,7 @@ int test(int argc, const char *argv[]) // Fix it RUN_CHECK // Check everything is where it should be - TEST_THAT(::system("perl testfiles/testbackupstorefix.pl check 5") == 0); + TEST_THAT(::system(PERL_EXECUTABLE " testfiles/testbackupstorefix.pl check 5") == 0); // ------------------------------------------------------------------------------------------------ ::printf(" === Overwrite root with a file\n"); @@ -566,7 +566,7 @@ int test(int argc, const char *argv[]) // Fix it RUN_CHECK // Check everything is where it should be - TEST_THAT(::system("perl testfiles/testbackupstorefix.pl reroot 6") == 0); + TEST_THAT(::system(PERL_EXECUTABLE " testfiles/testbackupstorefix.pl reroot 6") == 0); // ------------------------------------------------------------------------------------------------ diff --git a/test/backupstorefix/testfiles/testbackupstorefix.pl b/test/backupstorefix/testfiles/testbackupstorefix.pl index 99a4c041..b57f10ac 100755 --- a/test/backupstorefix/testfiles/testbackupstorefix.pl +++ b/test/backupstorefix/testfiles/testbackupstorefix.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!@PERL@ use strict; my @words = split /\s+/,<<__E; diff --git a/test/basicserver/Makefile.extra b/test/basicserver/Makefile.extra index 51280db9..3feda961 100644 --- a/test/basicserver/Makefile.extra +++ b/test/basicserver/Makefile.extra @@ -6,16 +6,16 @@ GEN_CMD_CLI = $(MAKEPROTOCOL) Client testprotocol.txt # AUTOGEN SEEDING autogen_TestProtocolServer.cpp: $(MAKEPROTOCOL) testprotocol.txt - perl $(GEN_CMD_SRV) + $(PERL) $(GEN_CMD_SRV) autogen_TestProtocolServer.h: $(MAKEPROTOCOL) testprotocol.txt - perl $(GEN_CMD_SRV) + $(PERL) $(GEN_CMD_SRV) # AUTOGEN SEEDING autogen_TestProtocolClient.cpp: $(MAKEPROTOCOL) testprotocol.txt - perl $(GEN_CMD_CLI) + $(PERL) $(GEN_CMD_CLI) autogen_TestProtocolClient.h: $(MAKEPROTOCOL) testprotocol.txt - perl $(GEN_CMD_CLI) + $(PERL) $(GEN_CMD_CLI) diff --git a/test/bbackupd/testfiles/bbackupd.conf b/test/bbackupd/testfiles/bbackupd.conf index c25b4eab..6d381d5b 100644 --- a/test/bbackupd/testfiles/bbackupd.conf +++ b/test/bbackupd/testfiles/bbackupd.conf @@ -23,7 +23,7 @@ ExtendedLogging = yes CommandSocket = testfiles/bbackupd.sock -NotifyScript = perl testfiles/notifyscript.pl +NotifyScript = @PERL@ testfiles/notifyscript.pl Server { diff --git a/test/bbackupd/testfiles/extcheck1.pl b/test/bbackupd/testfiles/extcheck1.pl index 7481593d..edbacd0a 100755 --- a/test/bbackupd/testfiles/extcheck1.pl +++ b/test/bbackupd/testfiles/extcheck1.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!@PERL@ use strict; unless(open IN,"../../bin/bbackupquery/bbackupquery -q -c testfiles/bbackupd.conf -l testfiles/query4.log \"compare -ac\" quit|") diff --git a/test/bbackupd/testfiles/extcheck2.pl b/test/bbackupd/testfiles/extcheck2.pl index a0c7d3cd..68baa045 100755 --- a/test/bbackupd/testfiles/extcheck2.pl +++ b/test/bbackupd/testfiles/extcheck2.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!@PERL@ use strict; unless(open IN,"../../bin/bbackupquery/bbackupquery -q -c testfiles/bbackupd.conf -l testfiles/query4.log \"compare -ac\" quit|") diff --git a/test/bbackupd/testfiles/notifyscript.pl b/test/bbackupd/testfiles/notifyscript.pl index a31d072e..df0e5a2d 100755 --- a/test/bbackupd/testfiles/notifyscript.pl +++ b/test/bbackupd/testfiles/notifyscript.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!@PERL@ my $f = 'testfiles/notifyran.'.$ARGV[0].'.'; -- cgit v1.2.3