mirror of
https://github.com/brl/mutter.git
synced 2024-11-12 17:27:03 -05:00
cogl/tests: Run tests supports both test names and files as parameter
Make run-tests.sh to support as arguments both an unit-tests file or test names This allows to run a test with this script without having to create fake files. https://gitlab.gnome.org/GNOME/mutter/merge_requests/442
This commit is contained in:
parent
a934fa07b8
commit
2b8f5e65b6
@ -14,7 +14,7 @@ shift
|
|||||||
TEST_BINARY=$1
|
TEST_BINARY=$1
|
||||||
shift
|
shift
|
||||||
|
|
||||||
UNIT_TESTS_FILE=$1
|
UNIT_TESTS=$1
|
||||||
shift
|
shift
|
||||||
|
|
||||||
. "$ENVIRONMENT_CONFIG"
|
. "$ENVIRONMENT_CONFIG"
|
||||||
@ -103,12 +103,16 @@ fi
|
|||||||
echo ""
|
echo ""
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
if [ ! -f "$UNIT_TESTS_FILE" ]; then
|
if [ -z "$UNIT_TESTS" ]; then
|
||||||
echo Missing unit-tests file
|
echo Missing unit-tests file or names
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for test in $(cat "$UNIT_TESTS_FILE")
|
if [ -f "$UNIT_TESTS" ]; then
|
||||||
|
UNIT_TESTS="$(cat $UNIT_TESTS)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
for test in $UNIT_TESTS
|
||||||
do
|
do
|
||||||
export COGL_DEBUG=
|
export COGL_DEBUG=
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user