diff --git a/testsuite/drivers/gnattest.py b/testsuite/drivers/gnattest.py deleted file mode 100644 index 014858f9..00000000 --- a/testsuite/drivers/gnattest.py +++ /dev/null @@ -1,47 +0,0 @@ -from pathlib import Path -import os -import shutil -import tempfile - -from drivers.base_driver import BaseDriver - - -class GNATtestDriver(BaseDriver): - """ - GNATtest and TGen Test Driver. - - Interface: - Same as `ShellScriptDriver`. - - This driver is specific to GNATtest and behaves like `ShellScriptDriver`, - except that it copies the TGen runtime support project to a temporary - directory and adds this copy to `GPR_PROJECT_PATH`. - - This approach prevents race conditions when GNATtest builds harnesses - that depend on the TGen runtime support library. During the build process, - `gprbuild` overwrites the static library artifact (`libtgen.a`) each time - it is invoked. To avoid these conflicts, each test run operates on its own - isolated copy of the `tgen_rts` project. - """ - - DEFAULT_TGEN_RTS_LOCATION: Path = Path("src/tgen/tgen_rts").absolute() - - def run(self) -> None: - tgen_rts_project_path = os.environ.get( - "TGEN_RTS_LOCATION", str(GNATtestDriver.DEFAULT_TGEN_RTS_LOCATION) - ) - gpr_project_path = os.environ.get("GPR_PROJECT_PATH", "") - - temp_dir = Path(tempfile.mkdtemp()) / "tgen_rts" - shutil.copytree(tgen_rts_project_path, temp_dir) - - process_result = self.shell( - ["bash", "test.sh"], - catch_error=False, - env={**os.environ, "GPR_PROJECT_PATH": f"{temp_dir}:{gpr_project_path}"}, - ) - - if process_result.status: - self.output += ">>>program returned status code {}\n".format( - process_result.status - ) diff --git a/testsuite/tests/test/135_tgen_wrapper_conflict/test.yaml b/testsuite/tests/test/135_tgen_wrapper_conflict/test.yaml index 806a7c2b..c875a2dc 100644 --- a/testsuite/tests/test/135_tgen_wrapper_conflict/test.yaml +++ b/testsuite/tests/test/135_tgen_wrapper_conflict/test.yaml @@ -2,6 +2,6 @@ description: Test that TGen generates precondition wrappers that can be compiled when a parameter of the tested subprogram has the same name as the package in which it is defined. -driver: gnattest_driver +driver: shell_script control: - [XFAIL, 'x86', 'Marshalling not working for 32bits (UB03-008)'] diff --git a/testsuite/tests/test/136_tgen_generics/test.yaml b/testsuite/tests/test/136_tgen_generics/test.yaml index a8df466b..cb4f261a 100644 --- a/testsuite/tests/test/136_tgen_generics/test.yaml +++ b/testsuite/tests/test/136_tgen_generics/test.yaml @@ -2,6 +2,6 @@ description: Test that TGen generates valid code when including a subprogram that is in a generic nested instantiation. -driver: gnattest_driver +driver: shell_script control: - [XFAIL, 'x86', 'Marshalling not working for 32bits (UB03-008)'] diff --git a/testsuite/tests/test/146-gen_full_glob/test.yaml b/testsuite/tests/test/146-gen_full_glob/test.yaml index a32fd363..2d23d46a 100644 --- a/testsuite/tests/test/146-gen_full_glob/test.yaml +++ b/testsuite/tests/test/146-gen_full_glob/test.yaml @@ -2,6 +2,6 @@ description: Test support of global variables in TGen, for subprograms with no parameters. -driver: gnattest_driver +driver: shell_script control: - [XFAIL, 'x86', 'Marshalling not working for 32bits (UB03-008)'] diff --git a/testsuite/tests/test/147-clean_tgen_dir/test.yaml b/testsuite/tests/test/147-clean_tgen_dir/test.yaml index e6fa7ee1..d2690a00 100644 --- a/testsuite/tests/test/147-clean_tgen_dir/test.yaml +++ b/testsuite/tests/test/147-clean_tgen_dir/test.yaml @@ -2,6 +2,6 @@ description: Test that the TGen support library is always generated from a clean directory, removing stale sources. -driver: gnattest_driver +driver: shell_script control: - [XFAIL, 'x86', 'Marshalling not working for 32bits (UB03-008)'] diff --git a/testsuite/tests/test/151_arr_limit/test.yaml b/testsuite/tests/test/151_arr_limit/test.yaml index 65eccfa6..eb938452 100644 --- a/testsuite/tests/test/151_arr_limit/test.yaml +++ b/testsuite/tests/test/151_arr_limit/test.yaml @@ -3,6 +3,6 @@ description: that the limit set through the TGEN_ARRAY_LIMIT environment variable does raise an exception. -driver: gnattest_driver +driver: shell_script control: - [XFAIL, 'x86', 'Marshalling not working for 32bits (UB03-008)'] diff --git a/testsuite/tests/test/153-floating-point-tgen/test.yaml b/testsuite/tests/test/153-floating-point-tgen/test.yaml index c3a053e8..805b6b5b 100644 --- a/testsuite/tests/test/153-floating-point-tgen/test.yaml +++ b/testsuite/tests/test/153-floating-point-tgen/test.yaml @@ -3,6 +3,6 @@ description: point values in the range of a floating point type with a range constraint. -driver: gnattest_driver +driver: shell_script control: - [XFAIL, 'x86', 'Marshalling not working for 32bits (UB03-008)'] diff --git a/testsuite/tests/test/154-tgen-array-bounds/test.yaml b/testsuite/tests/test/154-tgen-array-bounds/test.yaml index dbccd7aa..226858e3 100644 --- a/testsuite/tests/test/154-tgen-array-bounds/test.yaml +++ b/testsuite/tests/test/154-tgen-array-bounds/test.yaml @@ -3,6 +3,6 @@ description: generates values for array types that have a constrained subtype as an index type. It used to crash when trying to generate values. -driver: gnattest_driver +driver: shell_script control: - [XFAIL, 'x86', 'Marshalling not working for 32bits (UB03-008)'] diff --git a/testsuite/tests/test/157_ops/test.yaml b/testsuite/tests/test/157_ops/test.yaml index c7c280ed..50527418 100644 --- a/testsuite/tests/test/157_ops/test.yaml +++ b/testsuite/tests/test/157_ops/test.yaml @@ -1,7 +1,7 @@ description: Check that the support library and gnattest harness are legal for custom operators. -driver: gnattest_driver +driver: shell_script control: - [XFAIL, 'x86', 'Marshalling not working for 32bits (UB03-008)'] diff --git a/testsuite/tests/test/157_std_shadowing/test.yaml b/testsuite/tests/test/157_std_shadowing/test.yaml index c14cb0a8..bf870cc2 100644 --- a/testsuite/tests/test/157_std_shadowing/test.yaml +++ b/testsuite/tests/test/157_std_shadowing/test.yaml @@ -1,7 +1,7 @@ description: Check that the support library and gnattest harness are legal when a user project package is named "standard". -driver: gnattest_driver +driver: shell_script control: - [XFAIL, 'True', 'LAL and nameres on a custom standard package, see eng/libadalang/libadalang#1453'] diff --git a/testsuite/tests/test/157_test_subp/test.yaml b/testsuite/tests/test/157_test_subp/test.yaml index c876f24c..2405af96 100644 --- a/testsuite/tests/test/157_test_subp/test.yaml +++ b/testsuite/tests/test/157_test_subp/test.yaml @@ -2,7 +2,7 @@ description: Check that the support library and gnattest harness are legal when either the subprogram under test is called "test" or the unit in which it is defined is called test. -driver: gnattest_driver +driver: shell_script control: - [XFAIL, 'x86', 'Marshalling not working for 32bits (UB03-008)'] diff --git a/testsuite/tests/test/177_protected_gen/test.yaml b/testsuite/tests/test/177_protected_gen/test.yaml index bdfc6158..b32dbbc0 100644 --- a/testsuite/tests/test/177_protected_gen/test.yaml +++ b/testsuite/tests/test/177_protected_gen/test.yaml @@ -2,6 +2,6 @@ description: Check that the test generation part of gnattest does not attempt to generate values for protected subprograms and entries, as this is not supported by the harness generation part of gnattest. -driver: gnattest_driver +driver: shell_script control: - [XFAIL, 'x86', 'Marshalling not working for 32bits (UB03-008)'] diff --git a/testsuite/tests/test/177_tasking/test.yaml b/testsuite/tests/test/177_tasking/test.yaml index 283fb777..6f96a144 100644 --- a/testsuite/tests/test/177_tasking/test.yaml +++ b/testsuite/tests/test/177_tasking/test.yaml @@ -2,6 +2,6 @@ description: Check that the test generation part of gnattest does not attempt to generate values for task entries, as this is not supported by the harness generation part of gnattest. -driver: gnattest_driver +driver: shell_script control: - [XFAIL, 'x86', 'Marshalling not working for 32bits (UB03-008)'] diff --git a/testsuite/tests/test/183-formal_params/test.yaml b/testsuite/tests/test/183-formal_params/test.yaml index 5dd8c128..27de933c 100644 --- a/testsuite/tests/test/183-formal_params/test.yaml +++ b/testsuite/tests/test/183-formal_params/test.yaml @@ -1,7 +1,7 @@ description: Test that gnattest does not attempt to generate test inputs for subprograms with generic formal parameters or return types. -driver: gnattest_driver +driver: shell_script canonicalize_backslashes: True diff --git a/testsuite/tests/test/184-generic-lib-item/test.yaml b/testsuite/tests/test/184-generic-lib-item/test.yaml index 0afced08..5417ab3a 100644 --- a/testsuite/tests/test/184-generic-lib-item/test.yaml +++ b/testsuite/tests/test/184-generic-lib-item/test.yaml @@ -2,6 +2,6 @@ description: Check that TGen properly rejects types declared in generic instantiations that are library items. -driver: gnattest_driver +driver: shell_script control: - [XFAIL, 'x86', 'Marshalling not working for 32bits (UB03-008)'] diff --git a/testsuite/tests/test/185_tgen_wrapper_paren_expr/test.yaml b/testsuite/tests/test/185_tgen_wrapper_paren_expr/test.yaml index 27977a2d..42cbf203 100644 --- a/testsuite/tests/test/185_tgen_wrapper_paren_expr/test.yaml +++ b/testsuite/tests/test/185_tgen_wrapper_paren_expr/test.yaml @@ -2,6 +2,6 @@ description: Test that the precondition wrappers generated by TGen incorporate the full expression, including the parenthesis when it is required, such as in quantified expressions or if-expressions. -driver: gnattest_driver +driver: shell_script control: - [XFAIL, 'x86', 'Marshalling not working for 32bits (UB03-008)'] diff --git a/testsuite/tests/test/193-anonymous-type/test.yaml b/testsuite/tests/test/193-anonymous-type/test.yaml index 9e49134e..899a0ad7 100644 --- a/testsuite/tests/test/193-anonymous-type/test.yaml +++ b/testsuite/tests/test/193-anonymous-type/test.yaml @@ -3,6 +3,6 @@ description: with an anonymous type parameter. It used to call P_Fully_Qualified_Name on it, which resulted in a crash. -driver: gnattest_driver +driver: shell_script control: - [XFAIL, 'x86', 'Marshalling not working for 32bits (UB03-008)'] diff --git a/testsuite/tests/test/194_const_array_limit/test.yaml b/testsuite/tests/test/194_const_array_limit/test.yaml index 8dc4b67b..972f6f3c 100644 --- a/testsuite/tests/test/194_const_array_limit/test.yaml +++ b/testsuite/tests/test/194_const_array_limit/test.yaml @@ -4,7 +4,7 @@ description: We do this by attempting to generate tests with gnattest for a big array type, and checking the emitted warnings. -driver: gnattest_driver +driver: shell_script control: - [XFAIL, 'x86', 'Marshalling not working for 32bits (UB03-008)'] diff --git a/testsuite/tests/test/195-repeated-pragmas/test.yaml b/testsuite/tests/test/195-repeated-pragmas/test.yaml index 93d7bdd9..8abee262 100644 --- a/testsuite/tests/test/195-repeated-pragmas/test.yaml +++ b/testsuite/tests/test/195-repeated-pragmas/test.yaml @@ -1,4 +1,4 @@ description: gnattest test -driver: gnattest_driver +driver: shell_script diff --git a/testsuite/tests/test/203-generic-packages-architecture/test.yaml b/testsuite/tests/test/203-generic-packages-architecture/test.yaml index a52e4351..d7b32325 100644 --- a/testsuite/tests/test/203-generic-packages-architecture/test.yaml +++ b/testsuite/tests/test/203-generic-packages-architecture/test.yaml @@ -1,4 +1,4 @@ description: | Run TGen test case generator with a complex generic packages architecture. -driver: gnattest_driver +driver: shell_script diff --git a/testsuite/tests/test/208-gpr-warnings/test.yaml b/testsuite/tests/test/208-gpr-warnings/test.yaml index d9235cd1..dab5ce4f 100644 --- a/testsuite/tests/test/208-gpr-warnings/test.yaml +++ b/testsuite/tests/test/208-gpr-warnings/test.yaml @@ -3,4 +3,4 @@ description: loading the project file. Instead, only output those warnings and still proceed with the rest of the tool. -driver: gnattest_driver +driver: shell_script diff --git a/testsuite/tests/test/208-stub_extension/test.yaml b/testsuite/tests/test/208-stub_extension/test.yaml index 97bad279..5da92f98 100644 --- a/testsuite/tests/test/208-stub_extension/test.yaml +++ b/testsuite/tests/test/208-stub_extension/test.yaml @@ -3,4 +3,4 @@ description: for a project tree in which an extending project is present. This used to crash due to a mis-management of the project table. -driver: gnattest_driver +driver: shell_script diff --git a/testsuite/tests/test/212-default-encoding/test.yaml b/testsuite/tests/test/212-default-encoding/test.yaml index df8afc7b..18f93381 100644 --- a/testsuite/tests/test/212-default-encoding/test.yaml +++ b/testsuite/tests/test/212-default-encoding/test.yaml @@ -10,4 +10,4 @@ description: characters from being recognized. This is materialized in zdep.*, which contain a 'é' character, encoded in latin-1. -driver: gnattest_driver +driver: shell_script diff --git a/testsuite/tests/test/32-basic_enum/test.yaml b/testsuite/tests/test/32-basic_enum/test.yaml index 9b9b09f1..bb4ecdf9 100644 --- a/testsuite/tests/test/32-basic_enum/test.yaml +++ b/testsuite/tests/test/32-basic_enum/test.yaml @@ -2,6 +2,6 @@ description: Test basic enumerated generation for scalar types as well as non discriminated record types. -driver: gnattest_driver +driver: shell_script control: - [XFAIL, 'x86', 'Marshalling not working for 32bits (UB03-008)'] diff --git a/testsuite/tests/test/36-stub_dangling_setters/test.yaml b/testsuite/tests/test/36-stub_dangling_setters/test.yaml index 2c5a9821..3e3d9d8c 100644 --- a/testsuite/tests/test/36-stub_dangling_setters/test.yaml +++ b/testsuite/tests/test/36-stub_dangling_setters/test.yaml @@ -3,4 +3,4 @@ description: issues. They used to not be commented out, which could result in lingering references to types or objects no longer present in the codebase. -driver: gnattest_driver +driver: shell_script diff --git a/testsuite/tests/test/37-stub-ada-version/test.yaml b/testsuite/tests/test/37-stub-ada-version/test.yaml index 35d9bd53..2f3a961b 100644 --- a/testsuite/tests/test/37-stub-ada-version/test.yaml +++ b/testsuite/tests/test/37-stub-ada-version/test.yaml @@ -3,4 +3,4 @@ description: This used not to be the case because gnattest added a pragma Ada_2005 in some of the stub data units. -driver: gnattest_driver +driver: shell_script diff --git a/testsuite/tests/test/37-stub-anon-subp-acc/test.yaml b/testsuite/tests/test/37-stub-anon-subp-acc/test.yaml index 35d9bd53..2f3a961b 100644 --- a/testsuite/tests/test/37-stub-anon-subp-acc/test.yaml +++ b/testsuite/tests/test/37-stub-anon-subp-acc/test.yaml @@ -3,4 +3,4 @@ description: This used not to be the case because gnattest added a pragma Ada_2005 in some of the stub data units. -driver: gnattest_driver +driver: shell_script diff --git a/testsuite/tests/test/98-long-json/test.yaml b/testsuite/tests/test/98-long-json/test.yaml index 1641409b..f57a7b65 100644 --- a/testsuite/tests/test/98-long-json/test.yaml +++ b/testsuite/tests/test/98-long-json/test.yaml @@ -4,6 +4,6 @@ description: longer than 32766 characters, which is the maximum allowed length in gprbuild. -driver: gnattest_driver +driver: shell_script control: - [XFAIL, 'x86', 'Marshalling not working for 32bits (UB03-008)'] diff --git a/testsuite/tests/test/T206-015/test.yaml b/testsuite/tests/test/T206-015/test.yaml index 8d9b67bc..6e9250fa 100755 --- a/testsuite/tests/test/T206-015/test.yaml +++ b/testsuite/tests/test/T206-015/test.yaml @@ -1,4 +1,4 @@ description: gnattest test -driver: gnattest_driver +driver: shell_script diff --git a/testsuite/tests/test/T213-041/test.yaml b/testsuite/tests/test/T213-041/test.yaml index 8d9b67bc..6e9250fa 100644 --- a/testsuite/tests/test/T213-041/test.yaml +++ b/testsuite/tests/test/T213-041/test.yaml @@ -1,4 +1,4 @@ description: gnattest test -driver: gnattest_driver +driver: shell_script diff --git a/testsuite/tests/test/T217-072/test.yaml b/testsuite/tests/test/T217-072/test.yaml index 8d9b67bc..6e9250fa 100644 --- a/testsuite/tests/test/T217-072/test.yaml +++ b/testsuite/tests/test/T217-072/test.yaml @@ -1,4 +1,4 @@ description: gnattest test -driver: gnattest_driver +driver: shell_script diff --git a/testsuite/tests/test/T629-003/test.yaml b/testsuite/tests/test/T629-003/test.yaml index 8d9b67bc..6e9250fa 100644 --- a/testsuite/tests/test/T629-003/test.yaml +++ b/testsuite/tests/test/T629-003/test.yaml @@ -1,4 +1,4 @@ description: gnattest test -driver: gnattest_driver +driver: shell_script diff --git a/testsuite/tests/test/T715-010/test.yaml b/testsuite/tests/test/T715-010/test.yaml index 8d9b67bc..6e9250fa 100644 --- a/testsuite/tests/test/T715-010/test.yaml +++ b/testsuite/tests/test/T715-010/test.yaml @@ -1,4 +1,4 @@ description: gnattest test -driver: gnattest_driver +driver: shell_script diff --git a/testsuite/tests/test/TA07-010/test.yaml b/testsuite/tests/test/TA07-010/test.yaml index e5bf2fb1..cd8f2759 100644 --- a/testsuite/tests/test/TA07-010/test.yaml +++ b/testsuite/tests/test/TA07-010/test.yaml @@ -1,6 +1,6 @@ description: gnattest test -driver: gnattest_driver +driver: shell_script control: - [SKIP, 'windows', 'No symbolic links on Windows'] diff --git a/testsuite/tests/test/TA19-048/test.yaml b/testsuite/tests/test/TA19-048/test.yaml index 8d9b67bc..6e9250fa 100644 --- a/testsuite/tests/test/TA19-048/test.yaml +++ b/testsuite/tests/test/TA19-048/test.yaml @@ -1,4 +1,4 @@ description: gnattest test -driver: gnattest_driver +driver: shell_script diff --git a/testsuite/tests/test/TA19-051/test.yaml b/testsuite/tests/test/TA19-051/test.yaml index 8d9b67bc..6e9250fa 100644 --- a/testsuite/tests/test/TA19-051/test.yaml +++ b/testsuite/tests/test/TA19-051/test.yaml @@ -1,4 +1,4 @@ description: gnattest test -driver: gnattest_driver +driver: shell_script diff --git a/testsuite/tests/test/TB16-055/test.yaml b/testsuite/tests/test/TB16-055/test.yaml index 8d9b67bc..6e9250fa 100644 --- a/testsuite/tests/test/TB16-055/test.yaml +++ b/testsuite/tests/test/TB16-055/test.yaml @@ -1,4 +1,4 @@ description: gnattest test -driver: gnattest_driver +driver: shell_script diff --git a/testsuite/tests/test/UA15-049/test.yaml b/testsuite/tests/test/UA15-049/test.yaml index 8d9b67bc..6e9250fa 100644 --- a/testsuite/tests/test/UA15-049/test.yaml +++ b/testsuite/tests/test/UA15-049/test.yaml @@ -1,4 +1,4 @@ description: gnattest test -driver: gnattest_driver +driver: shell_script diff --git a/testsuite/tests/test/UA15-080/test.yaml b/testsuite/tests/test/UA15-080/test.yaml index 8d9b67bc..6e9250fa 100644 --- a/testsuite/tests/test/UA15-080/test.yaml +++ b/testsuite/tests/test/UA15-080/test.yaml @@ -1,4 +1,4 @@ description: gnattest test -driver: gnattest_driver +driver: shell_script diff --git a/testsuite/tests/test/UB09-001/test.yaml b/testsuite/tests/test/UB09-001/test.yaml index 8d9b67bc..6e9250fa 100644 --- a/testsuite/tests/test/UB09-001/test.yaml +++ b/testsuite/tests/test/UB09-001/test.yaml @@ -1,4 +1,4 @@ description: gnattest test -driver: gnattest_driver +driver: shell_script diff --git a/testsuite/tests/test/V406-023/test.yaml b/testsuite/tests/test/V406-023/test.yaml index 8d9b67bc..6e9250fa 100644 --- a/testsuite/tests/test/V406-023/test.yaml +++ b/testsuite/tests/test/V406-023/test.yaml @@ -1,4 +1,4 @@ description: gnattest test -driver: gnattest_driver +driver: shell_script diff --git a/testsuite/tests/test/VA31-011/test.yaml b/testsuite/tests/test/VA31-011/test.yaml index 8d9b67bc..6e9250fa 100644 --- a/testsuite/tests/test/VA31-011/test.yaml +++ b/testsuite/tests/test/VA31-011/test.yaml @@ -1,4 +1,4 @@ description: gnattest test -driver: gnattest_driver +driver: shell_script diff --git a/testsuite/tests/test/VB28-016/test.yaml b/testsuite/tests/test/VB28-016/test.yaml index 8d9b67bc..6e9250fa 100644 --- a/testsuite/tests/test/VB28-016/test.yaml +++ b/testsuite/tests/test/VB28-016/test.yaml @@ -1,4 +1,4 @@ description: gnattest test -driver: gnattest_driver +driver: shell_script diff --git a/testsuite/tests/test/dump_test_inputs/test.yaml b/testsuite/tests/test/dump_test_inputs/test.yaml index e1388969..44b8153a 100644 --- a/testsuite/tests/test/dump_test_inputs/test.yaml +++ b/testsuite/tests/test/dump_test_inputs/test.yaml @@ -1,5 +1,5 @@ description: Test checking test input dumping -driver: gnattest_driver +driver: shell_script diff --git a/testsuite/tests/test/error_recovery/test.yaml b/testsuite/tests/test/error_recovery/test.yaml index ad1b72f0..3ea1cf6f 100644 --- a/testsuite/tests/test/error_recovery/test.yaml +++ b/testsuite/tests/test/error_recovery/test.yaml @@ -1,5 +1,5 @@ description: Test error recovery -driver: gnattest_driver +driver: shell_script diff --git a/testsuite/tests/test/filtering_same_fisrt_digit_sloc/test.yaml b/testsuite/tests/test/filtering_same_fisrt_digit_sloc/test.yaml index 8d9b67bc..6e9250fa 100644 --- a/testsuite/tests/test/filtering_same_fisrt_digit_sloc/test.yaml +++ b/testsuite/tests/test/filtering_same_fisrt_digit_sloc/test.yaml @@ -1,4 +1,4 @@ description: gnattest test -driver: gnattest_driver +driver: shell_script diff --git a/testsuite/tests/test/instrument_bodies/test.yaml b/testsuite/tests/test/instrument_bodies/test.yaml index 97af15ae..4d72fc7a 100644 --- a/testsuite/tests/test/instrument_bodies/test.yaml +++ b/testsuite/tests/test/instrument_bodies/test.yaml @@ -2,5 +2,5 @@ description: Check instrumentation of subprograms declared in spec and having renaming, expression function and a null body in the package body. -driver: gnattest_driver +driver: shell_script diff --git a/testsuite/tests/test/instrument_expr_func/test.yaml b/testsuite/tests/test/instrument_expr_func/test.yaml index 621e2560..5589decb 100644 --- a/testsuite/tests/test/instrument_expr_func/test.yaml +++ b/testsuite/tests/test/instrument_expr_func/test.yaml @@ -3,5 +3,5 @@ description: of artificial package bodies for containing instrumented bodies if necessary, including library level package body. -driver: gnattest_driver +driver: shell_script diff --git a/testsuite/tests/test/latin_1_char/test.yaml b/testsuite/tests/test/latin_1_char/test.yaml index 8d9b67bc..6e9250fa 100644 --- a/testsuite/tests/test/latin_1_char/test.yaml +++ b/testsuite/tests/test/latin_1_char/test.yaml @@ -1,4 +1,4 @@ description: gnattest test -driver: gnattest_driver +driver: shell_script diff --git a/testsuite/tests/test/limited_access_stub/test.yaml b/testsuite/tests/test/limited_access_stub/test.yaml index 186d3898..6c2889d8 100644 --- a/testsuite/tests/test/limited_access_stub/test.yaml +++ b/testsuite/tests/test/limited_access_stub/test.yaml @@ -1,4 +1,4 @@ description: Check that gnattest does not consider in-mode access types as parameters for which stub setters must be generated. -driver: gnattest_driver +driver: shell_script diff --git a/testsuite/tests/test/marshalling_full_private/test.yaml b/testsuite/tests/test/marshalling_full_private/test.yaml index 3611a60e..e0698230 100644 --- a/testsuite/tests/test/marshalling_full_private/test.yaml +++ b/testsuite/tests/test/marshalling_full_private/test.yaml @@ -3,6 +3,6 @@ description: with no visible part (i.e. only declared in the private part of the package). -driver: gnattest_driver +driver: shell_script control: - [XFAIL, 'x86', 'Marshalling not working for 32bits (UB03-008)'] diff --git a/testsuite/tests/test/marshalling_nested/test.yaml b/testsuite/tests/test/marshalling_nested/test.yaml index 8004f3c4..ff4ee4ac 100644 --- a/testsuite/tests/test/marshalling_nested/test.yaml +++ b/testsuite/tests/test/marshalling_nested/test.yaml @@ -1,6 +1,6 @@ description: basic test for marshalling lib -driver: gnattest_driver +driver: shell_script control: - [XFAIL, 'x86', 'Marshalling not working for 32bits (UB03-008)'] diff --git a/testsuite/tests/test/marshalling_priv_nested/test.yaml b/testsuite/tests/test/marshalling_priv_nested/test.yaml index 3d8e0d5c..9cbc0c5f 100644 --- a/testsuite/tests/test/marshalling_priv_nested/test.yaml +++ b/testsuite/tests/test/marshalling_priv_nested/test.yaml @@ -2,4 +2,4 @@ description: test that private types declared in nested packages are correctly rejected by TGen. -driver: gnattest_driver +driver: shell_script diff --git a/testsuite/tests/test/marshalling_private/test.yaml b/testsuite/tests/test/marshalling_private/test.yaml index 8e1aaac7..6e53f8ff 100644 --- a/testsuite/tests/test/marshalling_private/test.yaml +++ b/testsuite/tests/test/marshalling_private/test.yaml @@ -1,6 +1,6 @@ description: test support for subtypes of incomplete types for the marshalling lib -driver: gnattest_driver +driver: shell_script control: - [XFAIL, 'x86', 'Marshalling not working for 32bits (UB03-008)'] diff --git a/testsuite/tests/test/marshalling_record_size/test.yaml b/testsuite/tests/test/marshalling_record_size/test.yaml index c966a814..863d4fbb 100644 --- a/testsuite/tests/test/marshalling_record_size/test.yaml +++ b/testsuite/tests/test/marshalling_record_size/test.yaml @@ -3,6 +3,6 @@ description: record type with constraints. This used to generated stray "@LPAR" in the marshaller code. -driver: gnattest_driver +driver: shell_script control: - [XFAIL, 'x86', 'Marshalling not working for 32bits (UB03-008)'] diff --git a/testsuite/tests/test/preprocessor/test.yaml b/testsuite/tests/test/preprocessor/test.yaml index e0acce3f..71771e2a 100644 --- a/testsuite/tests/test/preprocessor/test.yaml +++ b/testsuite/tests/test/preprocessor/test.yaml @@ -3,4 +3,4 @@ description: This test generates test cases and builds everything. The build is expected to succeed. -driver: gnattest_driver +driver: shell_script diff --git a/testsuite/tests/test/private_instantiation/test.yaml b/testsuite/tests/test/private_instantiation/test.yaml index dcee3b48..de52b9ce 100644 --- a/testsuite/tests/test/private_instantiation/test.yaml +++ b/testsuite/tests/test/private_instantiation/test.yaml @@ -3,5 +3,5 @@ description: a generic package instantiated in private part are properly ignored and not put into setter. -driver: gnattest_driver +driver: shell_script diff --git a/testsuite/tests/test/recursive_inputs/test.yaml b/testsuite/tests/test/recursive_inputs/test.yaml index ef198a6b..a4fe399e 100644 --- a/testsuite/tests/test/recursive_inputs/test.yaml +++ b/testsuite/tests/test/recursive_inputs/test.yaml @@ -1,5 +1,5 @@ description: Test checking that intermediate recursive inputs are not dumped -driver: gnattest_driver +driver: shell_script diff --git a/testsuite/tests/test/reporters/test.yaml b/testsuite/tests/test/reporters/test.yaml index f8999049..58ef277d 100644 --- a/testsuite/tests/test/reporters/test.yaml +++ b/testsuite/tests/test/reporters/test.yaml @@ -1,5 +1,5 @@ description: Test --reporter switch in non-monolyth modes. -driver: gnattest_driver +driver: shell_script diff --git a/testsuite/tests/test/tagada_marshalling/test.yaml b/testsuite/tests/test/tagada_marshalling/test.yaml index aa5c4aad..4ad1536e 100644 --- a/testsuite/tests/test/tagada_marshalling/test.yaml +++ b/testsuite/tests/test/tagada_marshalling/test.yaml @@ -2,6 +2,6 @@ description: Test checking tgen support (dynamic type introspection and binary / JSON marshallers) for all of the types supported by the library. -driver: gnattest_driver +driver: shell_script control: - [XFAIL, 'x86', 'Marshalling not working for 32bits (UB03-008)'] diff --git a/testsuite/tests/test/tc_json_dump_no_gen/test.yaml b/testsuite/tests/test/tc_json_dump_no_gen/test.yaml index db3ee1d0..82118d78 100644 --- a/testsuite/tests/test/tc_json_dump_no_gen/test.yaml +++ b/testsuite/tests/test/tc_json_dump_no_gen/test.yaml @@ -2,7 +2,7 @@ description: Test test-case dumping in JSON format for a subset of types, without test generation after the test-case dump. -driver: gnattest_driver +driver: shell_script resources: tc_dump: . diff --git a/testsuite/tests/test/tc_json_dump_with_gen/test.yaml b/testsuite/tests/test/tc_json_dump_with_gen/test.yaml index 8c240d27..de949d8e 100644 --- a/testsuite/tests/test/tc_json_dump_with_gen/test.yaml +++ b/testsuite/tests/test/tc_json_dump_with_gen/test.yaml @@ -2,7 +2,7 @@ description: Test test-case dumping in JSON format for a subset of types, with additional test generation after the test-case dump. -driver: gnattest_driver +driver: shell_script resources: tc_dump: . diff --git a/testsuite/tests/test/test_filtering/test.yaml b/testsuite/tests/test/test_filtering/test.yaml index 8d9b67bc..6e9250fa 100644 --- a/testsuite/tests/test/test_filtering/test.yaml +++ b/testsuite/tests/test/test_filtering/test.yaml @@ -1,4 +1,4 @@ description: gnattest test -driver: gnattest_driver +driver: shell_script diff --git a/testsuite/tests/test/test_inputs_tc_contract/test.yaml b/testsuite/tests/test/test_inputs_tc_contract/test.yaml index 936d2c11..267c2451 100644 --- a/testsuite/tests/test/test_inputs_tc_contract/test.yaml +++ b/testsuite/tests/test/test_inputs_tc_contract/test.yaml @@ -2,5 +2,5 @@ description: Test that test routines for different Test_Case of the same subprogram do not overwrite each other. -driver: gnattest_driver +driver: shell_script diff --git a/testsuite/tests/test/tgen_all_unsupported/test.yaml b/testsuite/tests/test/tgen_all_unsupported/test.yaml index 3328f0f8..0ec29760 100644 --- a/testsuite/tests/test/tgen_all_unsupported/test.yaml +++ b/testsuite/tests/test/tgen_all_unsupported/test.yaml @@ -2,6 +2,6 @@ description: Test that TGen does not crash when there are no supported subprogram for testcase generation. -driver: gnattest_driver +driver: shell_script control: - [XFAIL, 'x86', 'Marshalling not working for 32bits (UB03-008)'] diff --git a/testsuite/tests/test/tgen_diagnostics/test.yaml b/testsuite/tests/test/tgen_diagnostics/test.yaml index cf97a690..cc0e3de4 100644 --- a/testsuite/tests/test/tgen_diagnostics/test.yaml +++ b/testsuite/tests/test/tgen_diagnostics/test.yaml @@ -3,6 +3,6 @@ description: Test that TGen emits the right diagnostics if a type is unsupported, and also check that it produces a compilable support library in this case. -driver: gnattest_driver +driver: shell_script control: - [XFAIL, 'x86', 'Marshalling not working for 32bits (UB03-008)'] diff --git a/testsuite/tests/test/tgen_globals/test.yaml b/testsuite/tests/test/tgen_globals/test.yaml index a5fecef6..c3d11f69 100644 --- a/testsuite/tests/test/tgen_globals/test.yaml +++ b/testsuite/tests/test/tgen_globals/test.yaml @@ -1,6 +1,6 @@ description: Test support of global variables in TGen, using the Global aspect. -driver: gnattest_driver +driver: shell_script control: - [XFAIL, 'x86', 'Marshalling not working for 32bits (UB03-008)'] diff --git a/testsuite/tests/test/tgen_preprocessor_definitions/test.yaml b/testsuite/tests/test/tgen_preprocessor_definitions/test.yaml index 7ef7c5bd..6ed357e5 100644 --- a/testsuite/tests/test/tgen_preprocessor_definitions/test.yaml +++ b/testsuite/tests/test/tgen_preprocessor_definitions/test.yaml @@ -1,3 +1,3 @@ description: Check that preprocessing is being handled properly by TGen -driver: gnattest_driver +driver: shell_script diff --git a/testsuite/tests/test/tgen_system_address/test.yaml b/testsuite/tests/test/tgen_system_address/test.yaml index 4f9db32a..451e9b77 100644 --- a/testsuite/tests/test/tgen_system_address/test.yaml +++ b/testsuite/tests/test/tgen_system_address/test.yaml @@ -2,6 +2,6 @@ description: Test that TGen rightly rejects subprogram profiles with a System.Address formal. -driver: gnattest_driver +driver: shell_script control: - [XFAIL, 'x86', 'Marshalling not working for 32bits (UB03-008)'] diff --git a/testsuite/tests/test/uninit_str_marshalling/test.yaml b/testsuite/tests/test/uninit_str_marshalling/test.yaml index c4a6e4c6..d00e5934 100644 --- a/testsuite/tests/test/uninit_str_marshalling/test.yaml +++ b/testsuite/tests/test/uninit_str_marshalling/test.yaml @@ -1,7 +1,7 @@ description: Test test-case dumping in JSON format for uninitialized characters. -driver: gnattest_driver +driver: shell_script control: - [XFAIL, 'windows', 'Marshalling of chars broken on windows'] - [XFAIL, 'x86', 'Marshalling not working for 32bits (UB03-008)'] diff --git a/testsuite/testsuite.py b/testsuite/testsuite.py index df6124a9..668f772a 100755 --- a/testsuite/testsuite.py +++ b/testsuite/testsuite.py @@ -12,12 +12,10 @@ import e3.testsuite from e3.fs import sync_tree -from e3.os.fs import which from e3.os.process import Run from drivers.python_script import PythonScriptDriver from drivers.shell_script import ShellScriptDriver -from drivers.gnattest import GNATtestDriver class Testsuite(e3.testsuite.Testsuite): @@ -25,7 +23,6 @@ class Testsuite(e3.testsuite.Testsuite): test_driver_map = { "python_script": PythonScriptDriver, "shell_script": ShellScriptDriver, - "gnattest_driver": GNATtestDriver, } def add_options(self, parser): @@ -48,6 +45,13 @@ def add_options(self, parser): action="store_true", help="Rewrite test baselines according to current output.", ) + parser.add_argument( + "--setup-tgen-rts", + action="store_true", + help="Build and install TGen_RTS to prevent tests from re-building" + " the library. This is not needed if the environment already" + " provides the installed project." + ) def set_up(self): super().set_up() @@ -69,6 +73,45 @@ def set_up(self): os.environ["PATH"], ) + if self.main.args.setup_tgen_rts: + # Copy the TGen_RTS sources from the tree to a temporary directory + rts_build_dir = os.path.join(self.working_dir, "tgen_rts") + rts_install_dir = os.path.join(rts_build_dir, "local") + sync_tree( + os.path.join(self.root_dir, "..", "src", "tgen", "tgen_rts"), + rts_build_dir + ) + e3.testsuite.logger.info("Building TGen_RTS ...") + p_build = Run([ + "gprbuild", + f"-P{os.path.join(rts_build_dir, 'tgen_rts.gpr')}", + "-g", + "-bargs", + "-Es" + ]) + if p_build.status != 0: + e3.testsuite.logger.fatal( + f"Failed to build TGen_RTS: {p_build.out}" + ) + exit(1) + + e3.testsuite.logger.info("Installing TGen_RTS ...") + p_install = Run([ + "gprinstall", + "-p", + f"-P{os.path.join(rts_build_dir, 'tgen_rts.gpr')}", + f"--prefix={rts_install_dir}", + ]) + if p_install.status != 0: + e3.testsuite.logger.fatal( + f"Failed to install TGen_RTS: {p_install.out}" + ) + exit(1) + self.env.add_search_path( + "GPR_PROJECT_PATH", + os.path.join(rts_install_dir, "share", "gpr") + ) + if self.env.valgrind: # The --valgrind switch was given. Set the PATH to point to the # valgrind directory (see ../../valgrind/README).