Improve tests and change tests/ directory layout
[lttng-tools.git] / tests / ust / run-ust-global-tests.sh
diff --git a/tests/ust/run-ust-global-tests.sh b/tests/ust/run-ust-global-tests.sh
new file mode 100755 (executable)
index 0000000..96c1f9e
--- /dev/null
@@ -0,0 +1,44 @@
+#!/bin/bash
+
+SESSIOND_BIN="lttng-sessiond"
+CURDIR=$(dirname $0)
+TESTDIR=$CURDIR/..
+
+source $TESTDIR/utils.sh
+
+tmpdir=`mktemp -d`
+tests=( $CURDIR/ust_global_event_basic $CURDIR/ust_global_all_events_basic )
+exit_code=0
+
+function start_tests ()
+{
+    for bin in ${tests[@]};
+    do
+               if [ ! -e $bin ]; then
+                       echo -e "$bin not found, passing"
+                       continue
+               fi
+
+               start_sessiond
+
+        ./$bin $tmpdir
+        # Test must return 0 to pass.
+        if [ $? -ne 0 ]; then
+            exit_code=1
+                       stop_sessiond
+            break
+        fi
+               stop_sessiond
+    done
+
+       # Cleaning up
+       rm -rf $tmpdir
+}
+
+echo -e "\n-------------------------------------------"
+echo -e "UST tracer - Global domain (LTTNG_DOMAIN_UST)"
+echo -e "---------------------------------------------"
+
+start_tests
+
+exit $exit_code
This page took 0.02505 seconds and 4 git commands to generate.