Changeset 302965e in mod_gnutls for test/runtests


Ignore:
Timestamp:
Feb 4, 2015, 11:02:20 AM (5 years ago)
Author:
Thomas Klute <thomas2.klute@…>
Branches:
debian/master, debian/stretch-backports, jessie-backports, master, upstream
Children:
9a06bbd
Parents:
e78bc78
git-author:
Thomas Klute <thomas2.klute@…> (02/04/15 10:32:39)
git-committer:
Thomas Klute <thomas2.klute@…> (02/04/15 11:02:20)
Message:

Run monkeysphere-validation-agent only for the test case using it

Running and testing monkeysphere-validation-agent for each test case
causes tests to fail when it is not available, and unnecessary delays
when it is. Test cases using monkeysphere-validation-agent must set the
USE_MSVA environment variable to enable it.

Note that TestMakefile? still calls the "pem2openpgp" tool from
Monkeysphere to set up PGP keys for the test environment.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/runtests

    re78bc78 r302965e  
    3737    printf "\nApache error logs:\n"
    3838    tail "../../logs/${TEST_NAME}.error.log"
    39     stop_msva
     39    if [ -n "${USE_MSVA}" ]; then
     40        stop_msva
     41    fi
    4042}
    4143
     
    4648fi
    4749
    48 GNUPGHOME=$(pwd)/msva.gnupghome MSVA_KEYSERVER_POLICY=never monkeysphere-validation-agent &
     50if [ -n "${USE_MSVA}" ]; then
     51    GNUPGHOME=$(pwd)/msva.gnupghome MSVA_KEYSERVER_POLICY=never monkeysphere-validation-agent &
     52    trap stop_msva EXIT
    4953
    50 trap stop_msva EXIT
     54    sleep "$TEST_GAP"
    5155
    52 sleep "$TEST_GAP"
    53 
    54 printf "TESTING: initial MSVA verification\n"
    55 MONKEYSPHERE_VALIDATION_AGENT_SOCKET="http://127.0.0.1:$MSVA_PORT" msva-query-agent https "$(cat client.uid)" x509pem client < client/x509.pem
    56 printf "\nSUCCESS: initial MSVA verification\n"
     56    printf "TESTING: initial MSVA verification\n"
     57    MONKEYSPHERE_VALIDATION_AGENT_SOCKET="http://127.0.0.1:$MSVA_PORT" msva-query-agent https "$(cat client.uid)" x509pem client < client/x509.pem
     58    printf "\nSUCCESS: initial MSVA verification\n"
     59fi
    5760
    5861for t in $tests; do
     
    6972    printf "TESTING: %s%s\n" "$TEST_NAME" "$EXPECTED_FAILURE"
    7073    trap apache_down_err EXIT
    71     MONKEYSPHERE_VALIDATION_AGENT_SOCKET="http://127.0.0.1:$MSVA_PORT" /usr/sbin/apache2 -f "$(pwd)/apache.conf" -k start || [ -e fail.server ]
     74    if [ -n "${USE_MSVA}" ]; then
     75        MONKEYSPHERE_VALIDATION_AGENT_SOCKET="http://127.0.0.1:$MSVA_PORT" /usr/sbin/apache2 -f "$(pwd)/apache.conf" -k start || [ -e fail.server ]
     76    else
     77        /usr/sbin/apache2 -f "$(pwd)/apache.conf" -k start || [ -e fail.server ]
     78    fi
    7279
    7380    if (sed "s/__HOSTNAME__/${TEST_HOST}/" < ./input && sleep "$TEST_QUERY_DELAY") | \
     
    8895    fi
    8996    /usr/sbin/apache2 -f "$(pwd)/apache.conf" -k stop || [ -e fail.server ]
    90     trap stop_msva EXIT
     97    if [ -n "${USE_MSVA}" ]; then
     98        trap stop_msva EXIT
     99    else
     100        trap - EXIT
     101    fi
    91102    printf "SUCCESS: %s\n" "$TEST_NAME"
    92103    cd ../..
    93104done
    94105
    95 stop_msva
     106if [ -n "${USE_MSVA}" ]; then
     107    stop_msva
     108fi
Note: See TracChangeset for help on using the changeset viewer.