Changeset e78bc78 in mod_gnutls
- Timestamp:
- Jan 26, 2015, 10:43:35 AM (8 years ago)
- Branches:
- asyncio, debian/master, debian/stretch-backports, jessie-backports, master, proxy-ticket, upstream
- Children:
- 302965e
- Parents:
- 87208b5
- Location:
- test
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
test/README
r87208b5 re78bc78 11 11 ================= 12 12 13 from the top level of the source, or from t / (where this README is),13 from the top level of the source, or from test/ (where this README is), 14 14 just run: 15 15 16 16 make check 17 17 18 from t / you can also run specific tests (identified by number) with:18 from test/ you can also run specific tests (identified by number) with: 19 19 20 20 make -f TestMakefile t-3 … … 29 29 Please add more tests! 30 30 31 The simplest way to add a test is (from t /):31 The simplest way to add a test is (from test/): 32 32 33 33 ./newtest 34 34 35 This will prompt you for a simple name for the test and then copy a starting 36 set of files from tests/00_basic. 35 This will prompt you for a simple name for the test and then copy a 36 starting set of files from tests/00_basic, and create a script which 37 you can add to TESTS in Makefile.am when your test is ready for 38 inclusion in the test suite. 37 39 38 40 … … 40 42 ============== 41 43 42 Each test consists of a directory in t /tests/, which will cause the44 Each test consists of a directory in test/tests/, which will cause the 43 45 test suite to spin up an isolated apache instance and try to connect 44 46 to it with gnutls-cli and make a simple HTTP 1.1 request. -
test/newtest
r87208b5 re78bc78 10 10 11 11 tname="${TEST_NAME// /_}" 12 newname="$(printf "%02d_%s" "$(( $(ls -d tests/* | sed 's|^[^/]*/\([0-9]*\)_.*|\1|' | sort -n | tail -n 1 | sed s/^0//) + 1 ))" "$tname")" 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")" 13 14 14 15 read -p "your new test will be named tests/$newname. OK [Y/n]? " … … 20 21 cp -a tests/00_basic "tests/$newname" 21 22 22 printf "You can now edit %s\n" "$newname" 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." -
test/setup
r87208b5 re78bc78 13 13 14 14 if [ . != "$(dirname "$0")" ]; then 15 printf "You should only run this mod-gnutls test suite from the t / directory of the mod_gnutls source.\n" >&215 printf "You should only run this mod-gnutls test suite from the test/ directory of the mod_gnutls source.\n" >&2 16 16 exit 1 17 17 fi
Note: See TracChangeset
for help on using the changeset viewer.