asynciodebian/masterdebian/stretch-backportsjessie-backportsmainproxy-ticketupstream
Last change
on this file since 3e04c0b was
e78bc78,
checked in by Thomas Klute <thomas2.klute@…>, 8 years ago
|
Adjust test tools and documentation to split tests and moved test dir
Paths, descriptions and an error message were adjusted in README and
setup. A bigger change was needed in the "newtest" script, which now
creates a script for "make check" to call. This script is not
automatically added to the list of tests in Makefile.am, but the user is
advised to add it when ready.
|
-
Property mode set to
100755
|
File size:
831 bytes
|
Line | |
---|
1 | #!/bin/bash |
---|
2 | |
---|
3 | TEST_NAME="$1" |
---|
4 | |
---|
5 | confirmed=0 |
---|
6 | |
---|
7 | while [ "$confirmed" -eq 0 ]; do |
---|
8 | |
---|
9 | read -e -p "describe your new test briefly: " -i "$tname" TEST_NAME |
---|
10 | |
---|
11 | tname="${TEST_NAME// /_}" |
---|
12 | newnum="$(( $(ls -d tests/* | sed 's|^[^/]*/\([0-9]*\)_.*|\1|' | sort -n | tail -n 1 | sed s/^0//) + 1))" |
---|
13 | newname="$(printf "%02d_%s" "${newnum}" "$tname")" |
---|
14 | |
---|
15 | read -p "your new test will be named tests/$newname. OK [Y/n]? " |
---|
16 | if [ "$REPLY" == "" ] || [ "${REPLY/Y/y}" == "y" ]; then |
---|
17 | confirmed=1 |
---|
18 | fi |
---|
19 | done |
---|
20 | |
---|
21 | cp -a tests/00_basic "tests/$newname" |
---|
22 | |
---|
23 | # create run script for make check |
---|
24 | newscript="test-${newname}.bash" |
---|
25 | echo '#!/bin/bash' >"${newscript}" |
---|
26 | echo "make -f TestMakefile t-${newnum}" >>"${newscript}" |
---|
27 | chmod a+x "${newscript}" |
---|
28 | |
---|
29 | echo "You can now edit ${newname}." |
---|
30 | echo "When ready, add ${newscript} to TESTS in Makefile.am." |
---|
Note: See
TracBrowser
for help on using the repository browser.