package autofonce_m4
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=4838b340c1e99708d6690fdd8658fc8b6ac74e3c38c0c3f1bbf2a50e92e48c4a
CHANGES.md.html
v0.8 ( 2023-03-13 )
Promotion (
promote
andrun --auto-promote
):Fix
--no-comment
for promotion that was not usedAdd argument
--no-exit
topromote
, to promote everything except the exit code (so that the test will still fail withexitcode
)Don't promote failing
AT_CHECK
withrun-if-fail
orrun-if-pass
Configuration file:
New config option 'project.run_from' that specifies where
_autofonce/
should be created:build
for build directory (default),source
for source directory orconfig
for configuration file directory
Command Arguments and Behavior:
Support for range of test ids like
1-10
or10-
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
*.at
containing tests, with copying enabled (AT_COPY_ALL([true])
).New option
-o LOGFILE
to specify the log fileNew command
autofonce config
to print the currently read configNew options
-T <FILE.at>
,-E <env.sh>
and-I <path>
to describe a testsuite directly from the command-lineOption
-k KEYWORDS
: if a keyword starts is negated with-
, then tests matching that keyword will not be executed (same as--not
)
Improved version of
_autofonce/results.log
:Include all files from failed checks and honor captured files
New option
captured_files
inautofonce.toml
to 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, andautofonce
will promoteautofonce
specific macros with theAF_
prefix, while using theAT_
prefix forautoconf
compatible macros
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_ENV
are added in theautofonce_env.sh
file of every test.At test level, declarations are added directly in all following check scripts
Add
AF_COPY(files)
to copy files from the test source directory to the test run directoryAdd
AF_LINK(files)
, same asAF_COPY
, but symlink instead of copyAdd
AF_COPY_ALL([true|false])
. If true, used before tests, make tests copy all non .at files in their directory as ifAF_COPY
had been used. If false, disable copying files for following tests.Add
AF_LINK_ALL()
, same asAF_COPY_ALL
, but symlink instead of copyAdd
AF_SUBST(variables)
to replace occurrences of these env variables in the stdout/stderr. A special case isAUTOFONCE
that replaces${AUTOFONCE_RUN_DIR}/${TEST_ID}
,${AUTOFONCE_BUILD_DIR}
and${AUTOFONCE_SOURCE_DIR}
.
Add a testsuite in
test/testsuite.at
v0.7 ( 2023-02-09 )
Add option
--auto-promote MAX
toautofonce run
to iterate run/promote until all changes have been promoted or a maximal number of MAX iterationsAdd option
--failures REASON
to select tests matching a specific reason likeexitcode
,stdout
orstderr
Add config option
build_dir_candidates
(default to[ "_build" ]
) to automatically try to find build anchors from outside the build dir using alternative candidates
v0.6 ( 2023-02-05 )
Replace
autofonce.env
by a configuration file:Configuration can be stored in
autofonce.toml
(typically not committed in sources) or.autofonce
(committed in sources)autofonce
will lookupautofonce.toml
first, and.autofonce
if not found, and fail if none is foundautofonce init
will create aautofonce.toml
in the local directory.A
autofonce.toml
file can be renamed to.autofonce
and 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_anchors
andbuild_anchors
are used to locate the project source dir and the project build dir in the upper directories
autofonce
defines 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
The run-dir (the directory that will contain the
_autofonce/
subdir) is determined by:the directory containing the file
autofonce.toml
, orthe build directory as defined by the anchors in the
.autofonce
file
v0.5 ( 2023-02-04 )
Add subcommand
autofonce promote
to 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--apply
to actually perform the tests.Add selector --failed to run only previously failed tests
Scripts are run with
AUTOFONCE_SUITE_DIR
andAUTOFONCE_SUITE_FILE
env variables (to locate and identify thetestsuite.at
file)Rename
_autotest/
dir to_autofonce/
dirSimplify default
gnucobol.env
to useatconfig
andatlocal
: slower but probably more portable
v0.4 ( 2023-02-02 )
Improve m4 parsing
display nchecks performed
allow if/then/else within tests
min-edition set to 4.10
v0.3 ( 2023-01-28 )
add
autofonce new
to create new tests
v0.2 ( 2023-01-28 )
Improved documentation
v0.1 ( 2023-01-28 )
Initial commit