asyncio
Last change
on this file since 2b3a2814 was
0da2c5d,
checked in by Fiona Klute <fiona.klute@…>, 15 months ago
|
Test suite: Update README and newtest script
|
-
Property mode set to
100755
|
File size:
851 bytes
|
Rev | Line | |
---|
[4b53371] | 1 | #!/bin/bash |
---|
| 2 | |
---|
| 3 | TEST_NAME="$1" |
---|
| 4 | |
---|
| 5 | confirmed=0 |
---|
| 6 | |
---|
| 7 | while [ "$confirmed" -eq 0 ]; do |
---|
| 8 | |
---|
[dcaba46] | 9 | if [ -z "${TEST_NAME}" ]; then |
---|
| 10 | read -e -p "describe your new test briefly: " -i "$tname" TEST_NAME |
---|
| 11 | fi |
---|
[4b53371] | 12 | |
---|
| 13 | tname="${TEST_NAME// /_}" |
---|
[e78bc78] | 14 | newnum="$(( $(ls -d tests/* | sed 's|^[^/]*/\([0-9]*\)_.*|\1|' | sort -n | tail -n 1 | sed s/^0//) + 1))" |
---|
| 15 | newname="$(printf "%02d_%s" "${newnum}" "$tname")" |
---|
[4b53371] | 16 | |
---|
[dcaba46] | 17 | read -p "your new test will be named tests/$newname. OK? [Y/n]" |
---|
[4b53371] | 18 | if [ "$REPLY" == "" ] || [ "${REPLY/Y/y}" == "y" ]; then |
---|
| 19 | confirmed=1 |
---|
| 20 | fi |
---|
| 21 | done |
---|
| 22 | |
---|
| 23 | cp -a tests/00_basic "tests/$newname" |
---|
[0da2c5d] | 24 | # derive script name, the actual script will be generated by make |
---|
[e78bc78] | 25 | newscript="test-${newname}.bash" |
---|
| 26 | |
---|
| 27 | echo "You can now edit ${newname}." |
---|
[0da2c5d] | 28 | echo "Run the test with TESTS=\"${newscript}\" make -e check." |
---|
| 29 | echo "When ready, add ${newscript} to test_scripts in Makefile.am." |
---|
Note: See
TracBrowser
for help on using the repository browser.