Skip to content

Commit 7e6dea6

Browse files
authoredMar 24, 2025
fix: remove style checks from all profiles (#1919)
* Assertions test and related changes * Disable style checks in all profiles * Fix style-related tests * Update PR number in user changes
1 parent ea80aa4 commit 7e6dea6

File tree

22 files changed

+146
-102
lines changed

22 files changed

+146
-102
lines changed
 

‎BREAKING.md

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ may change.
1010
- manifest: added `[test]` section.
1111
- manifest: array of licenses is no longer supported (SPDX expressions allow multiple licenses).
1212
- alr: setting a builtin without `--builtin` will emit a new warning.
13+
- alr: style checks are now disabled by default in all build profiles.
1314

1415
### We are here
1516

‎doc/catalog-format-spec.md

+9-3
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ static, i.e. they cannot depend on the context.
439439
```
440440

441441
- `test`: optional section that configures the behavior of `alr test`.
442-
The test section accepts dynamic expressions, making it possible to use
442+
The test section accepts dynamic expressions, making it possible to use
443443
different test runners on different platforms. The general syntax for this
444444
section is:
445445

@@ -718,10 +718,16 @@ static, i.e. they cannot depend on the context.
718718
[build-switches]
719719
release.runtime_checks = "Everything"
720720
```
721-
To disable style checks for all profiles:
721+
Note that style checks are disabled by default in all profiles. To enable style checks for all profiles:
722722
```toml
723723
[build-switches]
724-
"*".style_checks = "No"
724+
"*".style_checks = "Yes"
725+
```
726+
727+
Or, to enable style checks only in, e.g., the validation profile:
728+
```toml
729+
[build-switches]
730+
validation.style_checks = "Yes"
725731
```
726732

727733
All switch categories also accept a custom list of switches, for instance:

‎doc/user-changes.md

+22
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,28 @@ stay on top of `alr` new features.
66

77
## Release `3.0`
88

9+
### Style checks disabled by default in all build profiles
10+
11+
PR [#1919](https://github.com/alire-project/alire/pull/1919)
12+
13+
Style checks are now disabled by default in all build profiles (release, validation, and development). Previously, style checks were enabled by default in the validation and development profiles. This change intends to avoid unwanted compiler errors related to style issues.
14+
15+
To enable former style checks, you can use the `build-switches` table in your manifest:
16+
17+
```toml
18+
[build-switches]
19+
"*".style_checks = "Yes" # Enable for all profiles
20+
```
21+
22+
Or for a specific profile:
23+
24+
```toml
25+
[build-switches]
26+
validation.style_checks = "Yes" # Enable only for validation profile
27+
```
28+
29+
Alternatively, `gnatformat` is available in the community index to easily apply the default GNAT style.
30+
931
### New `--builtin` switch for `alr settings`
1032

1133
PR [#1912](https://github.com/alire-project/alire/pull/1912)

‎src/alire/alire-templates-builtins.ads

+6-6
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ with R.Crate_Lib_Src_Name_Ads;
1414
with R.Crate_Test_Tests_Alire_Toml;
1515
with R.Crate_Test_Tests_Common_Name_Tests_Ads;
1616
with R.Crate_Test_Tests_Crate_Test_Tests_Gpr;
17-
with R.Crate_Test_Tests_Src_Name_Testsxexample_Test_Adb;
17+
with R.Crate_Test_Tests_Src_Name_Testsxassertions_Enabled_Adb;
1818

1919
private with Alire.TOML_Adapters;
2020

@@ -73,11 +73,11 @@ package Alire.Templates.Builtins is
7373

7474
-- Files to initialize a test crate within a regular crate
7575
Crate_Test : constant Tree := New_Tree
76-
.Append (".gitignore", +R.Crate_Common_Gitignore_Hidden.Content)
77-
.Append ("alire.toml", +R.Crate_Test_Tests_Alire_Toml.Content)
78-
.Append ("@_NAME_@_tests.gpr", +R.Crate_Test_Tests_Crate_Test_Tests_Gpr.Content)
79-
.Append ("common/@_NAME_@_tests.ads", +R.Crate_Test_Tests_Common_Name_Tests_Ads.Content)
80-
.Append ("src/@_NAME_@_tests-example_test.adb", +R.Crate_Test_Tests_Src_Name_Testsxexample_Test_Adb.Content)
76+
.Append (".gitignore", +R.Crate_Common_Gitignore_Hidden.Content)
77+
.Append ("alire.toml", +R.Crate_Test_Tests_Alire_Toml.Content)
78+
.Append ("@_NAME_@_tests.gpr", +R.Crate_Test_Tests_Crate_Test_Tests_Gpr.Content)
79+
.Append ("common/@_NAME_@_tests.ads", +R.Crate_Test_Tests_Common_Name_Tests_Ads.Content)
80+
.Append ("src/@_NAME_@_tests-assertions_enabled.adb", +R.Crate_Test_Tests_Src_Name_Testsxassertions_Enabled_Adb.Content)
8181
;
8282

8383
private

‎src/alire/alire-utils-switches.ads

+2-2
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ is
160160
Runtime_Checks => (Custom => False, Value => Everything),
161161
Compile_Checks => (Custom => False, Value => Errors),
162162
Contracts => (Custom => False, Value => Yes),
163-
Style_Checks => (Custom => False, Value => Yes),
163+
Style_Checks => (Custom => False, Value => No),
164164
Ada_Version => (Custom => False, Value => Compiler_Default),
165165
Source_Encoding => (Custom => False, Value => UTF_8));
166166

@@ -170,7 +170,7 @@ is
170170
Runtime_Checks => (Custom => False, Value => Default),
171171
Compile_Checks => (Custom => False, Value => Warnings),
172172
Contracts => (Custom => False, Value => No),
173-
Style_Checks => (Custom => False, Value => Yes),
173+
Style_Checks => (Custom => False, Value => No),
174174
Ada_Version => (Custom => False, Value => Compiler_Default),
175175
Source_Encoding => (Custom => False, Value => UTF_8));
176176

‎src/templates/r-crate_test_tests_common_name_tests_ads.ads

+14-5
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,19 @@ package r.crate_test_tests_common_name_tests_ads is
1010
use Ada.Streams;
1111

1212
Content : aliased constant Stream_Element_Array :=
13-
(112, 97, 99, 107, 97, 103, 101, 32, 64, 95, 67, 65, 80, 73,
14-
84, 65, 76, 73, 90, 69, 58, 78, 65, 77, 69, 95, 64, 95,
15-
84, 101, 115, 116, 115, 32, 105, 115, 10, 10, 101, 110, 100, 32,
16-
64, 95, 67, 65, 80, 73, 84, 65, 76, 73, 90, 69, 58, 78,
17-
65, 77, 69, 95, 64, 95, 84, 101, 115, 116, 115, 59, 10);
13+
(112, 114, 97, 103, 109, 97, 32, 87, 97, 114, 110, 105, 110, 103,
14+
115, 32, 40, 79, 102, 102, 41, 59, 10, 119, 105, 116, 104, 32,
15+
65, 100, 97, 46, 65, 115, 115, 101, 114, 116, 105, 111, 110, 115,
16+
59, 32, 117, 115, 101, 32, 65, 100, 97, 46, 65, 115, 115, 101,
17+
114, 116, 105, 111, 110, 115, 59, 10, 45, 45, 32, 32, 77, 97,
18+
107, 101, 32, 65, 115, 115, 101, 114, 116, 32, 118, 105, 115, 105,
19+
98, 108, 101, 32, 116, 111, 32, 99, 104, 105, 108, 100, 114, 101,
20+
110, 10, 112, 114, 97, 103, 109, 97, 32, 87, 97, 114, 110, 105,
21+
110, 103, 115, 32, 40, 79, 110, 41, 59, 10, 10, 112, 97, 99,
22+
107, 97, 103, 101, 32, 64, 95, 67, 65, 80, 73, 84, 65, 76,
23+
73, 90, 69, 58, 78, 65, 77, 69, 95, 64, 95, 84, 101, 115,
24+
116, 115, 32, 105, 115, 10, 10, 101, 110, 100, 32, 64, 95, 67,
25+
65, 80, 73, 84, 65, 76, 73, 90, 69, 58, 78, 65, 77, 69,
26+
95, 64, 95, 84, 101, 115, 116, 115, 59, 10);
1827

1928
end r.crate_test_tests_common_name_tests_ads;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
2+
-- Generated by awsres from /support/embedder/embedder.sh
3+
4+
pragma Style_Checks (Off);
5+
6+
with Ada.Streams;
7+
8+
package r.crate_test_tests_src_name_testsxassertions_enabled_adb is
9+
10+
use Ada.Streams;
11+
12+
Content : aliased constant Stream_Element_Array :=
13+
(112, 114, 111, 99, 101, 100, 117, 114, 101, 32, 64, 95, 67, 65,
14+
80, 73, 84, 65, 76, 73, 90, 69, 58, 78, 65, 77, 69, 95,
15+
64, 95, 84, 101, 115, 116, 115, 46, 65, 115, 115, 101, 114, 116,
16+
105, 111, 110, 115, 95, 69, 110, 97, 98, 108, 101, 100, 32, 105,
17+
115, 10, 98, 101, 103, 105, 110, 10, 32, 32, 32, 98, 101, 103,
18+
105, 110, 10, 32, 32, 32, 32, 32, 32, 112, 114, 97, 103, 109,
19+
97, 32, 65, 115, 115, 101, 114, 116, 32, 40, 70, 97, 108, 115,
20+
101, 44, 32, 34, 83, 104, 111, 117, 108, 100, 32, 114, 97, 105,
21+
115, 101, 34, 41, 59, 10, 32, 32, 32, 101, 120, 99, 101, 112,
22+
116, 105, 111, 110, 10, 32, 32, 32, 32, 32, 32, 119, 104, 101,
23+
110, 32, 111, 116, 104, 101, 114, 115, 32, 61, 62, 10, 32, 32,
24+
32, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 59,
25+
32, 45, 45, 32, 112, 114, 111, 112, 101, 114, 108, 121, 32, 114,
26+
97, 105, 115, 101, 100, 10, 32, 32, 32, 101, 110, 100, 59, 10,
27+
32, 32, 32, 114, 97, 105, 115, 101, 32, 80, 114, 111, 103, 114,
28+
97, 109, 95, 69, 114, 114, 111, 114, 32, 119, 105, 116, 104, 32,
29+
34, 65, 115, 115, 101, 114, 116, 105, 111, 110, 32, 100, 105, 100,
30+
32, 110, 111, 116, 32, 114, 97, 105, 115, 101, 34, 59, 10, 101,
31+
110, 100, 32, 64, 95, 67, 65, 80, 73, 84, 65, 76, 73, 90,
32+
69, 58, 78, 65, 77, 69, 95, 64, 95, 84, 101, 115, 116, 115,
33+
46, 65, 115, 115, 101, 114, 116, 105, 111, 110, 115, 95, 69, 110,
34+
97, 98, 108, 101, 100, 59, 10);
35+
36+
end r.crate_test_tests_src_name_testsxassertions_enabled_adb;

‎src/templates/r-crate_test_tests_src_name_testsxexample_test_adb.ads

-30
This file was deleted.

‎src/templates/r.adb

+19-18
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ with r.crate_common_gitignore_hidden;
1111
with r.crate_lib_alire_toml;
1212
with r.crate_lib_name_gpr;
1313
with r.crate_lib_src_name_ads;
14-
with r.crate_test_tests_common_name_tests_ads;
1514
with r.crate_test_tests_alire_toml;
15+
with r.crate_test_tests_common_name_tests_ads;
1616
with r.crate_test_tests_crate_test_tests_gpr;
17-
with r.crate_test_tests_src_name_testsxexample_test_adb;
17+
with r.crate_test_tests_src_name_testsxassertions_enabled_adb;
1818

1919
with Alire.Templates;
2020
with GNAT.Calendar;
@@ -31,47 +31,48 @@ package body r is
3131
Register
3232
("crate_bin/alire.toml",
3333
r.crate_bin_alire_toml.Content'Access,
34-
GNAT.Calendar.Time_Of (2025, 03, 23, 12, 22, 19, 0.0));
34+
GNAT.Calendar.Time_Of (2025, 03, 23, 13, 44, 33, 0.0));
3535
Register
3636
("crate_bin/name.gpr",
3737
r.crate_bin_name_gpr.Content'Access,
38-
GNAT.Calendar.Time_Of (2025, 03, 23, 12, 22, 19, 0.0));
38+
GNAT.Calendar.Time_Of (2025, 03, 23, 13, 44, 33, 0.0));
3939
Register
4040
("crate_bin/src/name.adb",
4141
r.crate_bin_src_name_adb.Content'Access,
42-
GNAT.Calendar.Time_Of (2025, 03, 23, 12, 22, 19, 0.0));
42+
GNAT.Calendar.Time_Of (2025, 03, 23, 13, 44, 33, 0.0));
4343
Register
4444
("crate_common/gitignore.hidden",
4545
r.crate_common_gitignore_hidden.Content'Access,
46-
GNAT.Calendar.Time_Of (2025, 03, 23, 12, 22, 19, 0.0));
46+
GNAT.Calendar.Time_Of (2025, 03, 23, 13, 44, 33, 0.0));
4747
Register
4848
("crate_lib/alire.toml",
4949
r.crate_lib_alire_toml.Content'Access,
50-
GNAT.Calendar.Time_Of (2025, 03, 23, 12, 22, 19, 0.0));
50+
GNAT.Calendar.Time_Of (2025, 03, 23, 13, 44, 33, 0.0));
5151
Register
5252
("crate_lib/name.gpr",
5353
r.crate_lib_name_gpr.Content'Access,
54-
GNAT.Calendar.Time_Of (2025, 03, 23, 12, 22, 19, 0.0));
54+
GNAT.Calendar.Time_Of (2025, 03, 23, 13, 44, 33, 0.0));
5555
Register
5656
("crate_lib/src/name.ads",
5757
r.crate_lib_src_name_ads.Content'Access,
58-
GNAT.Calendar.Time_Of (2025, 03, 23, 12, 22, 19, 0.0));
59-
Register
60-
("crate_test/tests/common/name_tests.ads",
61-
r.crate_test_tests_common_name_tests_ads.Content'Access,
62-
GNAT.Calendar.Time_Of (2025, 03, 23, 12, 22, 36, 0.0));
58+
GNAT.Calendar.Time_Of (2025, 03, 23, 13, 44, 33, 0.0));
6359
Register
6460
("crate_test/tests/alire.toml",
6561
r.crate_test_tests_alire_toml.Content'Access,
66-
GNAT.Calendar.Time_Of (2025, 03, 23, 12, 53, 26, 0.0));
62+
GNAT.Calendar.Time_Of (2025, 03, 23, 13, 44, 33, 0.0));
63+
Register
64+
("crate_test/tests/common/name_tests.ads",
65+
r.crate_test_tests_common_name_tests_ads.Content'Access,
66+
GNAT.Calendar.Time_Of (2025, 03, 23, 13, 47, 17, 0.0));
6767
Register
6868
("crate_test/tests/crate_test_tests.gpr",
6969
r.crate_test_tests_crate_test_tests_gpr.Content'Access,
70-
GNAT.Calendar.Time_Of (2025, 03, 23, 12, 22, 36, 0.0));
70+
GNAT.Calendar.Time_Of (2025, 03, 23, 13, 44, 33, 0.0));
7171
Register
72-
("crate_test/tests/src/name_tests-example_test.adb",
73-
r.crate_test_tests_src_name_testsxexample_test_adb.Content'Access,
74-
GNAT.Calendar.Time_Of (2025, 03, 23, 12, 22, 36, 0.0));
72+
("crate_test/tests/src/name_tests-assertions_enabled."
73+
& "adb",
74+
r.crate_test_tests_src_name_testsxassertions_enabled_adb.Content'Access,
75+
GNAT.Calendar.Time_Of (2025, 03, 23, 14, 58, 35, 0.0));
7576
end if;
7677
end Init;
7778

‎support/embedder/templates.hash

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
bd09b5bb86786de540ea1abb442a642c0f9b363321c3c40b40a4b86a6d94cd27
1+
c75b12dca0d586a0869a7ab3689acc750a461e2760517ff00efda577e9f2a068
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
pragma Warnings (Off);
2+
with Ada.Assertions; use Ada.Assertions;
3+
-- Make Assert visible to children
4+
pragma Warnings (On);
5+
16
package @_CAPITALIZE:NAME_@_Tests is
27

38
end @_CAPITALIZE:NAME_@_Tests;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
procedure @_CAPITALIZE:NAME_@_Tests.Assertions_Enabled is
2+
begin
3+
begin
4+
pragma Assert (False, "Should raise");
5+
exception
6+
when others =>
7+
return; -- properly raised
8+
end;
9+
raise Program_Error with "Assertion did not raise";
10+
end @_CAPITALIZE:NAME_@_Tests.Assertions_Enabled;

‎templates/crate_test/tests/src/name_tests-example_test.adb

-7
This file was deleted.

‎testsuite/tests/build/hashes/hashing-inputs/test.py

+3-12
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,7 @@
4545
'external:TEST_UNDECLARED=used_by_another_crate\n' # modified GPR external
4646
'profile:libhello=VALIDATION\n' # build profile
4747
'switches:libhello=-O3,-fdata-sections,-ffunction-sections,-g,-gnatVa,'
48-
'-gnatW8,-gnata,-gnatn,-gnato,-gnatw.X,-gnatwa,-gnatwe,-gnaty-d,-gnaty3,'
49-
'-gnatyA,-gnatyB,-gnatyI,-gnatyO,-gnatyS,-gnatya,-gnatyb,-gnatyc,-gnatye,'
50-
'-gnatyf,-gnatyh,-gnatyi,-gnatyk,-gnatyl,-gnatym,-gnatyn,-gnatyp,-gnatyr,'
51-
'-gnatyt,-gnatyu,-gnatyx\n'
48+
'-gnatW8,-gnata,-gnatn,-gnato,-gnatw.X,-gnatwa,-gnatwe\n'
5249
f'version:gnat_external={external_compiler_version()}\n',
5350
# compiler version
5451
hash_input("libhello"))
@@ -68,10 +65,7 @@
6865
'external:LIBRARY_TYPE=default\n'
6966
'profile:hello=VALIDATION\n'
7067
'switches:hello=-O3,-fdata-sections,-ffunction-sections,-g,-gnatVa,'
71-
'-gnatW8,-gnata,-gnatn,-gnato,-gnatw.X,-gnatwa,-gnatwe,-gnaty-d,-gnaty3,'
72-
'-gnatyA,-gnatyB,-gnatyI,-gnatyO,-gnatyS,-gnatya,-gnatyb,-gnatyc,-gnatye,'
73-
'-gnatyf,-gnatyh,-gnatyi,-gnatyk,-gnatyl,-gnatym,-gnatyn,-gnatyp,-gnatyr,'
74-
'-gnatyt,-gnatyu,-gnatyx\n'
68+
'-gnatW8,-gnata,-gnatn,-gnato,-gnatw.X,-gnatwa,-gnatwe\n'
7569
f'version:gnat_external={external_compiler_version()}\n',
7670
hash_input("hello"))
7771

@@ -84,10 +78,7 @@
8478
'external:XXX_LIBRARY_TYPE=default\n'
8579
'profile:xxx=VALIDATION\n'
8680
'switches:xxx=-O3,-fdata-sections,-ffunction-sections,-g,-gnatVa,'
87-
'-gnatW8,-gnata,-gnatn,-gnato,-gnatw.X,-gnatwa,-gnatwe,-gnaty-d,-gnaty3,'
88-
'-gnatyA,-gnatyB,-gnatyI,-gnatyO,-gnatyS,-gnatya,-gnatyb,-gnatyc,-gnatye,'
89-
'-gnatyf,-gnatyh,-gnatyi,-gnatyk,-gnatyl,-gnatym,-gnatyn,-gnatyp,-gnatyr,'
90-
'-gnatyt,-gnatyu,-gnatyx\n',
81+
'-gnatW8,-gnata,-gnatn,-gnato,-gnatw.X,-gnatwa,-gnatwe\n',
9182
content_of(os.path.join("alire", "build_hash_inputs"))
9283
)
9384

‎testsuite/tests/build_profile/custom_profiles/test.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def check_config(path, profile, expected_switches=[]):
3030
# Check default profiles for root and dependency
3131
check_config(lib1_config, 'release', ['-O3', '-gnatn'])
3232
check_config(lib2_config, 'release', ['-O3', '-gnatn'])
33-
check_config(bin_config, 'development', ['-Og', '-g', '-gnatwa', '-gnaty3'])
33+
check_config(bin_config, 'development', ['-Og', '-g', '-gnatwa'])
3434

3535
# Create custom Release profile for lib_1
3636
with open('../lib_1/alire.toml', "a") as manifest:
@@ -56,7 +56,7 @@ def check_config(path, profile, expected_switches=[]):
5656
run_alr('update')
5757
check_config(lib1_config, 'release', ['-Os', '-gnata', '-gnat12'])
5858
check_config(lib2_config, 'validation', ['-Og', '-gnatX'])
59-
check_config(bin_config, 'development', ['-Og', '-g', '-gnatwa', '-gnaty3'])
59+
check_config(bin_config, 'development', ['-Og', '-g', '-gnatwa'])
6060

6161
# Check that the project builds
6262
run_alr('build')

‎testsuite/tests/build_profile/default/test.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def check_config(path, profile, expected_switches=[]):
3030
# Check default profiles for root and dependency
3131
check_config(lib1_config, 'release', ['-O3', '-gnatn', '-gnatW8'])
3232
check_config(lib2_config, 'release', ['-O3', '-gnatn', '-gnatW8'])
33-
check_config(bin_config, 'development', ['-Og', '-g', '-gnatwa', '-gnaty3', '-gnatW8'])
33+
check_config(bin_config, 'development', ['-Og', '-g', '-gnatwa', '-gnatW8'])
3434

3535
# Check if we can change the profile of a dependency
3636
with open(alr_manifest(), "a") as manifest:

‎testsuite/tests/test/crate-init/test.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
init_local_crate(with_test=True)
1010

1111
p = run_alr("test")
12-
assert_match(".*\[ PASS \] example_test.*", p.out)
12+
assert_match(".*\[ PASS \] assertions_enabled.*", p.out)
1313
# default test after init always fails
1414

1515
print('SUCCESS')

‎testsuite/tests/test/default-failure/test.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,26 @@
1111

1212
# Check with explicit exception
1313

14-
with open("./tests/src/xxx_tests-example_test.adb", "w") as f:
15-
f.write("""procedure Xxx_Tests.Example_Test is
14+
with open("./tests/src/xxx_tests-assertions_enabled.adb", "w") as f:
15+
f.write("""procedure Xxx_Tests.Assertions_Enabled is
1616
begin
1717
raise Program_Error;
18-
end Xxx_Tests.Example_Test;
18+
end Xxx_Tests.Assertions_Enabled;
1919
""")
2020

2121
p = run_alr("test", complain_on_error=False)
22-
assert_match(".*\[ FAIL \] example_test.*", p.out)
22+
assert_match(".*\[ FAIL \] assertions_enabled.*", p.out)
2323

2424
# Check with plain assertion (verify that assertions are evaluated)
2525

26-
with open("./tests/src/xxx_tests-example_test.adb", "w") as f:
27-
f.write("""procedure Xxx_Tests.Example_Test is
26+
with open("./tests/src/xxx_tests-assertions_enabled.adb", "w") as f:
27+
f.write("""procedure Xxx_Tests.Assertions_Enabled is
2828
begin
2929
pragma Assert (False);
30-
end Xxx_Tests.Example_Test;
30+
end Xxx_Tests.Assertions_Enabled;
3131
""")
3232

3333
p = run_alr("test", complain_on_error=False)
34-
assert_match(".*\[ FAIL \] example_test.*", p.out)
34+
assert_match(".*\[ FAIL \] assertions_enabled.*", p.out)
3535

3636
print('SUCCESS')

‎testsuite/tests/test/filtering/test.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def make_test(name: str):
1717
""")
1818

1919
init_local_crate("xxx", with_test=True)
20-
os.remove("./tests/src/xxx_tests-example_test.adb")
20+
os.remove("./tests/src/xxx_tests-assertions_enabled.adb")
2121

2222
for test in ["yes1", "yes2", "yes3", "no1", "no2"]:
2323
make_test(test)

‎testsuite/tests/test/nested-filtering/test.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def make_test(parent:str, name:str):
1818
""")
1919

2020
init_local_crate("xxx", with_test=True)
21-
os.remove("./tests/src/xxx_tests-example_test.adb")
21+
os.remove("./tests/src/xxx_tests-assertions_enabled.adb")
2222

2323
for parent, test in zip(["pos", "pos", "neg", "neg", "neg"],
2424
["yes1", "yes2", "yes3", "no1", "no2"]):

‎testsuite/tests/test/nested-tests/test.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
# Run `alr test` and check that two PASS lines exist with the proper test names
2828

2929
p = run_alr("test")
30-
assert_substring("[ PASS ] example_test", p.out)
30+
assert_substring("[ PASS ] assertions_enabled", p.out)
3131
assert_substring("[ PASS ] nested/nested_test", p.out)
3232

3333
# Create a third failing test to check its failure and output are reported

‎testsuite/tests/workflows/init-options/test.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
'xxx/tests/common',
4242
'xxx/tests/common/xxx_tests.ads',
4343
'xxx/tests/src',
44-
'xxx/tests/src/xxx_tests-example_test.adb',
44+
'xxx/tests/src/xxx_tests-assertions_enabled.adb',
4545
'xxx/tests/xxx_tests.gpr',
4646
'xxx/xxx.gpr'])
4747

@@ -70,7 +70,7 @@
7070
'aaa/tests/common',
7171
'aaa/tests/common/aaa_tests.ads',
7272
'aaa/tests/src',
73-
'aaa/tests/src/aaa_tests-example_test.adb'])
73+
'aaa/tests/src/aaa_tests-assertions_enabled.adb'])
7474

7575
# Init without skeleton
7676
run_alr('init', '--bin', '--no-skel', 'yyy')
@@ -138,7 +138,7 @@
138138
'./tests/common',
139139
'./tests/common/zzz_tests.ads',
140140
'./tests/src',
141-
'./tests/src/zzz_tests-example_test.adb',
141+
'./tests/src/zzz_tests-assertions_enabled.adb',
142142
'./tests/zzz_tests.gpr',
143143
'./zzz.gpr'])
144144

0 commit comments

Comments
 (0)
Please sign in to comment.