summaryrefslogtreecommitdiffstats
path: root/menu/tests/tet_menutest
diff options
context:
space:
mode:
authorWaldo Bastian <waldo.bastian@intel.com>2007-01-19 01:14:02 +0000
committerWaldo Bastian <waldo.bastian@intel.com>2007-01-19 01:14:02 +0000
commit612c49cc74998f1fcff39b1cfde6a01f3c18c069 (patch)
tree1829be49189e6858afee76509845ad31f0ee6b74 /menu/tests/tet_menutest
parent7d249792235d0f3b69f833f89bef545a367f0b6b (diff)
downloadxdg-specs-612c49cc74998f1fcff39b1cfde6a01f3c18c069.tar.xz
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)
Diffstat (limited to 'menu/tests/tet_menutest')
-rwxr-xr-xmenu/tests/tet_menutest39
1 files changed, 39 insertions, 0 deletions
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
+