From 612c49cc74998f1fcff39b1cfde6a01f3c18c069 Mon Sep 17 00:00:00 2001 From: Waldo Bastian Date: Fri, 19 Jan 2007 01:14:02 +0000 Subject: Added support for LSB's TET test framework Renamed tests to more * Added support for LSB's TET test framework * Renamed tests to more meaningful names (see ChangeLog for details) --- menu/tests/tet_menutest | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100755 menu/tests/tet_menutest (limited to 'menu/tests/tet_menutest') diff --git a/menu/tests/tet_menutest b/menu/tests/tet_menutest new file mode 100755 index 0000000..1aae67e --- /dev/null +++ b/menu/tests/tet_menutest @@ -0,0 +1,39 @@ +#!/bin/bash +TET_RUN="asdf" +export MENUTESTDIR="${MENUTESTDIR:-/tmp/menutest}" +. menutest +# hack, figure out the var to use here + +tpstart() { + tet_infoline "$*" + FAIL=N +} + +tet_startup='' +tet_cleanup='' +declare -i count=1 +iclist='' +echo $TESTS +for TESTCASE in ${TESTS}; do + [ ! -e "tests/${TESTCASE}/test" ] && continue; + # this basically curries the arg to run_test. + eval "tp${count}() { + . tests/${TESTCASE}/test + tpstart \"$(. tests/${TESTCASE}/test; echo ${TEST_PURPOSE-none stated})\"; + if ! run_test tests/\"$TESTCASE\"; then + tet_result FAIL; + else + tet_result PASS; + fi + set +x + }"; + iclist="${iclist} ic${count}" + eval "ic${count}=tp${count}" + # force subshelling, so that it doesn't pull a die on us + ((count+=1)) +done +tet_iclist=iclist +. /opt/lsb-tet3-lite/lib/posix_sh/tcm.sh +tet_outputline 100 "xdg menu test" +tet_tcm_main $tet_iclist + -- cgit v1.2.3-70-g09d2