Changeset 8731286 in mod_gnutls
- Timestamp:
- Feb 5, 2015, 1:11:44 PM (8 years ago)
- Branches:
- asyncio, debian/master, debian/stretch-backports, jessie-backports, main, master, proxy-ticket, upstream
- Children:
- eea8a16
- Parents:
- 5a8a32b (diff), 9a06bbd (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Files:
-
- 20 added
- 2 deleted
- 2 edited
- 92 moved
Legend:
- Unmodified
- Added
- Removed
-
Makefile.am
r5a8a32b r8731286 8 8 NOTICE LICENSE autogen.sh 9 9 10 SUBDIRS = src 10 SUBDIRS = src test 11 11 ACLOCAL_AMFLAGS = -I m4 12 TESTS = run_tests.sh -
configure.ac
r5a8a32b r8731286 59 59 [enable Monkeysphere client certificate verification]), 60 60 use_msva=$enableval, use_msva=no) 61 AM_CONDITIONAL([USE_MSVA], [test "$use_msva" = "$enableval"]) 61 62 62 63 MSVA_CFLAGS="" … … 82 83 AC_SUBST(MODULE_LIBS) 83 84 84 AC_CONFIG_FILES([Makefile src/Makefile include/mod_gnutls.h])85 AC_CONFIG_FILES([Makefile src/Makefile test/Makefile include/mod_gnutls.h]) 85 86 AC_OUTPUT 86 87 -
test/.gitignore
r5a8a32b r8731286 14 14 authority.template 15 15 msva.gnupghome 16 *.log 17 *.trs 18 test.lock -
test/README
r5a8a32b r8731286 11 11 ================= 12 12 13 from the top level of the source, just run: 13 from the top level of the source, or from test/ (where this README is), 14 just run: 14 15 15 16 make check 16 17 17 from t / (where this README is), just run:18 from test/ you can also run specific tests (identified by number) with: 18 19 19 make 20 21 also from t/ you can also run specific tests (identified by number) 22 with: 23 24 make t-3 20 make -f TestMakefile t-3 25 21 26 22 This should be handy when you're just trying to experiment with a new … … 33 29 Please add more tests! 34 30 35 The simplest way to add a test is (from t /):31 The simplest way to add a test is (from test/): 36 32 37 33 ./newtest 38 34 39 This will prompt you for a simple name for the test and then copy a starting 40 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. 41 39 42 40 … … 44 42 ============== 45 43 46 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 47 45 test suite to spin up an isolated apache instance and try to connect 48 46 to it with gnutls-cli and make a simple HTTP 1.1 request. -
test/TestMakefile
r5a8a32b r8731286 15 15 export TEST_QUERY_DELAY ?= 2 16 16 17 TEST_LOCK := ./test.lock 18 17 19 all: setup.done 18 ./runtests20 TEST_LOCK=$(TEST_LOCK) ./runtests 19 21 20 22 t-%: setup.done 21 ./runtests $@23 TEST_LOCK=$(TEST_LOCK) ./runtests $@ 22 24 23 25 … … 87 89 clean: 88 90 rm -rf server client authority logs cache outputs setup.done server.template msva.gnupghome \ 89 */*.pgp */*.gpg */*.pem */*.key authority.template client.template server.uid 91 */*.pgp */*.gpg */*.gpg~ */*.pem */*.key authority.template client.template server.uid 92 rmdir imposter rogueca 90 93 91 94 .PHONY: all clean -
test/runtests
r5a8a32b r8731286 6 6 7 7 tests="${1##t-}" 8 9 if [ -n "${TEST_LOCK}" ]; then 10 TEST_LOCK="$(realpath ${TEST_LOCK})" 11 flock_cmd="flock -w 10 ${TEST_LOCK}" 12 fi 8 13 9 14 BADVARS=0 … … 20 25 21 26 if [ . != "$(dirname "$0")" ]; then 22 printf "You should only run this mod-gnutls test suite from the t / directory of the mod_gnutls source.\n" >&227 printf "You should only run this mod-gnutls test suite from the test/ directory of the mod_gnutls source.\n" >&2 23 28 exit 1 24 29 fi … … 37 42 printf "\nApache error logs:\n" 38 43 tail "../../logs/${TEST_NAME}.error.log" 39 stop_msva 44 if [ -n "${USE_MSVA}" ]; then 45 stop_msva 46 fi 40 47 } 41 48 … … 46 53 fi 47 54 48 GNUPGHOME=$(pwd)/msva.gnupghome MSVA_KEYSERVER_POLICY=never monkeysphere-validation-agent & 55 if [ -n "${USE_MSVA}" ]; then 56 GNUPGHOME=$(pwd)/msva.gnupghome MSVA_KEYSERVER_POLICY=never monkeysphere-validation-agent & 57 trap stop_msva EXIT 49 58 50 trap stop_msva EXIT 59 sleep "$TEST_GAP" 51 60 52 sleep "$TEST_GAP" 61 printf "TESTING: initial MSVA verification\n" 62 MONKEYSPHERE_VALIDATION_AGENT_SOCKET="http://127.0.0.1:$MSVA_PORT" msva-query-agent https "$(cat client.uid)" x509pem client < client/x509.pem 63 printf "\nSUCCESS: initial MSVA verification\n" 64 fi 53 65 54 printf "TESTING: initial MSVA verification\n" 55 MONKEYSPHERE_VALIDATION_AGENT_SOCKET="http://127.0.0.1:$MSVA_PORT" msva-query-agent https "$(cat client.uid)" x509pem client < client/x509.pem 56 printf "\nSUCCESS: initial MSVA verification\n" 57 58 for t in $tests; do 59 sleep "$TEST_GAP" 66 for t in $tests; do 67 if [ -z "${flock_cmd}" ]; then 68 echo "Warning: no lock file set" 69 sleep "$TEST_GAP" 70 fi 60 71 export TEST_NAME="$(basename "$t")" 61 72 output="../../outputs/${TEST_NAME}.output" … … 69 80 printf "TESTING: %s%s\n" "$TEST_NAME" "$EXPECTED_FAILURE" 70 81 trap apache_down_err EXIT 71 MONKEYSPHERE_VALIDATION_AGENT_SOCKET="http://127.0.0.1:$MSVA_PORT" /usr/sbin/apache2 -f "$(pwd)/apache.conf" -k start || [ -e fail.server ] 82 if [ -n "${USE_MSVA}" ]; then 83 ${flock_cmd} \ 84 MONKEYSPHERE_VALIDATION_AGENT_SOCKET="http://127.0.0.1:$MSVA_PORT" \ 85 /usr/sbin/apache2 -f "$(pwd)/apache.conf" -k start \ 86 || [ -e fail.server ] 87 else 88 ${flock_cmd} \ 89 /usr/sbin/apache2 -f "$(pwd)/apache.conf" -k start \ 90 || [ -e fail.server ] 91 fi 72 92 73 93 if (sed "s/__HOSTNAME__/${TEST_HOST}/" < ./input && sleep "$TEST_QUERY_DELAY") | \ … … 88 108 fi 89 109 /usr/sbin/apache2 -f "$(pwd)/apache.conf" -k stop || [ -e fail.server ] 90 trap stop_msva EXIT 110 if [ -n "${USE_MSVA}" ]; then 111 trap stop_msva EXIT 112 else 113 trap - EXIT 114 fi 91 115 printf "SUCCESS: %s\n" "$TEST_NAME" 92 116 cd ../.. 93 117 done 94 118 95 stop_msva 119 if [ -n "${USE_MSVA}" ]; then 120 stop_msva 121 fi -
test/setup
r5a8a32b r8731286 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.