Changeset e3cbda4 in mod_gnutls for t/runtests


Ignore:
Timestamp:
Nov 16, 2013, 2:46:50 AM (6 years ago)
Author:
Daniel Kahn Gillmor <dkg@…>
Branches:
debian/master, debian/stretch-backports, jessie-backports, master, upstream
Children:
07889ab
Parents:
cf2b905
git-author:
Daniel Kahn Gillmor <dkg@…> (01/30/13 04:15:32)
git-committer:
Daniel Kahn Gillmor <dkg@…> (11/16/13 02:46:50)
Message:

MSVA: include in test framework

File:
1 edited

Legend:

Unmodified
Added
Removed
  • t/runtests

    rcf2b905 re3cbda4  
    88
    99BADVARS=0
    10 for v in TEST_HOST TEST_IP TEST_PORT TEST_QUERY_DELAY TEST_GAP; do
     10for v in TEST_HOST TEST_IP TEST_PORT TEST_QUERY_DELAY TEST_GAP MSVA_PORT; do
    1111    if [ ! -v "$v" ]; then
    1212        printf "You need to set the %s environment variable\n" "$v" >&2
     
    2424fi
    2525
     26function stop_msva() {
     27    kill %1
     28}
     29
    2630function apache_down_err() {
    2731    printf "FAILURE: %s\n" "$TEST_NAME"
     
    3337    printf "\nApache error logs:\n"
    3438    tail "../../logs/${TEST_NAME}.error.log"
     39    stop_msva
    3540}
    3641
     
    4146fi
    4247
     48GNUPGHOME=$(pwd)/msva.gnupghome MSVA_KEYSERVER_POLICY=never monkeysphere-validation-agent &
     49
     50trap stop_msva EXIT
     51
     52sleep "$TEST_GAP"
     53
     54printf "TESTING: initial MSVA verification\n"
     55MONKEYSPHERE_VALIDATION_AGENT_SOCKET="http://127.0.0.1:$MSVA_PORT" msva-query-agent https "$(cat client.uid)" x509pem client < client/x509.pem 
     56printf "\nSUCCESS: initial MSVA verification\n"
     57
    4358for t in $tests; do
     59    sleep "$TEST_GAP"
    4460    export TEST_NAME="$(basename "$t")"
    4561    output="../../outputs/${TEST_NAME}.output"
     
    5369    printf "TESTING: %s%s\n" "$TEST_NAME" "$EXPECTED_FAILURE"
    5470    trap apache_down_err EXIT
    55     /usr/sbin/apache2 -f "$(pwd)/apache.conf" -k start || [ -e fail.server ]
     71    MONKEYSPHERE_VALIDATION_AGENT_SOCKET="http://127.0.0.1:$MSVA_PORT" /usr/sbin/apache2 -f "$(pwd)/apache.conf" -k start || [ -e fail.server ]
    5672
    5773    if (sed "s/__HOSTNAME__/${TEST_HOST}/" < ./input && sleep "$TEST_QUERY_DELAY") | \
     
    7288    fi
    7389    /usr/sbin/apache2 -f "$(pwd)/apache.conf" -k stop || [ -e fail.server ]
    74     trap - EXIT
     90    trap stop_msva EXIT
    7591    printf "SUCCESS: %s\n" "$TEST_NAME"
    7692    cd ../..
    77     sleep "$TEST_GAP"
    7893done
     94
     95stop_msva
Note: See TracChangeset for help on using the changeset viewer.