summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-09-08 18:39:15 (EDT)
committer P. J. McDermott <pjm@nac.net>2012-09-08 18:39:15 (EDT)
commit16884e04da44ce279ec7eff8f919925ba63f9c55 (patch)
tree140b2461bd93c60f48ca648e6ae059341dac516e
parent44d879959e5f07b956f66a337059a412f9c4238d (diff)
Add support for unit tests to build system.
-rw-r--r--Makefile.in4
-rw-r--r--tests/Makefile.in33
2 files changed, 37 insertions, 0 deletions
diff --git a/Makefile.in b/Makefile.in
index 6a60981..db23443 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -87,6 +87,10 @@ uninstall:
@printf 'Uninstalling manual pages...\n'
@cd man && $(MAKE) $(MACROS) uninstall
+test:
+ @printf 'Running tests...\n'
+ @cd tests & $(MAKE) test
+
$(distdir):
@mkdir -p '$(distdir)'
@cp -pR $(distfiles) '$(distdir)'
diff --git a/tests/Makefile.in b/tests/Makefile.in
new file mode 100644
index 0000000..d686b66
--- /dev/null
+++ b/tests/Makefile.in
@@ -0,0 +1,33 @@
+# opkbuild
+# Makefile.in
+# Input Makefile for configure.
+#
+# Copyright (C) 2012 Patrick "P. J." McDermott
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+package_name = @package_name@
+package_version= @package_version@
+
+SH = @sh@
+
+.SUFFIXES:
+
+TESTS =
+
+test: $(TESTS)
+
+$(TESTS):
+ @printf ' SH tests/%s.sh\n' '$@'
+ @$(SH) 'tests/$@.sh'