]> git.saurik.com Git - apt.git/commitdiff
Add a very simple test runner
authorDavid Kalnischkies <kalnischkies@gmail.com>
Thu, 26 Nov 2009 21:24:03 +0000 (22:24 +0100)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Thu, 26 Nov 2009 21:24:03 +0000 (22:24 +0100)
test/libapt/run-tests.sh [new file with mode: 0755]

diff --git a/test/libapt/run-tests.sh b/test/libapt/run-tests.sh
new file mode 100755 (executable)
index 0000000..365bbe2
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+echo "Compiling the tests ..."
+make
+echo "Running all testcases ..."
+PATH=$(pwd)/../../build/bin
+for testapp in $(/bin/ls ${PATH}/*_libapt_test)
+do
+       echo -n "Testing with \033[1;35m$(/usr/bin/basename ${testapp})\033[0m ... "
+       LD_LIBRARY_PATH=${PATH} ${testapp} && echo "\033[1;32mOKAY\033[0m" || echo "\033[1;31mFAILED\033[0m"
+done