summaryrefslogtreecommitdiff
path: root/tests/Makefile.am
diff options
context:
space:
mode:
authorMads Chr. Olesen <shiyee@shiyee.dk>2007-03-20 19:08:40 +0000
committerMads Chr. Olesen <shiyee@shiyee.dk>2007-03-20 19:08:40 +0000
commit987375545f1d3afea0bafb99f24154ad718dc32c (patch)
tree61a7528cd024fa541d92e22509d814023797e28f /tests/Makefile.am
parentfa7fb795f4c551ef48a727d649bf9a5292710182 (diff)
downloadtelepathy-glib-987375545f1d3afea0bafb99f24154ad718dc32c.tar.gz
move dbus tests to make check-extra
20070320190840-f3554-65bd93842e24dfbb462c66e487c28640319a439d.gz
Diffstat (limited to 'tests/Makefile.am')
-rw-r--r--tests/Makefile.am113
1 files changed, 77 insertions, 36 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 1b37eb1fc..aa737138f 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -36,7 +36,82 @@ AM_CFLAGS = $(ERROR_CFLAGS) @DBUS_CFLAGS@ @GLIB_CFLAGS@ @LOUDMOUTH_CFLAGS@ \
-I $(top_srcdir)/src -I $(top_builddir)/src
AM_LDFLAGS = @DBUS_LIBS@ @GLIB_LIBS@ @LOUDMOUTH_LIBS@
-TESTS = $(noinst_PROGRAMS) $(python_tests_shfiles)
+TESTS = $(noinst_PROGRAMS)
+TESTSEXTRA = $(python_tests_shfiles)
+
+check-extra: $(service_files)
+ @failed=0; all=0; xfail=0; xpass=0; skip=0; \
+ srcdir=$(srcdir); export srcdir; \
+ list='$(TESTSEXTRA)'; \
+ if test -n "$$list"; then \
+ for tst in $$list; do \
+ if test -f ./$$tst; then dir=./; \
+ elif test -f $$tst; then dir=; \
+ else dir="$(srcdir)/"; fi; \
+ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *" $$tst "*) \
+ xpass=`expr $$xpass + 1`; \
+ failed=`expr $$failed + 1`; \
+ echo "XPASS: $$tst"; \
+ ;; \
+ *) \
+ echo "PASS: $$tst"; \
+ ;; \
+ esac; \
+ elif test $$? -ne 77; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *" $$tst "*) \
+ xfail=`expr $$xfail + 1`; \
+ echo "XFAIL: $$tst"; \
+ ;; \
+ *) \
+ failed=`expr $$failed + 1`; \
+ echo "FAIL: $$tst"; \
+ ;; \
+ esac; \
+ else \
+ skip=`expr $$skip + 1`; \
+ echo "SKIP: $$tst"; \
+ fi; \
+ done; \
+ if test "$$failed" -eq 0; then \
+ if test "$$xfail" -eq 0; then \
+ banner="All $$all tests passed"; \
+ else \
+ banner="All $$all tests behaved as expected ($$xfail expected failures)"; \
+ fi; \
+ else \
+ if test "$$xpass" -eq 0; then \
+ banner="$$failed of $$all tests failed"; \
+ else \
+ banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \
+ fi; \
+ fi; \
+ dashes="$$banner"; \
+ skipped=""; \
+ if test "$$skip" -ne 0; then \
+ skipped="($$skip tests were not run)"; \
+ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$skipped"; \
+ fi; \
+ report=""; \
+ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+ report="Please report to $(PACKAGE_BUGREPORT)"; \
+ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$report"; \
+ fi; \
+ dashes=`echo "$$dashes" | sed s/./=/g`; \
+ echo "$$dashes"; \
+ echo "$$banner"; \
+ test -z "$$skipped" || echo "$$skipped"; \
+ test -z "$$report" || echo "$$report"; \
+ echo "$$dashes"; \
+ test "$$failed" -eq 0; \
+ else :; fi
+
run-with-tmp-session-bus.conf: run-with-tmp-session-bus.conf.in Makefile
@sed -e "s|\@abs_top_builddir\@|@abs_top_builddir@|" $< > $@
@@ -49,42 +124,8 @@ service_files = $(service_in_files:.service.in=.service)
BUILT_FILES = $(service_files) run-with-tmp-session-bus.conf
-EXTRA_DIST = $(service_in_files) $(service_files) run-with-tmp-session-bus.conf.in run-with-tmp-session-bus.sh dbustesting.py $(python_tests_pythonfiles) $(python_tests_shfiles)
+EXTRA_DIST =
CLEANFILES = $(BUILT_FILES)
-# Rule to make the service file with builddir expanded
-$(service_files): $(service_in_files) Makefile
- @sed -e "s|\@abs_top_builddir\@|@abs_top_builddir@|" $< > $@
-## copy tests to builddir so that generated tests and static tests
-## are all in one place.
-all-local: $(service_files)
- if ! (test $(srcdir) = . || test $(srcdir) -ef .) ; then \
- FILES='$(python_tests_pythonfiles) $(python_tests_shfiles)' ; \
- for F in $$FILES; do \
- SRC=$(srcdir)/$$F ; \
- DEST=$(top_builddir)/tests/$$F ; \
- echo '-- Copying python test file '$$F ; \
- cp -f $$SRC $$DEST || exit 1 ; \
- done ; \
- echo '-- Copying' $(top_srcdir)/tests/run-with-tmp-session-bus.sh 'to $(top_builddir)/tests directory' ; \
- cp -f $(top_srcdir)/tests/run-with-tmp-session-bus.sh $(top_builddir)/tests || exit 1 ; \
- echo '-- Copying' $(top_srcdir)/tests/dbustesting.py 'to $(top_builddir)/tests directory' ; \
- cp -f $(top_srcdir)/tests/dbustesting.py $(top_builddir)/tests || exit 1 ; \
- else \
- echo '-- No need to copy test data as srcdir = builddir' ; \
- fi ;
-
-# chmod u+w $(top_builddir)/test/data/valid-config-files/*.conf || exit 1
-
-## this doesn't clean generated test data files when srcdir=builddir
-clean-local:
- if test $(srcdir) != . ; then \
- FILES='$(python_tests_pythonfiles) $(python_tests_shfiles) run-with-tmp-session-bus.sh dbustesting.py dbustesting.pyc' ; \
- for F in $$FILES; do \
- DEST=$(top_builddir)/tests/$$F ; \
- echo '-- Deleting test file '$$F ; \
- rm -f $$DEST || exit 1 ; \
- done ; \
- fi