Implements a simple mechanism to allow tests to customize the configuration. Just place a <test>.ini file at the same location as the test itself. If no configuration file is found, then no configuration will be used (i.e. --no-config is specified.)
Signed-off-by: Bryce Harrington <[email protected]> --- tests/weston-tests-env | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/weston-tests-env b/tests/weston-tests-env index 4d9ba88..070c686 100755 --- a/tests/weston-tests-env +++ b/tests/weston-tests-env @@ -27,11 +27,18 @@ SHELL_PLUGIN=$MODDIR/desktop-shell.so TEST_PLUGIN=$MODDIR/weston-test.so XWAYLAND_PLUGIN=$MODDIR/xwayland.so +CONFIG_FILE="$abs_builddir/$(basename $TESTNAME).ini" +if [ -e "${CONFIG_FILE}" ]; then + CONFIG="--config=${CONFIG_FILE}" +else + CONFIG="--no-config" +fi + case $TESTNAME in *.la|*.so) WESTON_BUILD_DIR=$abs_builddir \ $WESTON --backend=$MODDIR/$BACKEND \ - --no-config \ + $CONFIG \ --shell=$SHELL_PLUGIN \ --socket=test-$(basename $TESTNAME) \ --modules=$MODDIR/${TESTNAME/.la/.so},$XWAYLAND_PLUGIN \ @@ -43,7 +50,7 @@ case $TESTNAME in WESTON_TEST_CLIENT_PATH=$abs_builddir/$TESTNAME $WESTON \ --socket=test-$(basename $TESTNAME) \ --backend=$MODDIR/$BACKEND \ - --no-config \ + $CONFIG \ --shell=$SHELL_PLUGIN \ --log="$SERVERLOG" \ --modules=$TEST_PLUGIN,$XWAYLAND_PLUGIN \ -- 1.9.1 _______________________________________________ wayland-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/wayland-devel
