Changeset 4addf74 in mod_gnutls for test/TestMakefile


Ignore:
Timestamp:
Aug 22, 2015, 3:30:24 PM (5 years ago)
Author:
Daniel Kahn Gillmor <dkg@…>
Branches:
debian/master, debian/stretch-backports, jessie-backports, upstream
Children:
71e9a5c, 89f863f
Parents:
ae29683 (diff), a1c4c2d (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.
Message:

Imported Upstream version 0.7

File:
1 moved

Legend:

Unmodified
Added
Removed
  • test/TestMakefile

    rae29683 r4addf74  
    66# simple configuration choices.
    77
     8export 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)
     11export APACHE2 ?= apache2
     12
    813export TEST_HOST ?= localhost
    914export TEST_IP ?= ::1
     
    1217export MSVA_PORT ?= 9933
    1318
    14 export TEST_GAP ?= 1.5
    15 export TEST_QUERY_DELAY ?= 2
     19export TEST_GAP ?= 0.4
     20export TEST_MSVA_MAX_WAIT ?= 10
     21export TEST_QUERY_DELAY ?= 30
     22export TEST_LOCK_WAIT ?= 30
     23
     24TEST_LOCK := ./test.lock
    1625
    1726all: setup.done
    18         ./runtests
     27        TEST_LOCK=$(TEST_LOCK) $(srcdir)/runtests
    1928
    2029t-%: setup.done
    21         ./runtests $@
     30        TEST_LOCK=$(TEST_LOCK) $(srcdir)/runtests $@
    2231
    2332
     
    3039all_tokens := $(foreach id,$(identities),$(foreach token,$(tokens),$(id)/$(token)))
    3140
    32 %.template: %.template.in
     41%.template: $(srcdir)/%.template.in
    3342        sed s/__HOSTNAME__/$(TEST_HOST)/ < $< > $@
    3443
    35 server.uid: server.uid.in
     44%.uid: $(srcdir)/%.uid.in
    3645        sed s/__HOSTNAME__/$(TEST_HOST)/ < $< > $@
    3746
     
    5564        GNUPGHOME=$(dir $@) gpg --armor --export "$$(GNUPGHOME=$(dir $@) gpg --with-colons --list-secret-keys --fingerprint | grep ^fpr: | cut -f 10 -d :)" > $@
    5665
     66# Import and signing modify the shared keyring, which leads to race
     67# conditions with parallel make. Locking avoids this problem.
    5768%/cert.pgp: %/minimal.pgp authority/gpg.conf
    58         GNUPGHOME=authority gpg --import $<
    59         GNUPGHOME=authority gpg --batch --sign-key --no-tty --yes "$$(GNUPGHOME=$(dir $@) gpg --with-colons --list-secret-keys --fingerprint | grep ^fpr: | cut -f 10 -d :)"
     69        GNUPGHOME=authority flock authority/lock gpg --import $<
     70        GNUPGHOME=authority flock authority/lock gpg --batch --sign-key --no-tty --yes "$$(GNUPGHOME=$(dir $@) gpg --with-colons --list-secret-keys --fingerprint | grep ^fpr: | cut -f 10 -d :)"
    6071        GNUPGHOME=authority gpg --armor --export "$$(GNUPGHOME=$(dir $@) gpg --with-colons --list-secret-keys --fingerprint | grep ^fpr: | cut -f 10 -d :)" > $@
    6172
    6273# special cases for the authorities' root certs:
    6374authority/x509.pem: authority.template authority/secret.key
    64         certtool --generate-self-signed --load-privkey=authority/secret.key --template=authority.template > $@
    65 rogueca/x509.pem: rogueca.template rogueca/secret.key
    66         certtool --generate-self-signed --load-privkey=rogueca/secret.key --template=rogueca.template > $@
     75        certtool --generate-self-signed --load-privkey authority/secret.key --template authority.template > $@
     76rogueca/x509.pem: $(srcdir)/rogueca.template rogueca/secret.key
     77        certtool --generate-self-signed --load-privkey rogueca/secret.key --template $(srcdir)/rogueca.template > $@
    6778
    6879%/cert-request: %.template %/secret.key
    69         certtool --generate-request --load-privkey=$(dir $@)secret.key --template=$< > $@
     80        certtool --generate-request --load-privkey $(dir $@)secret.key --template $< > $@
    7081
    7182%/x509.pem: %.template %/cert-request authority/secret.key authority/x509.pem
    72         certtool --generate-certificate --load-ca-certificate=authority/x509.pem --load-ca-privkey=authority/secret.key --load-request=$(dir $@)cert-request --template=$< > $@
     83        certtool --generate-certificate --load-ca-certificate authority/x509.pem --load-ca-privkey authority/secret.key --load-request $(dir $@)cert-request --template $< > $@
     84
     85%/softhsm.db: %/x509.pem %/secret.key
     86        SOFTHSM_CONF="$(srcdir)/$(*)-softhsm.conf" $(srcdir)/softhsm.bash init $(dir $@)secret.key $(dir $@)x509.pem
     87
     88# Generate CRL revoking a certain certificate. Currently used to
     89# revoke the server certificate and check if setting the CRL as
     90# GnuTLSProxyCRLFile causes the connection to the back end server to
     91# fail.
     92%/crl.pem: %/x509.pem ${srcdir}/%-crl.template
     93        certtool --generate-crl \
     94                --load-ca-privkey authority/secret.key \
     95                --load-ca-certificate authority/x509.pem \
     96                --load-certificate $< \
     97                --template "${srcdir}/$(*)-crl.template" \
     98                > $@
    7399
    74100msva.gnupghome/trustdb.gpg: authority/minimal.pgp client/cert.pgp
     
    80106
    81107
    82 setup.done: $(all_tokens) msva.gnupghome/trustdb.gpg
     108setup.done: $(all_tokens) msva.gnupghome/trustdb.gpg client.uid
    83109        mkdir -p logs cache outputs
    84110        touch setup.done
     
    86112
    87113clean:
    88         rm -rf server client authority logs cache outputs setup.done server.template msva.gnupghome
     114        rm -rf server client authority logs cache outputs setup.done \
     115        server.template imposter.template msva.gnupghome \
     116        */*.pgp */*.gpg */*.gpg~ */*.pem */*.key authority.template \
     117        client.template client.uid server.uid *.lock tests/*/*.pem
     118        rmdir imposter rogueca || true
    89119
    90120.PHONY: all clean
Note: See TracChangeset for help on using the changeset viewer.