From 110167674eb46df46bae551ca1d2127eff3a2fee Mon Sep 17 00:00:00 2001 From: Timothy Sample Date: Wed, 12 Dec 2018 14:23:09 -0500 Subject: [PATCH] Reorganize tests * tests/bash-without-bash.scm: Move this... * tests/bootstrap/bash-without-bash.scm: ...here. * tests/*.scm*: Move these... * tests/unit: ...into this directory. * configure.ac: Update paths. * Makefile.am: Ditto. * .gitignore: Ditto. --- .gitignore | 4 ++-- Makefile.am | 20 +++++++++++--------- configure.ac | 2 +- tests/{ => bootstrap}/bash-without-bash.scm | 2 +- tests/{ => unit}/automake.scm | 2 +- tests/{ => unit}/config.scm.in | 2 +- tests/{ => unit}/lexer.scm | 2 +- tests/{ => unit}/parser.scm | 2 +- tests/{ => unit}/pattern.scm | 2 +- tests/{ => unit}/shell.scm | 4 ++-- tests/{ => unit}/word.scm | 2 +- 11 files changed, 23 insertions(+), 21 deletions(-) rename tests/{ => bootstrap}/bash-without-bash.scm (94%) rename tests/{ => unit}/automake.scm (98%) rename tests/{ => unit}/config.scm.in (63%) rename tests/{ => unit}/lexer.scm (99%) rename tests/{ => unit}/parser.scm (99%) rename tests/{ => unit}/pattern.scm (99%) rename tests/{ => unit}/shell.scm (99%) rename tests/{ => unit}/word.scm (99%) diff --git a/.gitignore b/.gitignore index 505648a..0af1084 100644 --- a/.gitignore +++ b/.gitignore @@ -14,8 +14,8 @@ coverage/* lcov.info pre-inst-env scripts/geesh -tests/*.trs -tests/config.scm +tests/unit/*.trs +tests/unit/config.scm tests/spec/oil tests/spec/oil-link tools/coverage diff --git a/Makefile.am b/Makefile.am index 10dd5e6..1288d07 100644 --- a/Makefile.am +++ b/Makefile.am @@ -42,7 +42,7 @@ check-spec: .PHONY: check-bootstrap check-bootstrap: - guix build -f tests/bash-without-bash.scm + guix build -f tests/bootstrap/bash-without-bash.scm dist-hook: echo $(VERSION) > $(distdir)/.tarball-version @@ -92,12 +92,14 @@ scripts/geesh: scripts/geesh.in Makefile $(do_subst) < $(srcdir)/scripts/geesh.in > scripts/geesh chmod a+x scripts/geesh -TESTS = \ - tests/lexer.scm \ - tests/parser.scm \ - tests/pattern.scm \ - tests/shell.scm \ - tests/word.scm +UNIT_TESTS = \ + tests/unit/lexer.scm \ + tests/unit/parser.scm \ + tests/unit/pattern.scm \ + tests/unit/shell.scm \ + tests/unit/word.scm + +TESTS = $(UNIT_TESTS) EXTRA_DIST = \ scripts/geesh.in @@ -105,8 +107,8 @@ EXTRA_DIST = \ CLEANFILES = \ $(GOBJECTS) \ $(bin_SCRIPTS) \ - $(TESTS:tests/%.scm=%.log) \ - $(TESTS:tests/%.scm=%.trs) + $(TESTS:tests/unit/%.scm=%.log) \ + $(TESTS:tests/unit/%.scm=%.trs) clean-local: $(MAKE) $(AM_MAKEFLAGS) -L -C tests/spec clean diff --git a/configure.ac b/configure.ac index 3ac6560..a9db061 100644 --- a/configure.ac +++ b/configure.ac @@ -13,7 +13,7 @@ AM_CONDITIONAL([HAVE_GENHTML], [test -n $GENHTML]) AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([pre-inst-env], [chmod +x pre-inst-env]) -AC_CONFIG_FILES([tests/config.scm]) +AC_CONFIG_FILES([tests/unit/config.scm]) AC_CONFIG_FILES([tests/spec/Makefile]) AC_CONFIG_FILES([tools/coverage], [chmod +x tools/coverage]) diff --git a/tests/bash-without-bash.scm b/tests/bootstrap/bash-without-bash.scm similarity index 94% rename from tests/bash-without-bash.scm rename to tests/bootstrap/bash-without-bash.scm index 19b0411..47c7709 100644 --- a/tests/bash-without-bash.scm +++ b/tests/bootstrap/bash-without-bash.scm @@ -6,7 +6,7 @@ (ice-9 match)) (define geesh - (load (string-append (current-source-directory) "/../guix.scm"))) + (load (string-append (current-source-directory) "/../../guix.scm"))) (define geesh-with-links (package diff --git a/tests/automake.scm b/tests/unit/automake.scm similarity index 98% rename from tests/automake.scm rename to tests/unit/automake.scm index 79bbc2d..85cb5e6 100644 --- a/tests/automake.scm +++ b/tests/unit/automake.scm @@ -16,7 +16,7 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with Geesh. If not, see . -(define-module (tests automake) +(define-module (tests unit automake) #:use-module (srfi srfi-64)) ;;; Commentary: diff --git a/tests/config.scm.in b/tests/unit/config.scm.in similarity index 63% rename from tests/config.scm.in rename to tests/unit/config.scm.in index ed7115b..3f22a73 100644 --- a/tests/config.scm.in +++ b/tests/unit/config.scm.in @@ -1,4 +1,4 @@ -(define-module (tests config) +(define-module (tests unit config) #:export (*guile-path*)) (define *guile-path* "@GUILE@") diff --git a/tests/lexer.scm b/tests/unit/lexer.scm similarity index 99% rename from tests/lexer.scm rename to tests/unit/lexer.scm index ede50cb..8a560c7 100644 --- a/tests/lexer.scm +++ b/tests/unit/lexer.scm @@ -21,7 +21,7 @@ #:use-module (ice-9 match) #:use-module (srfi srfi-64) #:use-module (system base lalr) - #:use-module (tests automake)) + #:use-module (tests unit automake)) ;;; Commentary: ;;; diff --git a/tests/parser.scm b/tests/unit/parser.scm similarity index 99% rename from tests/parser.scm rename to tests/unit/parser.scm index 1d5bea8..2a960d9 100644 --- a/tests/parser.scm +++ b/tests/unit/parser.scm @@ -19,7 +19,7 @@ (define-module (test-parser) #:use-module (geesh parser) #:use-module (srfi srfi-64) - #:use-module (tests automake)) + #:use-module (tests unit automake)) ;;; Commentary: ;;; diff --git a/tests/pattern.scm b/tests/unit/pattern.scm similarity index 99% rename from tests/pattern.scm rename to tests/unit/pattern.scm index 44a7b27..890e8ff 100644 --- a/tests/pattern.scm +++ b/tests/unit/pattern.scm @@ -19,7 +19,7 @@ (define-module (test-pattern) #:use-module (geesh pattern) #:use-module (srfi srfi-64) - #:use-module (tests automake)) + #:use-module (tests unit automake)) ;;; Commentary: ;;; diff --git a/tests/shell.scm b/tests/unit/shell.scm similarity index 99% rename from tests/shell.scm rename to tests/unit/shell.scm index 94f7a0e..fdc645b 100644 --- a/tests/shell.scm +++ b/tests/unit/shell.scm @@ -23,8 +23,8 @@ #:use-module (ice-9 match) #:use-module (ice-9 textual-ports) #:use-module (srfi srfi-64) - #:use-module (tests automake) - #:use-module (tests config)) + #:use-module (tests unit automake) + #:use-module (tests unit config)) ;;; Commentary: ;;; diff --git a/tests/word.scm b/tests/unit/word.scm similarity index 99% rename from tests/word.scm rename to tests/unit/word.scm index 8193aba..2f880a0 100644 --- a/tests/word.scm +++ b/tests/unit/word.scm @@ -20,7 +20,7 @@ #:use-module (geesh environment) #:use-module (geesh word) #:use-module (srfi srfi-64) - #:use-module (tests automake)) + #:use-module (tests unit automake)) ;;; Commentary: ;;;