]> _ Git - alire.git/commit
feat: built-in test runner and new `test` command (#1874)
authorCésar Sagaert <aldantanneo@gmail.com>
Mon, 10 Mar 2025 12:25:56 +0000 (13:25 +0100)
committerGitHub <noreply@github.com>
Mon, 10 Mar 2025 12:25:56 +0000 (13:25 +0100)
commit64e6d326732ffbe0ccdb9276fdfe73e85beaeaeb
treeecf8a93f08bcca07b742522f0fd3daeb9500a6ff
parent15387ded7e573dad2cf8424422ec1e69e86e8e32
feat: built-in test runner and new `test` command (#1874)

* first draft of alire test runner

* use fixed output file name in test runner

* add exe suffix when spawning tests (windows compat)

* move test runner to libalire

* add "dim_output" option to non-capturing spawns

* manifest [test] section support

* generate test crate skeleton in `alr init`

* move old test command to `index-test`

* new `test` command

* test filtering, formatting

* use index-test in testsuite

* change references to 'alr test' to 'alr index-test' in documentation and comments

* fix crash on first test run

* tests for revamped test command

* fix broken tests

* remove test-runner command

* address comments

* change default test crate name to `<mycrate>_tests`

* fix broken test

* make example test pass by default

* add support for legacy actions behaviour and multiple test runners

* fix misused build boolean success

* address review comments

* Fix dependencies

* better manifest parsing for test section

---------

Co-authored-by: Alejandro R. Mosteo <amosteo@unizar.es>
60 files changed:
doc/catalog-format-spec.md
doc/getting-started.md
src/alire/alire-os_lib-subprocess.adb
src/alire/alire-os_lib-subprocess.ads
src/alire/alire-paths.ads
src/alire/alire-properties-actions-executor.adb
src/alire/alire-properties-actions.ads
src/alire/alire-properties-configurations.ads
src/alire/alire-properties-from_toml.ads
src/alire/alire-properties-tests.adb [new file with mode: 0644]
src/alire/alire-properties-tests.ads [new file with mode: 0644]
src/alire/alire-test_runner.adb [new file with mode: 0644]
src/alire/alire-test_runner.ads [new file with mode: 0644]
src/alire/alire-toml_keys.ads
src/alr/alr-commands-index_test.adb [new file with mode: 0644]
src/alr/alr-commands-index_test.ads [new file with mode: 0644]
src/alr/alr-commands-init.adb
src/alr/alr-commands-init.ads
src/alr/alr-commands-test.adb
src/alr/alr-commands-test.ads
src/alr/alr-commands.adb
src/alr/alr-testing-junit.adb
testsuite/drivers/alr.py
testsuite/tests/action/masked-error/test.py
testsuite/tests/index-test/action-test/my_index/crates/hello_1.0.0/hello.gpr [new file with mode: 0644]
testsuite/tests/index-test/action-test/my_index/crates/hello_1.0.0/src/hello.adb [new file with mode: 0644]
testsuite/tests/index-test/action-test/my_index/index/he/hello/hello-1.0.0.toml [new file with mode: 0644]
testsuite/tests/index-test/action-test/my_index/index/index.toml [new file with mode: 0644]
testsuite/tests/index-test/action-test/test.py [new file with mode: 0644]
testsuite/tests/index-test/action-test/test.yaml [new file with mode: 0644]
testsuite/tests/index-test/default-remote-test/test.py [new file with mode: 0644]
testsuite/tests/index-test/default-remote-test/test.yaml [new file with mode: 0644]
testsuite/tests/index-test/local-release/test.py [new file with mode: 0644]
testsuite/tests/index-test/local-release/test.yaml [new file with mode: 0644]
testsuite/tests/index-test/verbose-propagation/test.py [new file with mode: 0644]
testsuite/tests/index-test/verbose-propagation/test.yaml [new file with mode: 0644]
testsuite/tests/publish/private-indexes/test.py
testsuite/tests/test/action-test/my_index/crates/hello_1.0.0/hello.gpr [deleted file]
testsuite/tests/test/action-test/my_index/crates/hello_1.0.0/src/hello.adb [deleted file]
testsuite/tests/test/action-test/my_index/index/he/hello/hello-1.0.0.toml [deleted file]
testsuite/tests/test/action-test/my_index/index/index.toml [deleted file]
testsuite/tests/test/action-test/test.py [deleted file]
testsuite/tests/test/action-test/test.yaml [deleted file]
testsuite/tests/test/crate-init/test.py [new file with mode: 0644]
testsuite/tests/test/crate-init/test.yaml [new file with mode: 0644]
testsuite/tests/test/custom-runner/test.py [new file with mode: 0644]
testsuite/tests/test/custom-runner/test.yaml [new file with mode: 0644]
testsuite/tests/test/default-failure/test.py [new file with mode: 0644]
testsuite/tests/test/default-failure/test.yaml [new file with mode: 0644]
testsuite/tests/test/default-remote-test/test.py [deleted file]
testsuite/tests/test/default-remote-test/test.yaml [deleted file]
testsuite/tests/test/filtering/test.py [new file with mode: 0644]
testsuite/tests/test/filtering/test.yaml [new file with mode: 0644]
testsuite/tests/test/legacy-behaviour/test.py [new file with mode: 0644]
testsuite/tests/test/legacy-behaviour/test.yaml [new file with mode: 0644]
testsuite/tests/test/local-release/test.py [deleted file]
testsuite/tests/test/local-release/test.yaml [deleted file]
testsuite/tests/test/verbose-propagation/test.py [deleted file]
testsuite/tests/test/verbose-propagation/test.yaml [deleted file]
testsuite/tests/workflows/init-options/test.py