summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorHans Ulrich Niedermann <gp@n-dimensional.de>2006-09-18 21:59:54 +0000
committerHans Ulrich Niedermann <gp@n-dimensional.de>2006-09-18 21:59:54 +0000
commit28d0ff97b227664c4dafc55ba94dde5e9589d95a (patch)
treec1711527346071e8ccf492280a4a2260fb3cfb87 /tests
parent832b92f0345dbe8b1cdc100f74d62ff408af4f59 (diff)
downloadlibgphoto2-28d0ff97b227664c4dafc55ba94dde5e9589d95a.tar.gz
move DDB tests from "check" target to "installcheck" target
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@9179 67ed7778-7388-44ab-90cf-0a291f65f57c
Diffstat (limited to 'tests')
-rw-r--r--tests/ddb/Makefile.am26
1 files changed, 24 insertions, 2 deletions
diff --git a/tests/ddb/Makefile.am b/tests/ddb/Makefile.am
index 5e7fa0f20..eb681f6bf 100644
--- a/tests/ddb/Makefile.am
+++ b/tests/ddb/Makefile.am
@@ -16,7 +16,29 @@ EXTRA_DIST = \
ddb-txt.l \
ddb-txt.y
-TESTS = $(check_SCRIPTS)
+# FIXME: Only run this if not cross-compiling
+installcheck-local: $(check_SCRIPTS)
+ @total=0; failed=0; success=0; \
+ echo "Running \"installcheck\" test cases..."; \
+ for script in $(check_SCRIPTS); do \
+ echo "Test case: $$script"; \
+ total="$$(expr $$total + 1)"; \
+ if "./$$script"; then \
+ echo "SUCCEEDED: $$script"; \
+ success="$$(expr $$success + 1)"; \
+ else \
+ s="$$?"; \
+ echo "FAILED (return code $$s): $$script"; \
+ failed="$$(expr $$failed + 1)"; \
+ fi; \
+ done; \
+ echo "Test summary: $$success succeeded, $$failed failed, $$total in total."; \
+ if test "$$failed" -gt 0; then \
+ echo "Error: One or more \"installcheck\" testcases have failed."; \
+ exit 1; \
+ fi
+
+# TESTS = $(check_SCRIPTS)
BUILT_SOURCES = $(flexbison_BUILT_SOURCES_)
CLEANFILES = $(check_SCRIPTS) $(BUILT_SOURCES) $(flexbison_CLEANFILES_) gp2ddb.txt
@@ -49,7 +71,7 @@ clean-local:
< "$<" > "$@"
@chmod +x $@
-check-ddb.sh: check-ddb.in $(top_builddir)/packaging/generic/print-camera-list
+check-ddb.sh: check-ddb.in $(top_builddir)/packaging/generic/print-camera-list test-ddb
$(top_builddir)/packaging/generic/print-camera-list:
cd $(top_builddir)/packaging/generic && $(MAKE) print-camera-list