Skip to content

Commit 403c175

Browse files
andrewgregoryallanmcrae
authored andcommitted
integrate tests with automake
Signed-off-by: Andrew Gregory <[email protected]> Signed-off-by: Allan McRae <[email protected]>
1 parent 2282210 commit 403c175

File tree

5 files changed

+960
-21
lines changed

5 files changed

+960
-21
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,5 @@ pacman-*.tar.gz
2020
root
2121
stamp-h1
2222
tags
23+
*.log
24+
*.trs

Makefile.am

+17-21
Original file line numberDiff line numberDiff line change
@@ -23,29 +23,25 @@ dist_pkgdata_DATA = \
2323
proto/proto.install \
2424
proto/ChangeLog.proto
2525

26-
# run the pactest test suite and vercmp tests
27-
check-local: test-pacman test-pacsort test-vercmp test-parseopts
28-
29-
test-pacman: test/pacman src/pacman
30-
$(PYTHON) $(top_srcdir)/test/pacman/pactest.py --debug=1 \
26+
TESTS = test/scripts/parseopts_test.sh \
27+
test/scripts/human_to_size_test.sh \
28+
test/util/pacsorttest.sh \
29+
test/util/vercmptest.sh
30+
include $(top_srcdir)/test/pacman/tests/TESTS
31+
32+
TEST_EXTENSIONS = .py
33+
AM_TESTS_ENVIRONMENT = \
34+
PMTEST_UTIL_DIR=$(top_srcdir)/src/util/; export PMTEST_UTIL_DIR; \
35+
PMTEST_SCRIPTLIB_DIR=$(top_srcdir)/scripts/library/; export PMTEST_SCRIPTLIB_DIR;
36+
TEST_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
37+
$(top_srcdir)/build-aux/tap-driver.sh
38+
PY_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
39+
$(top_srcdir)/build-aux/tap-driver.sh
40+
PY_LOG_COMPILER = test/pacman/pactest.py
41+
AM_PY_LOG_FLAGS = \
3142
--scriptlet-shell $(SCRIPTLET_SHELL) \
3243
--ldconfig $(LDCONFIG) \
33-
-p $(top_builddir)/src/pacman/pacman \
34-
$(top_srcdir)/test/pacman/tests/*.py
35-
36-
test-pacsort: test/util src/util
37-
$(BASH_SHELL) $(top_srcdir)/test/util/pacsorttest.sh \
38-
$(top_builddir)/src/util/pacsort
39-
40-
test-vercmp: test/util src/util
41-
$(BASH_SHELL) $(top_srcdir)/test/util/vercmptest.sh \
42-
$(top_builddir)/src/util/vercmp
43-
44-
test-parseopts: test/scripts scripts
45-
$(BASH_SHELL) $(top_srcdir)/test/scripts/parseopts_test.sh \
46-
$(top_srcdir)/scripts/library/parseopts.sh
47-
$(BASH_SHELL) $(top_srcdir)/test/scripts/human_to_size_test.sh \
48-
$(top_srcdir)/scripts/library/human_to_size.sh
44+
-p $(top_builddir)/src/pacman/pacman
4945

5046
# create the pacman DB and cache directories upon install
5147
install-data-local:

0 commit comments

Comments
 (0)