Changeset 33af2b7 in mod_gnutls for test/softhsm.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/softhsm.bash

    re24eed6 r33af2b7  
    9595softhsm_lib="${softhsm_prefix}/lib/softhsm/libsofthsm.so"
    9696
    97 # provided SOFTHSM_CONF always takes precedence, otherwise try to
    98 # guess based on testdir
     97# fail if SOFTHSM_CONF is not set
    9998if [ -z "${SOFTHSM_CONF}" ]; then
    100     if [ -n "${testdir}" ]; then
    101         export SOFTHSM_CONF="$(realpath ${testdir}/softhsm.conf)"
    102     else
    103         echo "ERROR: Neither SOFTHSM_CONF nor testdir set!" 2>&1
    104         exit 1
    105     fi
     99    echo "ERROR: SOFTHSM_CONF not set!" 1>&2
     100    exit 1
    106101else
    107102    export SOFTHSM_CONF
     
    116111cert_label="certificate"
    117112
    118 # The Apache/SoftHSM configuration mixes up directories, so generate
    119 # softhsm.conf with an absolute path to the token database if a
    120 # template is present. Generating it on every run avoids problems if
    121 # the source tree was moved.
    122 if [ -e "${SOFTHSM_CONF}.in" ]; then
    123     cat "${SOFTHSM_CONF}.in" | sed "s,__DIR__,$(realpath $(dirname ${SOFTHSM_CONF}))," \
    124         >"${SOFTHSM_CONF}"
    125 fi
    126 
    127113if [ "${init}" = "true" ]; then
    128114    prepare_token "${token_label}" "${2}" "${3}"
Note: See TracChangeset for help on using the changeset viewer.