summaryrefslogtreecommitdiff
path: root/tests/Makefile.am
diff options
context:
space:
mode:
authorHans Ulrich Niedermann <gp@n-dimensional.de>2006-09-19 02:18:28 +0000
committerHans Ulrich Niedermann <gp@n-dimensional.de>2006-09-19 02:18:28 +0000
commit3a929bdabfaf20eb875a0917dc60ab1f69738edf (patch)
treea4622db2089e2baefe160df0638522cdcfeaa3aa /tests/Makefile.am
parentacd088a6e94b54060971e6e14e3f7f96f4aed2f7 (diff)
downloadlibgphoto2-3a929bdabfaf20eb875a0917dc60ab1f69738edf.tar.gz
do less 'make check' local test install hacks -> do 'make installcheck' instead
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@9187 67ed7778-7388-44ab-90cf-0a291f65f57c
Diffstat (limited to 'tests/Makefile.am')
-rw-r--r--tests/Makefile.am25
1 files changed, 24 insertions, 1 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 28226fa2f..193203d8a 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -8,7 +8,30 @@ check_SCRIPTS = \
EXTRA_DIST = \
check-camera-list.in
-TESTS = $(check_SCRIPTS)
+# TESTS = $(check_SCRIPTS)
+
+# FIXME: Only run this if not cross-compiling
+installcheck-local: test-camera-list
+ @export CAMLIBS="$(DESTDIR)$(camlibdir)"; \
+ total=0; failed=0; success=0; \
+ echo "Running \"installcheck\" test cases..."; \
+ for script in test-camera-list; 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
CLEANFILES = $(check_SCRIPTS)