Changeset 33af2b7 in mod_gnutls for test/TestMakefile


Ignore:
Timestamp:
May 11, 2015, 6:28:20 PM (5 years ago)
Author:
Thomas Klute <thomas2.klute@…>
Branches:
debian/master, debian/stretch-backports, jessie-backports, master, upstream
Children:
31caead
Parents:
e24eed6
git-author:
Thomas Klute <thomas2.klute@…> (05/11/15 18:12:28)
git-committer:
Thomas Klute <thomas2.klute@…> (05/11/15 18:28:20)
Message:

Test suite: Add tests to "dist" target and support VPATH builds

Supporting VPATH builds requires using $srcdir to find non-generated
data rather than fixed relative paths. If test are not called through
the make system, local defaults must be used. Not changing directories
during tests any more makes this easier.

A few files (e.g. templates, generated CRL) have been moved around to
better match the new structure.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/TestMakefile

    re24eed6 r33af2b7  
    55# run these tests to ensure that mod_gnutls can handle a range of
    66# simple configuration choices.
     7
     8export srcdir ?= .
    79
    810export TEST_HOST ?= localhost
     
    1820
    1921all: setup.done
    20         TEST_LOCK=$(TEST_LOCK) ./runtests
     22        TEST_LOCK=$(TEST_LOCK) $(srcdir)/runtests
    2123
    2224t-%: setup.done
    23         TEST_LOCK=$(TEST_LOCK) ./runtests $@
     25        TEST_LOCK=$(TEST_LOCK) $(srcdir)/runtests $@
    2426
    2527
     
    3234all_tokens := $(foreach id,$(identities),$(foreach token,$(tokens),$(id)/$(token)))
    3335
    34 %.template: %.template.in
     36%.template: $(srcdir)/%.template.in
    3537        sed s/__HOSTNAME__/$(TEST_HOST)/ < $< > $@
    3638
    37 server.uid: server.uid.in
     39%.uid: $(srcdir)/%.uid.in
    3840        sed s/__HOSTNAME__/$(TEST_HOST)/ < $< > $@
    3941
     
    6769authority/x509.pem: authority.template authority/secret.key
    6870        certtool --generate-self-signed --load-privkey authority/secret.key --template authority.template > $@
    69 rogueca/x509.pem: rogueca.template rogueca/secret.key
    70         certtool --generate-self-signed --load-privkey rogueca/secret.key --template rogueca.template > $@
     71rogueca/x509.pem: $(srcdir)/rogueca.template rogueca/secret.key
     72        certtool --generate-self-signed --load-privkey rogueca/secret.key --template $(srcdir)/rogueca.template > $@
    7173
    7274%/cert-request: %.template %/secret.key
     
    7779
    7880%/softhsm.db: %/x509.pem %/secret.key
    79         SOFTHSM_CONF="$(*)-softhsm.conf" ./softhsm.bash init $(dir $@)secret.key $(dir $@)x509.pem
     81        SOFTHSM_CONF="$(srcdir)/$(*)-softhsm.conf" $(srcdir)/softhsm.bash init $(dir $@)secret.key $(dir $@)x509.pem
     82
     83# Generate CRL revoking a certain certificate. Currently used to
     84# revoke the server certificate and check if setting the CRL as
     85# GnuTLSProxyCRLFile causes the connection to the back end server to
     86# fail.
     87%/crl.pem: %/x509.pem ${srcdir}/%-crl.template
     88        certtool --generate-crl \
     89                --load-ca-privkey authority/secret.key \
     90                --load-ca-certificate authority/x509.pem \
     91                --load-certificate $< \
     92                --template "${srcdir}/$(*)-crl.template" \
     93                > $@
    8094
    8195msva.gnupghome/trustdb.gpg: authority/minimal.pgp client/cert.pgp
     
    87101
    88102
    89 setup.done: $(all_tokens) msva.gnupghome/trustdb.gpg
     103setup.done: $(all_tokens) msva.gnupghome/trustdb.gpg client.uid
    90104        mkdir -p logs cache outputs
    91105        touch setup.done
     
    94108clean:
    95109        rm -rf server client authority logs cache outputs setup.done \
    96         server.template msva.gnupghome \
     110        server.template imposter.template msva.gnupghome \
    97111        */*.pgp */*.gpg */*.gpg~ */*.pem */*.key authority.template \
    98         client.template server.uid *.lock tests/*/*.pem
     112        client.template client.uid server.uid *.lock tests/*/*.pem
    99113        rmdir imposter rogueca || true
    100114
Note: See TracChangeset for help on using the changeset viewer.