-
-
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
5 changed files
with
52 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
""" | ||
Check the basic report of cache use | ||
""" | ||
|
||
from drivers import builds | ||
from drivers.alr import run_alr, init_local_crate, alr_with | ||
from drivers.asserts import assert_match | ||
|
||
# Default cache status after clean install | ||
|
||
assert_match("""\ | ||
Path:.*alr-config/cache | ||
Size: 0.0 B | ||
""", | ||
run_alr("cache").out) | ||
|
||
# Compile something with a dependency and there should be something in the | ||
# cache when builds are shared. | ||
|
||
init_local_crate() | ||
alr_with("libhello") | ||
run_alr("build") | ||
p = run_alr("cache") | ||
if builds.are_shared(): | ||
# Something already in the cache | ||
assert_match(r"Path:.*alr-config/cache\nSize: (?!0.0 B).*\n", p.out) | ||
else: | ||
# Still nothing if no shared cache | ||
assert_match(r"Path:.*alr-config/cache\nSize: 0.0 B\n", p.out) | ||
|
||
# After installing some toolchain, for sure there should be something in the cache | ||
|
||
run_alr("toolchain", "--select", "gnat_native=1", "gprbuild") | ||
p = run_alr("cache") | ||
assert_match(r"Path:.*alr-config/cache\nSize: (?!0.0 B).*\n", 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,5 @@ | ||
driver: python-script | ||
build_mode: both | ||
indexes: | ||
gnat_toolchain_index: {} | ||
basic_index: {} |