tests: Allow weston-tests-env to process different test types
authorU. Artie Eoff <ullysses.a.eoff@intel.com>
Fri, 7 Dec 2012 21:50:31 +0000 (13:50 -0800)
committerKristian Høgsberg <krh@bitplanet.net>
Tue, 11 Dec 2012 20:30:05 +0000 (15:30 -0500)
The weston-tests-env script needs to be able to handle weston
test extension style tests as well as module style tests.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
tests/weston-tests-env [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 27b40de..1f8281f
@@ -1,4 +1,12 @@
 #!/bin/sh
 
-../src/weston --modules=$abs_builddir/.libs/${1/.la/.so}
+WESTON=$abs_builddir/../src/weston
 
+case $1 in
+       *.la|*.so)
+               $WESTON --modules=$abs_builddir/.libs/${1/.la/.so}
+               ;;
+       *)
+               WESTON_TEST_CLIENT_PATH=$abs_builddir/$1 $WESTON \
+                       --modules=$abs_builddir/.libs/weston-test.so
+esac