-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'topic/aggregate_projects' into 'master'
JGNATcheck: Add support for aggregate projects. Closes #76 See merge request eng/libadalang/langkit-query-language!81
- Loading branch information
Showing
10 changed files
with
72 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
testsuite/tests/gnatcheck/aggregate_project_external_vars/a.gpr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
project A is | ||
Dir := External ("SRC_DIR", "src_1"); | ||
|
||
for Source_Dirs use (Dir); | ||
end A; |
5 changes: 5 additions & 0 deletions
5
testsuite/tests/gnatcheck/aggregate_project_external_vars/agg.gpr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
aggregate project Agg is | ||
for External ("SRC_DIR") use "src_2"; | ||
|
||
for Project_Files use ("a.gpr", "b.gpr"); | ||
end Agg; |
5 changes: 5 additions & 0 deletions
5
testsuite/tests/gnatcheck/aggregate_project_external_vars/b.gpr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
project B is | ||
Dir := External ("SRC_DIR", "src_1"); | ||
|
||
for Source_Dirs use (Dir); | ||
end B; |
4 changes: 4 additions & 0 deletions
4
testsuite/tests/gnatcheck/aggregate_project_external_vars/src_1/test.adb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
procedure Test is | ||
begin | ||
null; | ||
end Test; |
4 changes: 4 additions & 0 deletions
4
testsuite/tests/gnatcheck/aggregate_project_external_vars/src_2/test.ads
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package Test is | ||
package Local is | ||
end Local; | ||
end Test; |
8 changes: 8 additions & 0 deletions
8
testsuite/tests/gnatcheck/aggregate_project_external_vars/test.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
Processing aggregated project /a.gpr | ||
Expected report file: /gnatcheck_1.out | ||
Exit code is 1 (rule violation(s) detected) | ||
|
||
Processing aggregated project /b.gpr | ||
Expected report file: /gnatcheck_2.out | ||
Exit code is 1 (rule violation(s) detected) |
10 changes: 10 additions & 0 deletions
10
testsuite/tests/gnatcheck/aggregate_project_external_vars/test.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# This test checks that aggregate project containing multiple aggregated | ||
# projects are handled correctly: | ||
# 1. Each aggregated project is analyzed independently. | ||
# 2. External attributes clauses in the aggregate project are correctly taken | ||
# into account in aggregated projects. | ||
|
||
driver: gnatcheck | ||
project: agg.gpr | ||
rules: | ||
- +Rlocal_packages |