Skip to content

Commit

Permalink
Switch from Kyua to automake's test execution
Browse files Browse the repository at this point in the history
  • Loading branch information
jmmv committed Dec 31, 2024
1 parent 7ce31c8 commit 5c75cb7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 29 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
*~
*_test
*.log
*.trs
Makefile
Makefile.in
aclocal.m4
admin/install-sh
admin/missing
admin/test-driver
autom4te.cache
config.log
config.status
Expand Down
33 changes: 8 additions & 25 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -80,45 +80,28 @@ endif

dist_pkgtests_DATA = Kyuafile

pkgtests_SCRIPTS = sysbuild_test
TESTS = sysbuild_test
check_SCRIPTS = sysbuild_test
CLEANFILES += sysbuild_test
EXTRA_DIST += sysbuild_test.sh
sysbuild_test: $(srcdir)/sysbuild_test.sh
$(AM_V_GEN)source=sysbuild_test.sh target=sysbuild_test; \
$(BUILD_TEST)

pkgtests_SCRIPTS += sysbuild4cron_test
TESTS += sysbuild4cron_test
check_SCRIPTS += sysbuild4cron_test
CLEANFILES += sysbuild4cron_test
EXTRA_DIST += sysbuild4cron_test.sh
sysbuild4cron_test: $(srcdir)/sysbuild4cron_test.sh
$(AM_V_GEN)source=sysbuild4cron_test.sh target=sysbuild4cron_test; \
$(BUILD_TEST)

if HAVE_KYUA
CHECK_ENVIRONMENT = PATH=$(abs_top_builddir):$${PATH}
CHECK_ENVIRONMENT += SYSBUILD_SHAREDIR="$(abs_top_srcdir)"
TESTS_ENVIRONMENT = PATH=$(abs_top_builddir):$${PATH}
TESTS_ENVIRONMENT += SYSBUILD_SHAREDIR="$(abs_top_srcdir)"
INSTALLCHECK_ENVIRONMENT = PATH=$(prefix)/bin:$${PATH}

check-local: check-kyua
PHONY_TARGETS += check-kyua
check-kyua:
$(CHECK_ENVIRONMENT) $(TESTS_ENVIRONMENT) \
$(KYUA) --config=none test \
--kyuafile='$(top_srcdir)/Kyuafile' --build-root='$(top_builddir)'

installcheck-local: installcheck-kyua
PHONY_TARGETS += installcheck-kyua
installcheck-kyua:
cd $(pkgtestsdir) && $(INSTALLCHECK_ENVIRONMENT) $(TESTS_ENVIRONMENT) \
$(KYUA) --config=none test
else # HAVE_KYUA
PHONY_TARGETS += missing-kyua
missing-kyua:
@echo "WARNING: kyua not found; no tests run"

check-local: missing-kyua
installcheck-local: missing-kyua
endif # HAVE_KYUA
installcheck-local:
$(MAKE) $(AM_MAKEFLAGS) check-TESTS TESTS_ENVIRONMENT="$(INSTALLCHECK_ENVIRONMENT)"

PHONY_TARGETS += clean-all
clean-all:
Expand Down
4 changes: 0 additions & 4 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@ m4_ifndef([SHTK_CHECK],
SHTK_CHECK([>= 1.7])


AC_PATH_PROG([KYUA], [kyua])
AM_CONDITIONAL([HAVE_KYUA], [test -n "${KYUA}"])


AM_CONDITIONAL([HOST_IS_NETBSD], [test "$(uname -s)" = NetBSD])


Expand Down

0 comments on commit 5c75cb7

Please sign in to comment.