summaryrefslogtreecommitdiffstats
path: root/run_test_suite
diff options
context:
space:
mode:
authorTails developers <amnesia@boum.org>2013-03-27 13:08:10 +0100
committerTails developers <amnesia@boum.org>2013-03-27 13:08:10 +0100
commit375216ce4041a025d8a0490d1fbfe2dc7dc6c455 (patch)
tree3f3a6e4153d36a8fe2cf56b4c4637cc8e3cc5aec /run_test_suite
parent98d4fcbefbc257e51bba3336e29af455fb3136af (diff)
Reorganise features/, unifying both test suites.
Now all .feature:s reside directly in the root of features/, and they are differentiated with tags: source tests are tagged '@source' and product (i.e. Tails ISO image) tests are tagged '@product'. These tags then set up the appropriate environment on a feature-by-feature basis.
Diffstat (limited to 'run_test_suite')
-rwxr-xr-xrun_test_suite31
1 files changed, 14 insertions, 17 deletions
diff --git a/run_test_suite b/run_test_suite
index 567c393..5a717d3 100755
--- a/run_test_suite
+++ b/run_test_suite
@@ -7,11 +7,11 @@ set -e
NAME=$(basename ${0})
usage() {
- echo "Usage: $NAME [OPTION]... ISO [FEATURE]...
+ echo "Usage: $NAME [OPTION]... [FEATURE]...
Tests the FEATUREs (all by default) of ISO. Note that this command must be run
from the Tails source directory.
-Options:
+Options for '@product' features:
--capture=FILE Captures the test session into FILE using VP8 encoding.
Requires ffmpeg and libvpx1.
--keep-snapshots Don't ever delete the background snapshots. This can a big
@@ -23,8 +23,11 @@ Options:
--view Shows the test session in a windows. Requires x11vnc
and xtightvncviewer.
--vnc-server-only Starts a VNC server for the test session. Requires x11vnc.
- --newest-iso Omits the ISO argument; instead we use the ISO image
- with most recent mtime in the current directory
+ --iso IMAGE Test all '@product' features with IMAGE.
+ --newest-iso Like above, but we use the ISO image with most recent
+ mtime in the current directory
+
+Note that '@source' features has no relevant options.
"
}
@@ -92,7 +95,7 @@ capture_session() {
unset CAPTURE_FILE VNC_VIEWER VNC_SERVER
SHORTOPTS="a:c"
-LONGOPTS="view,vnc-server-only,capture:,help,temp-dir:,newest-iso:,keep-snapshots"
+LONGOPTS="view,vnc-server-only,capture:,help,temp-dir:,newest-iso:,keep-snapshots,iso:"
OPTS=$(getopt -o $SHORTOPTS --longoptions $LONGOPTS -n "${NAME}" -- "$@")
eval set -- "$OPTS"
while [ $# -gt 0 ]; do
@@ -116,6 +119,10 @@ while [ $# -gt 0 ]; do
shift
export TEMP_DIR="$(readlink -f $1)"
;;
+ --iso)
+ shift
+ export ISO="$(readlink -f $1)"
+ ;;
--newest-iso)
NEWEST_ISO=yes
unset ISO
@@ -126,22 +133,12 @@ while [ $# -gt 0 ]; do
;;
--)
shift
- if [ -z "${NEWEST_ISO}" ]; then
- if [ -n "$1" ]; then
- export ISO="$(readlink -f $1)"
- shift
- fi
- fi
break
;;
esac
shift
done
-if [ -z "${NEWEST_ISO}" ] && [ -z "${ISO}" ]; then
- error "No ISO provided and --newest-iso not given. Aborting..."
-fi
-
for dep in git libvirt-bin libvirt-dev virt-viewer libsikuli-script-java \
libxslt1-dev libxml2-dev tcpdump xvfb graphicsmagick-imagemagick-compat; do
check_dependency "${dep}"
@@ -166,7 +163,7 @@ export DISPLAY=${TARGET_DISPLAY}
. features/.rvmrc
check_dependency cucumber
if [ -z "${*}" ]; then
- cucumber --format ExtraHooks::Pretty features/cucumber/
+ cucumber --format ExtraHooks::Pretty features
else
- cucumber --format ExtraHooks::Pretty features/cucumber/step_definitions features/cucumber/support ${*}
+ cucumber --format ExtraHooks::Pretty features/step_definitions features/support ${*}
fi