[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Testsuite Patches: Part 2: test ranges as args to testsuite
From: |
Tim Van Holder |
Subject: |
Testsuite Patches: Part 2: test ranges as args to testsuite |
Date: |
Sun, 11 Feb 2001 22:04:15 +0100 |
Supported:
15-: all tests from nr 15 onward
-15: all tests up to nr 15
15-45: tests 15 through 45
Example:
./testsuite 40-60 90- -20
runs 1 -> 20, 40 -> 60, 90 -> end
2001-02-11 Tim Van Holder <address@hidden>
* tests/atgeneral.m4: Support ranges as testsuite options.
Index: atgeneral.m4
===================================================================
RCS file: /cvs/autoconf/tests/atgeneral.m4,v
retrieving revision 1.57
diff -u -r1.57 atgeneral.m4
--- atgeneral.m4 2001/01/30 19:29:40 1.57
+++ atgeneral.m4 2001/02/11 19:48:29
@@ -148,13 +134,38 @@
[[0-9] | [0-9][0-9] | [0-9][0-9][0-9] | [0-9][0-9][0-9][0-9]])
at_tests="$at_tests$[1] ";;
+ # Ranges
+ [[0-9]- | [0-9][0-9]- | [0-9][0-9][0-9]- | [0-9][0-9][0-9][0-9]-])
+ at_range_start=`echo $[1] |tr -d '-'`
+ at_range=`echo " $at_tests_all " | \
+ sed -e 's,^.* '$at_range_start' ,'$at_range_start' ,'`
+ at_tests="$at_tests$at_range ";;
+
+ [-[0-9] | -[0-9][0-9] | -[0-9][0-9][0-9] | -[0-9][0-9][0-9][0-9]])
+ at_range_end=`echo $[1] |tr -d '-'`
+ at_range=`echo " $at_tests_all " | \
+ sed -e 's, '$at_range_end' .*$, '$at_range_end','`
+ at_tests="$at_tests$at_range ";;
+
+ [[0-9]-[0-9] | [0-9]-[0-9][0-9] | [0-9]-[0-9][0-9][0-9]] | \
+ [[0-9]-[0-9][0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9]] | \
+ [[0-9][0-9]-[0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9][0-9][0-9]] | \
+ [[0-9][0-9][0-9]-[0-9][0-9][0-9]] | \
+ [[0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]] | \
+ [[0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]] )
+ at_range_start=`echo $[1] |sed 's,-.*,,'`
+ at_range_end=`echo $[1] |sed 's,.*-,,'`
+ # Maybe test to make sure start <= end
+ at_range=`echo " $at_tests_all " | \
+ sed -e 's,^.* '$at_range_start' ,'$at_range_start' ,' \
+ -e 's, '$at_range_end' .*$, '$at_range_end','`
+ at_tests="$at_tests$at_range ";;
+
*) echo 1>&2 "Try \`$[0] --help' for more information."; exit 1 ;;
esac
shift
done
-test -z "$at_tests" && at_tests=$at_tests_all
-
# Help message.
if $at_help; then
# If tests were specified, display only their title.
@@ -180,6 +191,8 @@
EOF
exit 0
fi
+
+test -z "$at_tests" && at_tests=$at_tests_all
# Use `diff -u' when possible.
: >empty
- Testsuite Patches: Part 2: test ranges as args to testsuite,
Tim Van Holder <=