Changeset 33af2b7 in mod_gnutls for test/test-24_pkcs11_cert.bash


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/test-24_pkcs11_cert.bash

    re24eed6 r33af2b7  
    11#!/bin/bash
    22
    3 testdir="./tests/24_pkcs11_cert"
    4 . ./softhsm.bash
     3testdir="$(dirname ${0})/tests/24_pkcs11_cert"
     4
     5# The Apache/SoftHSM configuration mixes up directories, so generate a
     6# config file with an absolute path to the token database from a
     7# template. Generating it on every run avoids problems if the source
     8# tree was moved.
     9tmp_softhsm_conf="$(mktemp mod_gnutls_test-XXXXXX.conf)"
     10function cleanup_tmpconf
     11{
     12    rm "${tmp_softhsm_conf}"
     13}
     14trap cleanup_tmpconf EXIT
     15
     16sed "s,__DIR__,$(realpath $(pwd))," \
     17    "${testdir}/softhsm.conf.in" \
     18    >"${tmp_softhsm_conf}"
     19export SOFTHSM_CONF="${tmp_softhsm_conf}"
     20echo "Generated temporary SoftHSM config ${tmp_softhsm_conf}:"
     21cat "${tmp_softhsm_conf}"
     22
     23. $(dirname ${0})/softhsm.bash
    524
    625set -e
    726
    8 make -f TestMakefile t-24
     27make -f $(dirname ${0})/TestMakefile t-24
     28
     29cleanup_tmpconf
     30trap - EXIT
Note: See TracChangeset for help on using the changeset viewer.