diff options
author | Daniel Stenberg <daniel@haxx.se> | 2015-04-26 18:22:46 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2015-04-26 19:59:13 +0200 |
commit | c0700e3c7f36fc0bc969652c39cdd808de128d94 (patch) | |
tree | 6fd70695e4a6c3aedd903e0c886ce5f2d133235a /tests | |
parent | 92e754de78fed63573091d650a2de49d58ad719a (diff) |
runtests: use a DISABLED.local file too
... and have git ignore that. Allows for a dev to add tests to ignore in
local tests and yet don't obstruct a normal git work flow.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/README | 4 | ||||
-rw-r--r-- | tests/data/.gitignore | 1 | ||||
-rwxr-xr-x | tests/runtests.pl | 28 |
3 files changed, 23 insertions, 10 deletions
diff --git a/tests/README b/tests/README index 14ac6eedb..ae8ff25cc 100644 --- a/tests/README +++ b/tests/README @@ -100,7 +100,9 @@ The cURL Test Suite (like "./runtests.pl 3 4" to test 3 and 4 only). It also supports test case ranges with 'to', as in "./runtests 3 to 9" which runs the seven tests from 3 to 9. Any test numbers starting with ! are disabled, as are any test - numbers found in the file data/DISABLED (one per line). + numbers found in the files data/DISABLED or data/DISABLED.local (one per + line). The latter is meant for local temporary disables and will be ignored + by git. When -s is not present, each successful test will display on one line the test number and description and on the next line a set of flags, the test diff --git a/tests/data/.gitignore b/tests/data/.gitignore new file mode 100644 index 000000000..124ebf936 --- /dev/null +++ b/tests/data/.gitignore @@ -0,0 +1 @@ +DISABLED.local diff --git a/tests/runtests.pl b/tests/runtests.pl index 65c093c33..33d841231 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -5002,19 +5002,29 @@ if(!$listonly) { # Fetch all disabled tests, if there are any # -if(open(D, "<$TESTDIR/DISABLED")) { - while(<D>) { - if(/^ *\#/) { - # allow comments - next; - } - if($_ =~ /(\d+)/) { - $disabled{$1}=$1; # disable this test number +sub disabledtests { + my ($file) = @_; + + if(open(D, "<$file")) { + while(<D>) { + if(/^ *\#/) { + # allow comments + next; + } + if($_ =~ /(\d+)/) { + $disabled{$1}=$1; # disable this test number + } } + close(D); } - close(D); } +# globally disabled tests +disabledtests("$TESTDIR/DISABLED"); + +# locally disabled tests, ignored by git etc +disabledtests("$TESTDIR/DISABLED.local"); + ####################################################################### # If 'all' tests are requested, find out all test numbers # |