-
-
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.
- Loading branch information
Showing
3 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
testsuite/fixtures/compiler_only_index/gp/gprbuild/gprbuild-external.toml
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,11 @@ | ||
description = "Fake gprbuild external" | ||
name = "gprbuild" | ||
|
||
maintainers = ["[email protected]"] | ||
maintainers-logins = ["mosteo"] | ||
|
||
[[external]] | ||
kind = "version-output" | ||
# We look for make instead, that should be always installed. | ||
version-command = ["make", "--version"] | ||
version-regexp = ".*Make ([\\d\\.]+).*" |
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,25 @@ | ||
""" | ||
When an external compiler is explicitly configured, no other compiler will be | ||
attempted to be added to the solution. This may be counterintuitive, so we emit | ||
an special warning in this case. | ||
""" | ||
|
||
from drivers.alr import run_alr, init_local_crate | ||
from drivers.asserts import assert_match | ||
|
||
|
||
init_local_crate() | ||
|
||
# Select the external compiler | ||
run_alr("toolchain", "--select", "gnat_external", "gprbuild") | ||
|
||
# Add a different version to the solution | ||
p = run_alr("with", "gnat^9999", force=True, quiet=False) | ||
|
||
# Check that the warning is emitted | ||
assert_match(".*The explicitly configured external compiler gnat_external=.*" | ||
"cannot satisfy dependency in solution gnat\^9999", | ||
p.out) | ||
|
||
|
||
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,4 @@ | ||
driver: python-script | ||
build_mode: both | ||
indexes: | ||
compiler_only_index: {} |