Skip to content

Commit 753697b

Browse files
committed
Merge branch 'topic/consistent_runner_output' into 'master'
Test: Homogenize output of the test runner See merge request eng/ide/libadalang-tools!309
2 parents be79393 + 36ddedd commit 753697b

File tree

6 files changed

+56
-27
lines changed

6 files changed

+56
-27
lines changed

src/test-skeleton.adb

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1550,6 +1550,7 @@ package body Test.Skeleton is
15501550
& Trim (Subp_Span.Start_Line'Img, Both)
15511551
& ":"
15521552
& Trim (Subp_Span.Start_Column'Img, Both)
1553+
& ":"
15531554
& Get_TR_Name_Suffix (Subp.Subp_Declaration.As_Basic_Decl)
15541555
& " instance at "
15551556
& Instance_Sloc.all);
@@ -1561,8 +1562,9 @@ package body Test.Skeleton is
15611562
& Trim (Subp_Span.Start_Line'Img, Both)
15621563
& ":"
15631564
& Trim (Subp_Span.Start_Column'Img, Both)
1564-
& Get_TR_Name_Suffix (Subp.Subp_Declaration.As_Basic_Decl)
1565-
& ":");
1565+
& ":"
1566+
& Get_TR_Name_Suffix
1567+
(Subp.Subp_Declaration.As_Basic_Decl));
15661568
end if;
15671569
end;
15681570

@@ -2060,8 +2062,9 @@ package body Test.Skeleton is
20602062
& Trim (First_Line_Number (ISub)'Img, Both)
20612063
& ":"
20622064
& Trim (First_Column_Number (ISub)'Img, Both)
2065+
& ":"
20632066
& Get_TR_Name_Suffix (ISub)
2064-
& ": inherited at "
2067+
& " inherited at "
20652068
& Base_Name (Type_Dec.Unit.Get_Filename)
20662069
& ":"
20672070
& Trim (First_Line_Number (Type_Dec)'Img, Both)
@@ -2210,8 +2213,9 @@ package body Test.Skeleton is
22102213
& Trim (First_Line_Number (OSub)'Img, Both)
22112214
& ":"
22122215
& Trim (First_Column_Number (OSub)'Img, Both)
2216+
& ":"
22132217
& Get_TR_Name_Suffix (OSub)
2214-
& ": overridden at "
2218+
& " overridden at "
22152219
& Base_Name (TR_W.Original_Type.Unit.Get_Filename)
22162220
& ":"
22172221
& Trim
@@ -3637,8 +3641,9 @@ package body Test.Skeleton is
36373641
& Trim (First_Line_Number (TC.Elem)'Img, Both)
36383642
& ":"
36393643
& Trim (First_Column_Number (TC.Elem)'Img, Both)
3640-
& (if Include_Subp_Name then " (" & TC.Name.all & ")" else "")
3641-
& ":");
3644+
& ":"
3645+
& (if Include_Subp_Name then "(" & TC.Name.all & ")"
3646+
else ""));
36423647
else
36433648
TR_Info_Add.TR_Info.Tested_Sloc :=
36443649
new String'
@@ -3647,7 +3652,8 @@ package body Test.Skeleton is
36473652
& Trim (First_Line_Number (TC.Elem)'Img, Both)
36483653
& ":"
36493654
& Trim (First_Column_Number (TC.Elem)'Img, Both)
3650-
& (if Include_Subp_Name then " (" & TC.Name.all & ")" else "")
3655+
& ":"
3656+
& (if Include_Subp_Name then "(" & TC.Name.all & ")" else "")
36513657
& " instance at "
36523658
& Instance_Sloc);
36533659
end if;
@@ -7669,7 +7675,9 @@ package body Test.Skeleton is
76697675
& Image
76707676
(Start_Sloc
76717677
(Subp.Subp_Declaration.Sloc_Range))
7672-
& ":")),
7678+
& ":"
7679+
& Get_TR_Name_Suffix
7680+
(Subp.Subp_Declaration.As_Basic_Decl))),
76737681
Test_Package => new String'(Test_Unit_Name),
76747682
Original_Type => No_Ada_Node,
76757683
Original_Subp => Subp.Subp_Declaration,

testsuite/tests/test/203-generic-packages-architecture/test.out

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,10 @@ qux.ads:6:4: info: corresponding test PASSED
104104
qux.ads:6:4: info: corresponding test PASSED
105105
qux.ads:6:4: info: corresponding test PASSED
106106
qux.ads:3:4: error: corresponding test FAILED: Test not implemented. (qux-test_data-tests.adb:45)
107-
foo.ads:5:4 instance at qux.ads:8:4: error: corresponding test FAILED: Test not implemented. (foo-test_data-tests.adb:44)
108-
foo.ads:6:4 instance at qux.ads:8:4: error: corresponding test FAILED: Test not implemented. (foo-test_data-tests.adb:65)
109-
foo.ads:5:4 instance at qux.ads:10:7: error: corresponding test FAILED: Test not implemented. (foo-test_data-tests.adb:44)
110-
foo.ads:6:4 instance at qux.ads:10:7: error: corresponding test FAILED: Test not implemented. (foo-test_data-tests.adb:65)
111-
foo.ads:5:4 instance at qux.ads:11:7: error: corresponding test FAILED: Test not implemented. (foo-test_data-tests.adb:44)
112-
foo.ads:6:4 instance at qux.ads:11:7: error: corresponding test FAILED: Test not implemented. (foo-test_data-tests.adb:65)
107+
foo.ads:5:4: instance at qux.ads:8:4: error: corresponding test FAILED: Test not implemented. (foo-test_data-tests.adb:44)
108+
foo.ads:6:4: instance at qux.ads:8:4: error: corresponding test FAILED: Test not implemented. (foo-test_data-tests.adb:65)
109+
foo.ads:5:4: instance at qux.ads:10:7: error: corresponding test FAILED: Test not implemented. (foo-test_data-tests.adb:44)
110+
foo.ads:6:4: instance at qux.ads:10:7: error: corresponding test FAILED: Test not implemented. (foo-test_data-tests.adb:65)
111+
foo.ads:5:4: instance at qux.ads:11:7: error: corresponding test FAILED: Test not implemented. (foo-test_data-tests.adb:44)
112+
foo.ads:6:4: instance at qux.ads:11:7: error: corresponding test FAILED: Test not implemented. (foo-test_data-tests.adb:65)
113113
112 tests run: 105 passed; 7 failed; 0 crashed.

testsuite/tests/test/210-runner-subp-name/pkg.ads

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
package Pkg is
22

33
procedure Simple (X : Integer);
4-
procedure With_TC (X : Integer);
4+
procedure With_TC (X : Integer) with
5+
Test_Case => (Name => "Trivial_TC",
6+
Mode => Nominal);
57

68
type Pkg_T is tagged null record;
79

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,28 @@
1-
pkg.ads:8:4 (Pkg.Inherited_Prim): info: corresponding test PASSED
2-
pkg.ads:9:4 (Pkg.Overridden_Prim): info: corresponding test PASSED
3-
pkg.ads:3:4 (Pkg.Simple): info: corresponding test PASSED
4-
pkg.ads:4:4 (Pkg.With_TC): info: corresponding test PASSED
5-
gen.ads:4:4 (Gen.Gen) instance at user.ads:11:4: info: corresponding test PASSED
6-
user.ads:7:4 (User.Overridden_Prim): info: corresponding test PASSED
7-
pkg.ads:8:4 (Pkg.Inherited_Prim): inherited at user.ads:6:4: info: corresponding test PASSED
8-
pkg.ads:9:4 (Pkg.Overridden_Prim): overridden at user.ads:7:4: info: corresponding test PASSED
9-
8 tests run: 8 passed; 0 failed; 0 crashed.
1+
gnattest: Error while processing <SubpDecl ["Inherited_Prim"] pkg.ads:10:4-10:41>:
2+
pkg.inherited_prim.X: pkg.pkg_t is not supported (tagged types not supported)
3+
4+
gnattest: Error while processing <SubpDecl ["Overridden_Prim"] pkg.ads:11:4-11:42>:
5+
pkg.overridden_prim.X: pkg.pkg_t is not supported (tagged types not supported)
6+
7+
gnattest: Error while processing <SubpDecl ["Overridden_Prim"] user.ads:7:4-7:54>:
8+
user.overridden_prim.X: user.user_t is not supported (tagged types not supported)
9+
10+
pkg.ads:10:4: (Pkg.Inherited_Prim) info: corresponding test PASSED
11+
pkg.ads:11:4: (Pkg.Overridden_Prim) info: corresponding test PASSED
12+
pkg.ads:3:4: (Pkg.Simple) info: corresponding test PASSED
13+
pkg.ads:3:4: (Pkg.Simple) info: corresponding test PASSED
14+
pkg.ads:3:4: (Pkg.Simple) info: corresponding test PASSED
15+
pkg.ads:3:4: (Pkg.Simple) info: corresponding test PASSED
16+
pkg.ads:3:4: (Pkg.Simple) info: corresponding test PASSED
17+
pkg.ads:4:4: (Pkg.With_TC) info: corresponding test PASSED
18+
pkg.ads:4:4: (Pkg.With_TC) info: corresponding test PASSED
19+
pkg.ads:4:4: (Pkg.With_TC) info: corresponding test PASSED
20+
pkg.ads:4:4: (Pkg.With_TC) info: corresponding test PASSED
21+
pkg.ads:4:4: (Pkg.With_TC) info: corresponding test PASSED
22+
pkg.ads:3:4: (Pkg.Simple) info: corresponding test PASSED
23+
pkg.ads:5:6:(Trivial_TC) info: corresponding test PASSED
24+
gen.ads:4:4: (Gen.Gen) instance at user.ads:11:4: info: corresponding test PASSED
25+
user.ads:7:4: (User.Overridden_Prim) info: corresponding test PASSED
26+
pkg.ads:10:4: (Pkg.Inherited_Prim) inherited at user.ads:6:4: info: corresponding test PASSED
27+
pkg.ads:11:4: (Pkg.Overridden_Prim) overridden at user.ads:7:4: info: corresponding test PASSED
28+
18 tests run: 18 passed; 0 failed; 0 crashed.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/sh
22

3-
gnattest -P prj.gpr --include-subp-name --skeleton-default=pass --validate-type-extensions -q
3+
gnattest -P prj.gpr --include-subp-name --skeleton-default=pass --validate-type-extensions -q --gen-test-vectors
44
gprbuild -P obj/gnattest/harness/test_driver.gpr -q
55
./obj/gnattest/harness/test_runner

testsuite/tests/test/test_filtering/test.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ simple case
22
simple.ads:3:4: info: corresponding test PASSED
33
1 tests run: 1 passed; 0 failed; 0 crashed.
44
generics
5-
sorting_algorithms.ads:9:4 instance at instantiations.ads:4:4: info: corresponding test PASSED
6-
sorting_algorithms.ads:9:4 instance at instantiations.ads:8:4: info: corresponding test PASSED
5+
sorting_algorithms.ads:9:4: instance at instantiations.ads:4:4: info: corresponding test PASSED
6+
sorting_algorithms.ads:9:4: instance at instantiations.ads:8:4: info: corresponding test PASSED
77
2 tests run: 2 passed; 0 failed; 0 crashed.
88
oop (inheritance)
99
speed1.ads:6:4: info: corresponding test PASSED

0 commit comments

Comments
 (0)