-
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: compiler autoselection on 1st run alr get --build (#1706)
- Loading branch information
Showing
6 changed files
with
65 additions
and
4 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
""" | ||
Check the `alr get --build` combo on 1st run with no available compiler. We | ||
test under a pristine environment to avoid re-occurrence of issue #1671, which | ||
only happens when no compiler has been selected yet, and none is available in | ||
the environment. | ||
""" | ||
|
||
import subprocess | ||
from drivers.alr import run_alr, set_default_user_settings | ||
|
||
# First undo any testsuite compiler and index setup | ||
set_default_user_settings() | ||
|
||
# Remove gnat from path so no compiler is available | ||
subprocess.run(['sudo', 'mv', '/usr/bin/gnat', '/usr/bin/gnat.bak']).check_returncode() | ||
try: | ||
assert subprocess.run(['gnat', '--version']).returncode == 0, "Unexpected GNAT found" | ||
except FileNotFoundError: | ||
pass | ||
|
||
# Should succeed, issue in #1671 was that no compiler was available nor | ||
# selected automatically as should have been the case. | ||
p = run_alr('get', '--build', 'hello') | ||
|
||
|
||
print('SUCCESS') |
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 @@ | ||
driver: docker-wrapper | ||
control: | ||
- [SKIP, "skip_docker", "Docker disabled"] | ||
- [SKIP, "skip_network", "Network disabled"] | ||
# To exactly reproduce the issue we use the community index here |