Changeset e78bc78 in mod_gnutls


Ignore:
Timestamp:
Jan 26, 2015, 10:43:35 AM (3 years ago)
Author:
Thomas Klute <thomas2.klute@…>
Branches:
debian/master, debian/stretch-backports, jessie-backports, master, upstream
Children:
302965e
Parents:
87208b5
Message:

Adjust test tools and documentation to split tests and moved test dir

Paths, descriptions and an error message were adjusted in README and
setup. A bigger change was needed in the "newtest" script, which now
creates a script for "make check" to call. This script is not
automatically added to the list of tests in Makefile.am, but the user is
advised to add it when ready.

Location:
test
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • test/README

    r87208b5 re78bc78  
    1111=================
    1212
    13 from the top level of the source, or from t/ (where this README is),
     13from the top level of the source, or from test/ (where this README is),
    1414just run:
    1515
    1616 make check
    1717
    18 from t/ you can also run specific tests (identified by number) with:
     18from test/ you can also run specific tests (identified by number) with:
    1919
    2020 make -f TestMakefile t-3
     
    2929Please add more tests!
    3030
    31 The simplest way to add a test is (from t/):
     31The simplest way to add a test is (from test/):
    3232
    3333 ./newtest
    3434
    35 This will prompt you for a simple name for the test and then copy a starting
    36 set of files from tests/00_basic.
     35This will prompt you for a simple name for the test and then copy a
     36starting set of files from tests/00_basic, and create a script which
     37you can add to TESTS in Makefile.am when your test is ready for
     38inclusion in the test suite.
    3739
    3840
     
    4042==============
    4143
    42 Each test consists of a directory in t/tests/, which will cause the
     44Each test consists of a directory in test/tests/, which will cause the
    4345test suite to spin up an isolated apache instance and try to connect
    4446to it with gnutls-cli and make a simple HTTP 1.1 request.
  • test/newtest

    r87208b5 re78bc78  
    1010
    1111    tname="${TEST_NAME// /_}"
    12     newname="$(printf "%02d_%s" "$(( $(ls -d tests/* | sed 's|^[^/]*/\([0-9]*\)_.*|\1|' | sort -n | tail -n 1 | sed s/^0//) + 1 ))" "$tname")"
     12    newnum="$(( $(ls -d tests/* | sed 's|^[^/]*/\([0-9]*\)_.*|\1|' | sort -n | tail -n 1 | sed s/^0//) + 1))"
     13    newname="$(printf "%02d_%s" "${newnum}" "$tname")"
    1314
    1415    read -p "your new test will be named tests/$newname.  OK [Y/n]? "
     
    2021cp -a tests/00_basic "tests/$newname"
    2122
    22 printf "You can now edit %s\n" "$newname"
     23# create run script for make check
     24newscript="test-${newname}.bash"
     25echo '#!/bin/bash' >"${newscript}"
     26echo "make -f TestMakefile t-${newnum}" >>"${newscript}"
     27chmod a+x "${newscript}"
     28
     29echo "You can now edit ${newname}."
     30echo "When ready, add ${newscript} to TESTS in Makefile.am."
  • test/setup

    r87208b5 re78bc78  
    1313
    1414if [ . != "$(dirname "$0")" ]; then
    15     printf "You should only run this mod-gnutls test suite from the t/ directory of the mod_gnutls source.\n" >&2
     15    printf "You should only run this mod-gnutls test suite from the test/ directory of the mod_gnutls source.\n" >&2
    1616    exit 1
    1717fi
Note: See TracChangeset for help on using the changeset viewer.