[vala/staging: 2/3] tests: Compile and run every test on its own
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging: 2/3] tests: Compile and run every test on its own
- Date: Tue, 8 Mar 2016 16:37:48 +0000 (UTC)
commit 4950463a3bf535ec1fd6e623b5a43687b87429e1
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Wed Feb 10 10:19:27 2016 +0100
tests: Compile and run every test on its own
tests/Makefile.am | 4 +++-
tests/testrunner.sh | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 831da91..e7b7c9f 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -214,7 +214,9 @@ TESTS = \
$(NULL)
check-TESTS: $(TESTS)
- @EXEEXT=$(EXEEXT) EXEEXT=$(EXEEXT) CFLAGS='$(CFLAGS)' CPPFLAGS='$(CPPFLAGS)' LDFLAGS='$(LDFLAGS)'
$(srcdir)/testrunner.sh $(TESTS)
+ for f in $(filter %.test %.vala,$^); do \
+ EXEEXT=$(EXEEXT) CFLAGS='$(CFLAGS)' CPPFLAGS='$(CPPFLAGS)' LDFLAGS='$(LDFLAGS)'
$(srcdir)/testrunner.sh $$f || exit 1; \
+ done
EXTRA_DIST = \
testrunner.sh \
diff --git a/tests/testrunner.sh b/tests/testrunner.sh
index a96b5ac..e075835 100755
--- a/tests/testrunner.sh
+++ b/tests/testrunner.sh
@@ -207,7 +207,9 @@ cat << "EOF" >> main.vala
}
EOF
-cat $SOURCEFILES >> main.vala
+if [ -n "$SOURCEFILES" ]; then
+ cat $SOURCEFILES >> main.vala
+fi
if $VALAC $VALAFLAGS -o test$EXEEXT $([ -z "$PACKAGES" ] || echo $PACKAGES | xargs -n 1 echo -n " --pkg")
main.vala &>log; then
echo -e "\033[0;32mOK\033[m"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]