- Cleanup interface of autofonce_lib:
- remove mutable state
- add ~force_source_dir and ~force_build_dir to Project_config.from_file
- Improved compatibility with Autoconf:
- Discard spaces at end of lines, unless @&t@ is used as last space
- Escape parens, do not escape them if they match each other
- add support for [stdout], [stderr], [expout] and [experr]
- Add file basename to test keywords, so that it is possible to use it as a keyword to select all the test of a file
- Rename subcommands to reduce confusion: [promote] now corresponds to the old [run --auto-promote=n] and the old promote is renamed into [diff].
- Add --diff-args="..." to use instead of "-u" during diff display
- New option
-l/--print-seqto print the result immediately (default is to print a summary) - Improve filtering
- New option
-A/--match-allto run all tests that match ALL keywords instead of the ones matching ANY keyword - Add words of the test name to the test keywords
- Remove comment date during promotion, remove corresponding option --no-comment
- Transform all keywords to lowercase to match in a case-insensitive manner
- New option
- Promotion of tests results:
- Add some spaces between arguments during promotion
- Keep comments and multi-line comments between toplevel commands
- Support for exit code 99: fail the entire AT_CHECK without running run-if-fail actions
- Add opam files for windows cross-compilation (generated by
drom dep)
- Promotion (
promoteandrun --auto-promote):- Fix
--no-commentfor promotion that was not used - Add argument
--no-exittopromote, to promote everything except the exit code (so that the test will still fail withexitcode) - Don't promote failing
AT_CHECKwithrun-if-failorrun-if-pass
- Fix
- Configuration file:
- New config option 'project.run_from' that specifies where
_autofonce/should be created:buildfor build directory (default),sourcefor source directory orconfigfor configuration file directory
- New config option 'project.run_from' that specifies where
- Command Arguments and Behavior:
- Support for range of test ids like
1-10or10- - Exit with non-zero status on failed tests
- If testsuite location is a directory instead of a file, scan all directoies
and sub-directories for files
*.atcontaining tests, with copying enabled (AT_COPY_ALL([true])). - New option
-o LOGFILEto specify the log file - New command
autofonce configto print the currently read config - New options
-T <FILE.at>,-E <env.sh>and-I <path>to describe a testsuite directly from the command-line - Option
-k KEYWORDS: if a keyword starts is negated with-, then tests matching that keyword will not be executed (same as--not)
- Support for range of test ids like
- Improved version of
_autofonce/results.log:- Include all files from failed checks and honor captured files
- New option
captured_filesinautofonce.tomlto include some project files
- Standard Macro Language:
- Implements
AT_FAIL_IF([shell-cond]) - To conform with namespace rules for
autoconf, all macros are supported with both aAT_andAF_prefix, andautofoncewill promoteautofoncespecific macros with theAF_prefix, while using theAT_prefix forautoconfcompatible macros
- Implements
- Macro language extensions (default is
AF_, butAT_is accepted:- Skip macro definitions with
AC_DEFUN/m4_define. This is currently mostly done to allow the definition of:AC_DEFUN([AF_ENV], [$1]). Print a warning for discarding the macro definition, except forAF_ENV. - Add
AF_ENV([env])as a way to define a specific environment for the test (such as environment variables).- At toplevel, declarations by
AF_ENVare added in theautofonce_env.shfile of every test. - At test level, declarations are added directly in all following check scripts
- At toplevel, declarations by
- Add
AF_COPY(files)to copy files from the test source directory to the test run directory - Add
AF_LINK(files), same asAF_COPY, but symlink instead of copy - Add
AF_COPY_ALL([true|false]). If true, used before tests, make tests copy all non .at files in their directory as ifAF_COPYhad been used. If false, disable copying files for following tests. - Add
AF_LINK_ALL(), same asAF_COPY_ALL, but symlink instead of copy - Add
AF_SUBST(variables)to replace occurrences of these env variables in the stdout/stderr. A special case isAUTOFONCEthat replaces${AUTOFONCE_RUN_DIR}/${TEST_ID},${AUTOFONCE_BUILD_DIR}and${AUTOFONCE_SOURCE_DIR}.
- Skip macro definitions with
- Add a testsuite in
test/testsuite.at
- Add option
--auto-promote MAXtoautofonce runto iterate run/promote until all changes have been promoted or a maximal number of MAX iterations - Add option
--failures REASONto select tests matching a specific reason likeexitcode,stdoutorstderr - Add config option
build_dir_candidates(default to[ "_build" ]) to automatically try to find build anchors from outside the build dir using alternative candidates
-
Replace
autofonce.envby a configuration file:- Configuration can be stored in
autofonce.toml(typically not committed in sources) or.autofonce(committed in sources) autofoncewill lookupautofonce.tomlfirst, and.autofonceif not found, and fail if none is foundautofonce initwill create aautofonce.tomlin the local directory.- A
autofonce.tomlfile can be renamed to.autofonceand committed. - The configuration provides:
[testsuites]section: aliases for testsuites, with the testsuite file, the path for included files, and the env name[envs]section: possibility to define different envs (included in tests scripts) for different testsuitessource_anchorsandbuild_anchorsare used to locate the project source dir and the project build dir in the upper directories
autofoncedefines several variables at the beginning of test scripts envs:AUTOFONCE_TESTSUITE: name of the testsuiteAUTOFONCE_RUN_DIR: directory where tests are run (containing `_autofonce/)AUTOFONCE_SOURCE_DIR: source directory of the project (root/top dir)AUTOFONCE_BUILD_DIR: build directory of the project
- Configuration can be stored in
-
The run-dir (the directory that will contain the
_autofonce/subdir) is determined by:- the directory containing the file
autofonce.toml, or - the build directory as defined by the anchors in the
.autofoncefile
- the directory containing the file
- Add subcommand
autofonce promoteto update tests files with current results. This command can be applied using standard filters. By default, display a diff of changes to be performed. Use--applyto actually perform the tests. - Add selector --failed to run only previously failed tests
- Scripts are run with
AUTOFONCE_SUITE_DIRandAUTOFONCE_SUITE_FILEenv variables (to locate and identify thetestsuite.atfile) - Rename
_autotest/dir to_autofonce/dir - Simplify default
gnucobol.envto useatconfigandatlocal: slower but probably more portable
- Improve m4 parsing
- display nchecks performed
- allow if/then/else within tests
- min-edition set to 4.10
- add
autofonce newto create new tests
- Improved documentation
- Initial commit