#### ADD TESTS HERE ####
-for bin in test_sessions;
+tests=( kernel/runall.sh ust/runall.sh tools/runall.sh )
+
+#### END TESTS HERE ####
+
+TESTDIR=$(dirname $0)
+
+source $TESTDIR/utils.sh
+
+## lttng-tools unit tests ##
+# No session daemon needed
+for bin in ${tests[@]};
do
+ if [ ! -e $bin ]; then
+ echo -e "$bin not found, passing"
+ continue
+ fi
+
./$bin
+ # Test must return 0 to pass.
+ if [ $? -ne 0 ]; then
+ echo -e '\e[1;31mFAIL\e[0m'
+ echo ""
+ exit 1
+ fi
done
-#### END TESTS HERE ####
-
-echo ""
+# All passed
exit 0