diff options
Diffstat (limited to 'tests/scripts')
-rw-r--r-- | tests/scripts/features/errors | 24 | ||||
-rw-r--r-- | tests/scripts/features/parallelism | 2 | ||||
-rw-r--r-- | tests/scripts/functions/wildcard | 10 | ||||
-rw-r--r-- | tests/scripts/targets/FORCE | 11 | ||||
-rw-r--r-- | tests/scripts/targets/PHONY | 11 | ||||
-rw-r--r-- | tests/scripts/targets/SILENT | 11 |
6 files changed, 19 insertions, 50 deletions
diff --git a/tests/scripts/features/errors b/tests/scripts/features/errors index 253f50f..e372fe0 100644 --- a/tests/scripts/features/errors +++ b/tests/scripts/features/errors @@ -1,3 +1,5 @@ +# -*-perl-*- + $description = "The following tests the -i option and the '-' in front of \n" ."commands to test that make ignores errors in these commands\n" ."and continues processing."; @@ -14,11 +16,11 @@ $details = "This test runs two makes. The first runs on a target with a \n" if ($vos) { - $delete_command = "delete_file"; + $rm_command = "delete_file"; } else { - $delete_command = "rm"; + $rm_command = "rm"; } open(MAKEFILE,"> $makefile"); @@ -26,11 +28,11 @@ open(MAKEFILE,"> $makefile"); # The Contents of the MAKEFILE ... print MAKEFILE "clean:\n" - ."\t-$delete_command cleanit\n" - ."\t$delete_command foo\n" + ."\t-$rm_command cleanit\n" + ."\t$rm_command foo\n" ."clean2: \n" - ."\t$delete_command cleanit\n" - ."\t$delete_command foo\n"; + ."\t$rm_command cleanit\n" + ."\t$rm_command foo\n"; # END of Contents of MAKEFILE @@ -39,16 +41,16 @@ close(MAKEFILE); &touch("foo"); unlink("cleanit"); -$cleanit_error = `sh -c "$delete_command cleanit 2>&1"`; +$cleanit_error = `sh -c "$rm_command cleanit 2>&1"`; $delete_error_code = $? >> 8; # TEST #1 # ------- -$answer = "$delete_command cleanit\n" +$answer = "$rm_command cleanit\n" . $cleanit_error ."$make_name: [clean] Error $delete_error_code (ignored)\n" - ."$delete_command foo\n"; + ."$rm_command foo\n"; &run_make_with_options($makefile,"",&get_logfile); @@ -72,10 +74,10 @@ if (!$vos) # TEST #2 # ------- -$answer = "$delete_command cleanit\n" +$answer = "$rm_command cleanit\n" . $cleanit_error ."$make_name: [clean2] Error $delete_error_code (ignored)\n" - ."$delete_command foo\n"; + ."$rm_command foo\n"; &run_make_with_options($makefile,"clean2 -i",&get_logfile); diff --git a/tests/scripts/features/parallelism b/tests/scripts/features/parallelism index c75f436..6bde30f 100644 --- a/tests/scripts/features/parallelism +++ b/tests/scripts/features/parallelism @@ -18,11 +18,9 @@ if (!$parallel_jobs) { } if ($vos) { - $delete_command = "delete_file -no_ask"; $sleep_command = "sleep -seconds"; } else { - $delete_command = "rm -f"; $sleep_command = "sleep"; } diff --git a/tests/scripts/functions/wildcard b/tests/scripts/functions/wildcard index d7a50aa..d61384e 100644 --- a/tests/scripts/functions/wildcard +++ b/tests/scripts/functions/wildcard @@ -13,16 +13,6 @@ test echo's all files which match '?.example' and [a-z0-9].example. Lastly we clean up all of the files using the '*' wildcard as in the first test"; -if ($vos) -{ - $delete_command = "delete_file -no_ask"; -} -else -{ - $delete_command = "rm"; -} - - open(MAKEFILE,"> $makefile"); # The Contents of the MAKEFILE ... diff --git a/tests/scripts/targets/FORCE b/tests/scripts/targets/FORCE index befb326..eb8f251 100644 --- a/tests/scripts/targets/FORCE +++ b/tests/scripts/targets/FORCE @@ -1,16 +1,9 @@ +# -*-perl-*- + $description = "The following tests rules without Commands or Dependencies."; $details = "If the rule ...\n"; -if ($vos) -{ - $delete_command = "delete_file"; -} -else -{ - $delete_command = "rm"; -} - open(MAKEFILE,"> $makefile"); # The Contents of the MAKEFILE ... diff --git a/tests/scripts/targets/PHONY b/tests/scripts/targets/PHONY index dd46b3f..c8e2110 100644 --- a/tests/scripts/targets/PHONY +++ b/tests/scripts/targets/PHONY @@ -1,3 +1,5 @@ +# -*-perl-*- + $description = "The following tests the use of a PHONY target. It makes\n" ."sure that the rules under a target get executed even if\n" ."a filename of the same name of the target exists in the\n" @@ -8,15 +10,6 @@ $details = "This makefile in this test declares the target clean to be a \n" ."directory. Although this file exists, the rule under the target\n" ."clean should still execute because of it's phony status."; -if ($vos) -{ - $delete_command = "delete_file"; -} -else -{ - $delete_command = "rm"; -} - $example = "EXAMPLE_FILE"; open(MAKEFILE,"> $makefile"); diff --git a/tests/scripts/targets/SILENT b/tests/scripts/targets/SILENT index 5f9a1db..4bb0a0f 100644 --- a/tests/scripts/targets/SILENT +++ b/tests/scripts/targets/SILENT @@ -1,3 +1,5 @@ +# -*-perl-*- + $description = "The following tests the special target .SILENT. By simply\n" ."mentioning this as a target, it tells make not to print\n" ."commands before executing them."; @@ -5,15 +7,6 @@ $description = "The following tests the special target .SILENT. By simply\n" $details = "This test is the same as the clean test except that it should\n" ."not echo its command before deleting the specified file.\n"; -if ($vos) -{ - $delete_command = "delete_file"; -} -else -{ - $delete_command = "rm"; -} - $example = "EXAMPLE_FILE"; open(MAKEFILE,"> $makefile"); |