[mutter] cogl: Pass unit-tests file to run-tests.sh
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] cogl: Pass unit-tests file to run-tests.sh
- Date: Tue, 6 Nov 2018 18:05:39 +0000 (UTC)
commit 8894ec462a6756b3de46280f62c4951b15a92cde
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Tue May 22 15:52:37 2018 +0200
cogl: Pass unit-tests file to run-tests.sh
There are different unit-tests file generated containing lists of tests
the test-runner.sh should run. Running run-tests.sh read the unit-tests
in the current directory, which is inconvenient to do when using meson.
cogl/tests/conform/Makefile.am | 4 ++--
cogl/tests/run-tests.sh | 10 +++++++++-
cogl/tests/unit/Makefile.am | 2 +-
3 files changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/cogl/tests/conform/Makefile.am b/cogl/tests/conform/Makefile.am
index 2d284df53..c7ef1845e 100644
--- a/cogl/tests/conform/Makefile.am
+++ b/cogl/tests/conform/Makefile.am
@@ -135,7 +135,7 @@ test_conformance_LDADD += $(top_builddir)/cogl-path/libmutter-cogl-path-$(LIBMUT
test_conformance_LDFLAGS = -export-dynamic
test: wrappers
- @$(top_srcdir)/tests/run-tests.sh $(abs_builddir)/../config.env
$(abs_builddir)/test-conformance$(EXEEXT)
+ @$(top_srcdir)/tests/run-tests.sh $(abs_builddir)/../config.env
$(abs_builddir)/test-conformance$(EXEEXT) unit-tests
# XXX: we could prevent the conformance test suite from running
# by simply defining this variable conditionally
@@ -164,7 +164,7 @@ conform.test:
echo " GEN $@"; \
echo "[Test]" > $@.tmp; \
echo "Type=session" >> $@.tmp; \
- echo "Exec=sh -c \"cd $(libexecdir)/installed-tests/mutter-cogl/conform; ../run-tests.sh
../config.env ./test-conformance\"" >> $@.tmp; \
+ echo "Exec=sh -c \"cd $(libexecdir)/installed-tests/mutter-cogl/conform; ../run-tests.sh
../config.env ./test-conformance unit-tests\"" >> $@.tmp; \
mv $@.tmp $@
CLEANFILES = conform.test
diff --git a/cogl/tests/run-tests.sh b/cogl/tests/run-tests.sh
index 1e15fdd0c..2316c7b0d 100755
--- a/cogl/tests/run-tests.sh
+++ b/cogl/tests/run-tests.sh
@@ -14,6 +14,9 @@ shift
TEST_BINARY=$1
shift
+UNIT_TESTS_FILE=$1
+shift
+
. $ENVIRONMENT_CONFIG
set +m
@@ -98,7 +101,12 @@ fi
echo ""
echo ""
-for test in `cat unit-tests`
+if [ ! -f $UNIT_TESTS_FILE ]; then
+ echo Missing unit-tests file
+ exit 1
+fi
+
+for test in `cat $UNIT_TESTS_FILE`
do
export COGL_DEBUG=
diff --git a/cogl/tests/unit/Makefile.am b/cogl/tests/unit/Makefile.am
index f7833b7a5..62e1be412 100644
--- a/cogl/tests/unit/Makefile.am
+++ b/cogl/tests/unit/Makefile.am
@@ -68,7 +68,7 @@ test_unit_LDFLAGS = -export-dynamic
# XXX: uncomment when tests get fixed
#test: wrappers
-# @$(top_srcdir)/tests/run-tests.sh $(abs_builddir)/../config.env $(abs_builddir)/test-unit$(EXEEXT)
+# @$(top_srcdir)/tests/run-tests.sh $(abs_builddir)/../config.env $(abs_builddir)/test-unit$(EXEEXT)
unit-tests
# XXX: we could prevent the unit test suite from running
# by simply defining this variable conditionally
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]