Changeset ae38a49 in mod_gnutls for test


Ignore:
Timestamp:
Jul 2, 2015, 11:13:59 AM (4 years ago)
Author:
Thomas Klute <thomas2.klute@…>
Branches:
debian/master, debian/stretch-backports, jessie-backports, master, upstream
Children:
7adbcd7
Parents:
e021722
Message:

Test suite: Use PID file to manage MSVA process

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/runtests

    re021722 rae38a49  
    11#!/bin/bash
    22
    3 # Author: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
     3# Authors:
     4# Daniel Kahn Gillmor <dkg@fifthhorseman.net>
     5# Thomas Klute <thomas2.klute@uni-dortmund.de>
    46
    57set -e
     
    2426fi
    2527
    26 function stop_msva() {
    27     kill %1
     28function stop_msva()
     29{
     30    kill_by_pidfile "${msva_pidfile}"
     31    unset msva_pidfile
    2832}
    2933
     
    108112
    109113if [ -n "${USE_MSVA}" ]; then
    110     GNUPGHOME=msva.gnupghome MSVA_KEYSERVER_POLICY=never monkeysphere-validation-agent &
     114    msva_pidfile="$(mktemp mod_gnutls_test-XXXXXX.pid)"
     115    GNUPGHOME=msva.gnupghome MSVA_KEYSERVER_POLICY=never run_with_pidfile "${msva_pidfile}" monkeysphere-validation-agent &
    111116    trap stop_msva EXIT
    112117
     
    189194if [ -n "${USE_MSVA}" ]; then
    190195    stop_msva
    191 fi
     196    # Without explicitly resetting the trap function, it would be
     197    # called again on exit. Of course, we could just not stop MSVA and
     198    # let the trap do the work, but I think the code is easier to
     199    # understand like this.
     200    trap - EXIT
     201fi
Note: See TracChangeset for help on using the changeset viewer.