Skip to content

Commit

Permalink
Merge branch 'topic/common_testsuite_sources' into 'master'
Browse files Browse the repository at this point in the history
Remove usage of libadalang-internal-testsuite and use common-testsuite-sources

See merge request eng/libadalang/langkit-query-language!126
  • Loading branch information
HugoGGuerrier committed Oct 24, 2023
2 parents ce8bd55 + 5c5768a commit cdb5231
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ testsuite/out/
lkql/build.sh
testsuite/build
testsuite/libadalang
testsuite/ada_projects/libadalang-internal-testsuite
testsuite/ada_projects/common-testsuite-sources
testsuite/run_testsuite.sh
callgrind*
gnatcheck.out
Expand Down
2 changes: 1 addition & 1 deletion testsuite/tests/perf/gnatcoll/test.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
driver: 'gnatcheck'
project: 'libadalang-internal-testsuite/sources/gnatcoll/gnatcoll.gpr'
project: 'common-testsuite-sources/gnatcoll/gnatcoll.gpr'
rules:
- +Rrecursive_subprograms
- +Routside_references_from_subprograms
Expand Down
2 changes: 1 addition & 1 deletion testsuite/tests/perf/gnatcoverage/test.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
driver: 'gnatcheck'
project: 'libadalang-internal-testsuite/sources/gnatcoverage/gnatcov.gpr'
project: 'common-testsuite-sources/gnatcoverage/gnatcov.gpr'
rules:
- +Rrecursive_subprograms
- +Routside_references_from_subprograms
Expand Down
16 changes: 9 additions & 7 deletions testsuite/testsuite.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,21 +154,23 @@ def set_up(self) -> None:
])

# If the performance mode is enabled, verify that the user has checked
# out the libadalang-internal-testsuite in the "ada_projects" directory.
# out the common-testsuite-sources in the "ada_projects" directory.
# Additionally add the internal sources to the GPR project path.
if self.env.options.perf_mode:
lalinttest_dir = P.join(
common_sources = P.join(
self.root_dir,
"ada_projects",
"libadalang-internal-testsuite"
"common-testsuite-sources"
)
if not P.isdir(lalinttest_dir):
if not P.isdir(common_sources):
raise RuntimeError("You need to check out"
" 'libadalang-internal-testsuite' to enable"
" 'common-testsuite-sources' to enable"
" performance testing")
else:
lalinttest_sources = glob.glob(P.join(lalinttest_dir, "sources", "*"))
for source_dir in [s for s in lalinttest_sources if P.isdir(s)]:
lalinttest_sources = glob.glob(P.join(common_sources, "*"))
for source_dir in [
s for s in lalinttest_sources if P.isdir(s)
]:
os.environ['GPR_PROJECT_PATH'] = P.pathsep.join([
source_dir,
os.environ.get("GPR_PROJECT_PATH", ""),
Expand Down

0 comments on commit cdb5231

Please sign in to comment.