Browse Source

Hook merge rule tests into the automake TAP driver

Andrew Young 8 years ago
parent
commit
e832e6c44e
1 changed files with 17 additions and 9 deletions
  1. 17 9
      tests/Makefile.am

+ 17 - 9
tests/Makefile.am

@@ -1,16 +1,24 @@
 ## Process this file with automake to produce Makefile.in
-TESTS = check_org-merge-driver
+TESTS = check_org-merge-driver check_merge_rules.sh
+
+## Check Unit Tests
 check_PROGRAMS = check_org-merge-driver
 
-## Check Parser
 check_org_merge_driver_SOURCES = \
-	check_org-merge-driver.c \
-	check_parser.c \
-	check_list_diff.c \
-	check_doc_merge.c \
-	check_org_elements.c \
-	check_merge_print.c
+	check_org-merge-driver.c
 
 check_org_merge_driver_CFLAGS = @CHECK_CFLAGS@ -I$(top_srcdir)/src \
-	-I$(top_srcdir)/gnulib/lib 
+	-I$(top_srcdir)/gnulib/lib
 check_org_merge_driver_LDADD = @CHECK_LIBS@ $(top_srcdir)/gnulib/lib/libgnu.a
+
+## Merge Rule Tests
+#check_org-merge-driver
+TEST_EXTENSIONS = .sh
+SH_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
+                       $(top_srcdir)/config/tap-driver.sh
+
+# retangle the test files if the tests are updated
+check_merge_rules.sh : test.org
+	echo "Must re-tangle files"
+	emacs --batch --file test.org --eval "(org-babel-tangle)"
+	chmod 700 check_merge_rules.sh # make the generated test script executable