]> rtime.felk.cvut.cz Git - frescor/frsh-forb.git/commitdiff
fwp: Add skeleton of admctrl test
authorMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 29 Mar 2011 10:26:49 +0000 (12:26 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 29 Mar 2011 10:26:49 +0000 (12:26 +0200)
src/fwp/fwp/mngr/test/Makefile [new file with mode: 0644]
src/fwp/fwp/mngr/test/Makefile.omk [new file with mode: 0644]
src/fwp/fwp/mngr/test/adm-test.sh [new file with mode: 0755]
src/fwp/fwp/mngr/test/wvtest.sh [new symlink]

diff --git a/src/fwp/fwp/mngr/test/Makefile b/src/fwp/fwp/mngr/test/Makefile
new file mode 100644 (file)
index 0000000..b22a357
--- /dev/null
@@ -0,0 +1,14 @@
+# Generic directory or leaf node makefile for OCERA make framework
+
+ifndef MAKERULES_DIR
+MAKERULES_DIR := $(shell ( old_pwd="" ;  while [ ! -e Makefile.rules ] ; do if [ "$$old_pwd" = `pwd`  ] ; then exit 1 ; else old_pwd=`pwd` ; cd -L .. 2>/dev/null ; fi ; done ; pwd ) )
+endif
+
+ifeq ($(MAKERULES_DIR),)
+all : default
+.DEFAULT::
+       @echo -e "\nThe Makefile.rules has not been found in this or partent directory\n"
+else
+include $(MAKERULES_DIR)/Makefile.rules
+endif
+
diff --git a/src/fwp/fwp/mngr/test/Makefile.omk b/src/fwp/fwp/mngr/test/Makefile.omk
new file mode 100644 (file)
index 0000000..4cd3b29
--- /dev/null
@@ -0,0 +1,3 @@
+CFLAGS += -DWVTEST_CONFIGURED
+
+wvtest_SCRIPTS += adm-test.sh
diff --git a/src/fwp/fwp/mngr/test/adm-test.sh b/src/fwp/fwp/mngr/test/adm-test.sh
new file mode 100755 (executable)
index 0000000..624bfca
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+. $(dirname $0)/wvtest.sh
+
+cat > expected <<EOF
+contract #12345 AC_VI
+contract #23423 AC_VO
+contract #54623 AC_BE
+ACCEPTED
+EOF
+
+WVPASS sh -c "fwp-admctrl-test > actual"
+
+WVPASS diff -u expected actual
+
diff --git a/src/fwp/fwp/mngr/test/wvtest.sh b/src/fwp/fwp/mngr/test/wvtest.sh
new file mode 120000 (symlink)
index 0000000..ea46621
--- /dev/null
@@ -0,0 +1 @@
+..//../../../wvtest.sh
\ No newline at end of file