[mutter] cogl/tests: Run tests supports both test names and files as parameter
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] cogl/tests: Run tests supports both test names and files as parameter
- Date: Thu, 2 May 2019 20:23:05 +0000 (UTC)
commit 2b8f5e65b64ab422c11b106744b4a0c92426d53f
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date: Thu Apr 4 19:59:50 2019 -0400
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
cogl/tests/run-tests.sh | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/cogl/tests/run-tests.sh b/cogl/tests/run-tests.sh
index 7b11a5e4d..eccfc05a6 100755
--- a/cogl/tests/run-tests.sh
+++ b/cogl/tests/run-tests.sh
@@ -14,7 +14,7 @@ shift
TEST_BINARY=$1
shift
-UNIT_TESTS_FILE=$1
+UNIT_TESTS=$1
shift
. "$ENVIRONMENT_CONFIG"
@@ -103,12 +103,16 @@ fi
echo ""
echo ""
-if [ ! -f "$UNIT_TESTS_FILE" ]; then
- echo Missing unit-tests file
+if [ -z "$UNIT_TESTS" ]; then
+ echo Missing unit-tests file or names
exit 1
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
export COGL_DEBUG=
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]