aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorKonrad Scherer <Konrad.Scherer@windriver.com>2010-07-30 13:08:31 -0400
committerKonrad Scherer <Konrad.Scherer@windriver.com>2010-07-30 13:19:05 -0400
commit7c9033fc63bd40e9cf0562ad5322274c08d3b39f (patch)
tree9537370798b23a9ecd6aba445dd147918ce200f4 /test
parent51591a9413959ca2dda5966f5402d431adc3fb50 (diff)
downloadpseudo-7c9033fc63bd40e9cf0562ad5322274c08d3b39f.tar.gz
pseudo-7c9033fc63bd40e9cf0562ad5322274c08d3b39f.tar.bz2
pseudo-7c9033fc63bd40e9cf0562ad5322274c08d3b39f.zip
Add basic test harness to test pseudo
CQ: WIND00225366 A simple test harness that runs all the scripts in the test directory. Each test script is run inside pseudo and uses exit status to report back whether the test was successful. The script uses the build executables, not the installed ones and each test run starts with an empty database.
Diffstat (limited to 'test')
-rwxr-xr-xtest/test-dir-move.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/test-dir-move.sh b/test/test-dir-move.sh
new file mode 100755
index 0000000..37182f3
--- /dev/null
+++ b/test/test-dir-move.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+mkdir d1
+touch d1/f1
+mv d1 d2
+fileuid=`\ls -n1 d2/f1 | awk '{ print $3 }'`
+if [ "$fileuid" == "$UID" ]
+then
+ #echo "Passed."
+ rm -rf d2
+ exit 0
+fi
+rm -rf d2
+#echo "Failed"
+exit 1