Skip to content

Commit d4a063e

Browse files
committed
Fixing test
Use `light` runtime that is accessible on both lin/win (no-tn-check)
1 parent 965730c commit d4a063e

File tree

1 file changed

+10
-4
lines changed
  • testsuite/ada_lsp/config_file

1 file changed

+10
-4
lines changed

testsuite/ada_lsp/config_file/test.py

+10-4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
configurationFile configuration option and have proper navigation
44
"""
55

6+
import e3
67
import subprocess
78
from drivers.pylsp import (
89
ALSLanguageClient,
@@ -18,8 +19,13 @@
1819
Location,
1920
)
2021

21-
# create default.cgpr configuration file that will use sjlj runtime
22-
subprocess.check_call(["gprconfig", "--batch", "--config=Ada,,sjlj,,GNAT"])
22+
if "windows" in e3.env.Env().build.platform:
23+
runtime = "light"
24+
else:
25+
runtime = "sjlj"
26+
27+
# create default.cgpr configuration file that will use not-native runtime
28+
subprocess.check_call(["gprconfig", "--batch", "--config=Ada,," + runtime + ",,GNAT"])
2329

2430

2531
@test()
@@ -42,7 +48,7 @@ async def do_testing(lsp: ALSLanguageClient) -> None:
4248
# Check result
4349
assert result
4450
assert isinstance(result, Location)
45-
assertEqual("sjlj" in result.uri, True)
51+
assertEqual(runtime in result.uri, True)
4652

4753
# Check relative to root paths
4854
lsp.didChangeConfig(
@@ -62,4 +68,4 @@ async def do_testing(lsp: ALSLanguageClient) -> None:
6268
# Check result
6369
assert result
6470
assert isinstance(result, Location)
65-
assertEqual("sjlj" in result.uri, True)
71+
assertEqual(runtime in result.uri, True)

0 commit comments

Comments
 (0)