Skip to content

Commit

Permalink
4.4: sync unit test setup with bash-5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jansorg committed Jul 4, 2024
1 parent 5102321 commit 13c3743
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 12 deletions.
2 changes: 2 additions & 0 deletions test/unit/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/*~
/*.trs
/*.log
/Makefile
/Makefile.in
/require_me.sh
Expand Down
48 changes: 36 additions & 12 deletions test/unit/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,27 +1,51 @@
## Process this file with automake to produce Makefile.in -*-Makefile-*-.
COMBINED_TESTS = $(wildcard test-*.sh)
tests_sources = $(notdir $(COMBINED_TESTS:=.in))

# Don't forget to add the *.in files of new tests to configure.ac in the root folder
TESTS = test-action.sh \
test-alias.sh \
test-bashdb-trace.sh \
test-break.sh \
test-cmd-complete.sh \
test-cmd-eval.sh \
test-cmd-info-variables.sh \
test-columns.sh \
test-filecache.sh \
test-file.sh \
test-fns.sh \
test-frame.sh \
test-get-sourceline.sh \
test-io.sh \
test-lib-eval.sh \
test-lib-list.sh \
test-msg.sh \
test-pre.sh \
test-require.sh \
test-run.sh \
test-save-restore.sh \
test-sort.sh \
test-validate.sh

tests_sources = $(notdir $(TESTS:=.in))

abs_srcdir=@abs_srcdir@
abs_builddir=@abs_builddir@

TESTS_ENVIRONMENT = \
srcdir="$(abs_srcdir)" \
builddir="$(abs_builddir)"
AM_TESTS_ENVIRONMENT = \
srcdir="$(abs_srcdir)"; \
builddir="$(abs_builddir)"; \
export srcdir builddir;
LOG_COMPILER = $(SH_PROG)
AM_LOG_FLAGS = $(abs_srcdir)/shunit2 \
$(abs_srcdir)/helper.sh $(abs_srcdir)/mock-cmd.sh \
$(abs_srcdir)/require_me.sh

EXTRA_DIST = \
helper.sh \
mock-cmd.sh \
require_me.sh \
require_me.sh.in $(COMBINED_TESTS) shunit2 $(tests_sources)
require_me.sh.in $(TESTS) shunit2 $(tests_sources)

test: check
test-unit: check

check: $(COMBINED_TESTS)
$(SH_PROG) $(abs_srcdir)/shunit2 \
$(abs_srcdir)/helper.sh $(abs_srcdir)/mock-cmd.sh \
$(abs_srcdir)/require_me.sh \
$(COMBINED_TESTS)

MOSTLYCLEANFILES = *.orig *.rej

0 comments on commit 13c3743

Please sign in to comment.