- Timestamp:
- Oct 18, 2015, 10:42:58 AM (7 years ago)
- Branches:
- asyncio, debian/master, debian/stretch-backports, jessie-backports, master, proxy-ticket, upstream
- Children:
- fc8e463b
- Parents:
- f9f184f
- Location:
- test
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
test/Makefile.am
rf9f184f r9a4d250 31 31 TESTS = $(dist_check_SCRIPTS) 32 32 33 # Identities in the miniature CA, server, and client environment for 34 # the test suite 35 identities = server authority client imposter rogueca 36 # Append strings after ":=" to each identity to generate a list of 37 # necessary files 38 pgp_tokens = $(identities:=/secring.gpg) $(identities:=/cert.pgp) \ 39 $(identities:=/secret.pgp) 40 x509_keys = $(identities:=/secret.key) 41 x509_certs = $(identities:=/x509.pem) 42 x509_tokens = $(x509_certs) $(x509_keys) 43 tokens = $(x509_tokens) $(pgp_tokens) 44 45 include $(srcdir)/TestMakefile 46 33 47 # Test cases trying to create keys and certificates in parallel causes 34 48 # race conditions. Ensure that all keys and certificates are generated … … 41 55 # running at any time, so test cases actually have to wait for each 42 56 # other - just not in any particular order. 43 check_DATA = setup.doneserver/crl.pem57 check_DATA = $(tokens) server/crl.pem 44 58 45 59 MOSTLYCLEANFILES = cache/* logs/* outputs/* server/crl.pem … … 50 64 imposter.template server.template 51 65 66 # Delete X.509 private keys on full clean. Note that unless you need 67 # to generate fresh keys, the "mostlyclean" target should be 68 # sufficient (see below). 69 CLEANFILES = $(x509_keys) 70 52 71 # Delete X.509 certificates and generated templates on "mostlyclean" 53 72 # target. Certificates can be rebuilt without generating new key … … 55 74 # (e.g. host names) without wasting entropy on new keys (which would 56 75 # happen after "clean"). 57 MOSTLYCLEANFILES += */x509.pem $(generated_templates) 76 MOSTLYCLEANFILES += */x509.pem $(generated_templates) *.uid 77 58 78 59 79 # Delete PGP keyrings on "mostlyclean" target. They are created from … … 61 81 # one day, so regenerating them is both fast and frequently 62 82 # necessary. 63 MOSTLYCLEANFILES += */*.pgp */*.gpg */*.gpg~ */gpg.conf 83 MOSTLYCLEANFILES += */*.pgp */*.gpg */*.gpg~ */gpg.conf authority/lock 84 # GnuPG random pool, no need to regenerate on every build 85 CLEANFILES += authority/random_seed 64 86 65 clean-local: 66 $(MAKE) -f $(srcdir)/TestMakefile $(AM_MAKEFLAGS) clean 87 # Delete lock files for test servers on "mostlyclean" target. 88 MOSTLYCLEANFILES += *.lock 89 90 # rule to build MSVA trust database 91 if USE_MSVA 92 msva_home = msva.gnupghome 93 check_DATA += $(msva_home)/trustdb.gpg client.uid 94 MOSTLYCLEANFILES += $(msva_home)/trustdb.gpg 95 $(msva_home)/trustdb.gpg: authority/minimal.pgp client/cert.pgp 96 mkdir -p -m 0700 $(dir $@) 97 GNUPGHOME=$(dir $@) gpg --import < $< 98 printf "%s:6:\n" "$$(GNUPGHOME=authority gpg --with-colons --list-secret-keys --fingerprint | grep ^fpr: | cut -f 10 -d :)" | GNUPGHOME=$(dir $@) gpg --import-ownertrust 99 GNUPGHOME=$(dir $@) gpg --import < client/cert.pgp 100 printf "keyserver does-not-exist.example\n" > $(msva_home)/gpg.conf 101 endif 67 102 68 103 # SoftHSM files 69 104 check_DATA += server/softhsm.db 70 MOSTLYCLEANFILES += tests/24_pkcs11_cert/softhsm.conf 105 MOSTLYCLEANFILES += tests/24_pkcs11_cert/softhsm.conf server/softhsm.db 71 106 72 # This rule can be used for any TestMakefile target not included in73 # setup.done. The dependency on setup.done is used to avoid race74 # conditions between multiple calls to TestMakefile for key and75 # certificate generation. It is ignored for setup.done itself.76 .PHONY: setup.done77 server/crl.pem server/softhsm.db setup.done: setup.done78 TEST_HOST="$(TEST_HOST)" TEST_IP="$(TEST_IP)" srcdir=$(srcdir) \79 $(MAKE) -f $(srcdir)/TestMakefile $(AM_MAKEFLAGS) $@80 107 108 check_DATA += make-test-dirs 109 extra_dirs = logs cache outputs 110 make-test-dirs: 111 mkdir -p $(extra_dirs) 112 .PHONY: make-test-dirs 113 114 clean-local: 115 -rmdir $(identities) || true 116 -rmdir $(extra_dirs) || true 117 if USE_MSVA 118 -rmdir $(msva_home) || true 119 endif 120 121 # Apache configuration and data files 81 122 apache_data = base_apache.conf cgi_module.conf data/* mime.types proxy_mods.conf 82 123 -
test/TestMakefile
rf9f184f r9a4d250 1 1 #!/usr/bin/make -f 2 # Authors: 3 # Daniel Kahn Gillmor <dkg@fifthhorseman.net> 4 # Thomas Klute <thomas2.klute@uni-dortmund.de> 2 5 3 # Author: Daniel Kahn Gillmor <dkg@fifthhorseman.net> 4 5 # run these tests to ensure that mod_gnutls can handle a range of 6 # simple configuration choices. 7 8 export srcdir ?= . 9 # If the Apache binary is not set, try to find apache2 in default PATH 10 # (should only happen when the test script is run manually) 11 export APACHE2 ?= apache2 12 13 export TEST_HOST ?= localhost 14 15 16 17 18 19 ### for setting up a little miniature CA + server + client environment: 20 identities := server authority client imposter rogueca 21 tokens := x509.pem secring.gpg secret.key cert.pgp secret.pgp 22 all_tokens := $(foreach id,$(identities),$(foreach token,$(tokens),$(id)/$(token))) 6 # General rules to set up a miniature CA & server & client environment 7 # for the test suite 23 8 24 9 %.template: $(srcdir)/%.template.in … … 80 65 --template "${srcdir}/$(*)-crl.template" \ 81 66 > $@ 82 83 msva.gnupghome/trustdb.gpg: authority/minimal.pgp client/cert.pgp84 mkdir -p -m 0700 $(dir $@)85 GNUPGHOME=$(dir $@) gpg --import < $<86 printf "%s:6:\n" "$$(GNUPGHOME=authority gpg --with-colons --list-secret-keys --fingerprint | grep ^fpr: | cut -f 10 -d :)" | GNUPGHOME=$(dir $@) gpg --import-ownertrust87 GNUPGHOME=$(dir $@) gpg --import < client/cert.pgp88 printf "keyserver does-not-exist.example\n" > msva.gnupghome/gpg.conf89 90 91 setup.done: $(all_tokens) msva.gnupghome/trustdb.gpg client.uid92 mkdir -p logs cache outputs93 94 clean:95 rm -rf server client authority logs cache outputs setup.done \96 server.template imposter.template msva.gnupghome \97 */*.pgp */*.gpg */*.gpg~ */*.pem */*.key authority.template \98 client.template client.uid server.uid *.lock tests/*/*.pem99 rmdir imposter rogueca || true100 101 .PHONY: all clean setup.done
Note: See TracChangeset
for help on using the changeset viewer.