|
3 | 3 | import datetime |
4 | 4 | import logging |
5 | 5 | import os |
| 6 | +from shutil import which |
6 | 7 | import sys |
7 | | -from distutils.spawn import find_executable |
8 | 8 |
|
9 | 9 | from drivers.basic import JsonTestDriver |
10 | 10 | from drivers.gnatcov import GNATcov |
@@ -80,23 +80,22 @@ def lookup_program(self, *args): |
80 | 80 | return path + ".exe" |
81 | 81 |
|
82 | 82 | # Otherwise, look for the requested program name in the PATH. |
83 | | - # |
84 | | - # TODO (S710-005): for some reason, on Windows we need to strip the |
85 | | - # ".exe" suffix for the tester-run program to be able to spawn ALS. |
86 | | - result = find_executable(os.path.basename(path)) |
| 83 | + result = which(os.path.basename(path)) |
87 | 84 | if result is None: |
88 | 85 | raise RuntimeError( |
89 | 86 | "Could not find executable for {}".format(os.path.basename(path)) |
90 | 87 | ) |
91 | | - return result[: -len(".exe")] if result.endswith(".exe") else result |
| 88 | + # TODO (S710-005): for some reason, on Windows we need to strip the |
| 89 | + # ".exe" suffix for the tester-run program to be able to spawn ALS. |
| 90 | + return result[: -len(".exe")] if result.lower().endswith(".exe") else result |
92 | 91 |
|
93 | 92 | def set_up(self): |
94 | 93 | # Root directory for the "ada_language_server" repository |
95 | 94 | self.env.repo_base = os.path.abspath( |
96 | 95 | os.path.join(os.path.dirname(__file__), "..") |
97 | 96 | ) |
98 | 97 |
|
99 | | - self.env.wait_factor = 1 |
| 98 | + self.env.wait_factor = int(os.environ.get("ALS_WAIT_FACTOR", "1")) |
100 | 99 |
|
101 | 100 | # Absolute paths to programs that test drivers can use |
102 | 101 | if self.env.options.valgrind_memcheck: |
|
0 commit comments