summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2009-09-28 23:08:49 +0000
committerPaul Smith <psmith@gnu.org>2009-09-28 23:08:49 +0000
commitf907a4d90c895f04ee7497a5f1b58ad1fd3cddb5 (patch)
treeaf19406bf81da1ad0fa78609d1195c959e31af0a /tests
parentf5891a26d8d3ed87b059856650b2bdb0c7ea355e (diff)
downloadgunmake-f907a4d90c895f04ee7497a5f1b58ad1fd3cddb5.tar.gz
- Update manual description for pattern rule search algorithm
- Add new "-all" flag to the test suite to run tests that don't pass yet - Add some non-passing tests - Fix from Andreas Buening for OS/2.
Diffstat (limited to 'tests')
-rw-r--r--tests/ChangeLog13
-rwxr-xr-xtests/run_make_tests.pl23
-rw-r--r--tests/scripts/features/se_explicit27
-rw-r--r--tests/scripts/functions/shell9
-rw-r--r--tests/test_driver.pl1
5 files changed, 64 insertions, 9 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 7110e4a..5800d66 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,16 @@
+2009-09-28 Paul Smith <psmith@gnu.org>
+
+ * scripts/functions/shell: Add regression test for Savannah bug
+ #20513 (still open).
+
+ * scripts/features/se_explicit: Add regression tests for Savannah
+ bug #25780 (still open).
+
+ * run_make_tests.pl (valid_option): Add a new flag, -all([-_]?tests)?
+ that runs tests we know will fail. This allows us to add
+ regression tests to the test suite for bugs that haven't been
+ fixed yet.
+
2009-09-28 Boris Kolpackov <boris@codesynthesis.com>
* scripts/features/patspecific_vars: Add a test for the shortest
diff --git a/tests/run_make_tests.pl b/tests/run_make_tests.pl
index 2071b17..65dba2a 100755
--- a/tests/run_make_tests.pl
+++ b/tests/run_make_tests.pl
@@ -37,6 +37,8 @@ $pure_log = undef;
$command_string = '';
+$all_tests = 0;
+
require "test_driver.pl";
# Some target systems might not have the POSIX module...
@@ -48,15 +50,18 @@ sub valid_option
{
local($option) = @_;
- if ($option =~ /^-make([-_]?path)?$/)
- {
- $make_path = shift @argv;
- if (!-f $make_path)
- {
- print "$option $make_path: Not found.\n";
- exit 0;
- }
- return 1;
+ if ($option =~ /^-make([-_]?path)?$/i) {
+ $make_path = shift @argv;
+ if (!-f $make_path) {
+ print "$option $make_path: Not found.\n";
+ exit 0;
+ }
+ return 1;
+ }
+
+ if ($option =~ /^-all([-_]?tests)?$/i) {
+ $all_tests = 1;
+ return 1;
}
if ($option =~ /^-(valgrind|memcheck)$/i) {
diff --git a/tests/scripts/features/se_explicit b/tests/scripts/features/se_explicit
index adf6b33..1b51474 100644
--- a/tests/scripts/features/se_explicit
+++ b/tests/scripts/features/se_explicit
@@ -130,5 +130,32 @@ endef
!,
'', "#MAKE#: *** prerequisites cannot be defined in recipes. Stop.\n", 512);
+
+if ($all_tests) {
+ # Automatic $$+ variable expansion issue. Savannah bug #25780
+ run_make_test(q!
+all : foo foo
+.SECONDEXPANSION:
+all : $$+ ; @echo '$+'
+foo : ;
+!,
+ '', "foo foo foo foo\n");
+
+}
+
+if ($all_tests) {
+ # Automatic $$+ variable expansion issue. Savannah bug #25780
+ run_make_test(q!
+all : bar bar
+bar : ;
+q%x : ;
+.SECONDEXPANSION:
+a%l: q1x $$+ q2x ; @echo '$+'
+!,
+ '', "q1x bar bar q2x bar bar\n");
+
+}
+
+
# This tells the test driver that the perl test script executed properly.
1;
diff --git a/tests/scripts/functions/shell b/tests/scripts/functions/shell
index ecea4cf..723cd0e 100644
--- a/tests/scripts/functions/shell
+++ b/tests/scripts/functions/shell
@@ -11,6 +11,15 @@ all: ; @echo $(shell echo hi)
','','hi');
+# Test unescaped comment characters in shells. Savannah bug #20513
+if ($all_tests) {
+ run_make_test(q!
+FOO := $(shell echo '#')
+foo: ; echo '$(FOO)'
+!,
+ '', "#\n");
+}
+
# Test shells inside exported environment variables.
# This is the test that fails if we try to put make exported variables into
# the environment for a $(shell ...) call.
diff --git a/tests/test_driver.pl b/tests/test_driver.pl
index d38868c..d7fa6c0 100644
--- a/tests/test_driver.pl
+++ b/tests/test_driver.pl
@@ -461,6 +461,7 @@ sub run_each_test
# Run the actual test!
$tests_run = 0;
$tests_passed = 0;
+
$code = do $perl_testname;
$total_tests_run += $tests_run;