-
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Relocate cache with config builtin
cache.dir
- Loading branch information
Showing
8 changed files
with
82 additions
and
9 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
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,30 @@ | ||
""" | ||
Check cache location overrides in increasing order of precedence. | ||
""" | ||
|
||
from drivers.alr import run_alr | ||
from drivers.asserts import assert_match | ||
|
||
# Default cache location (inside test config dir) | ||
assert_match(".*cache folder:[^\n]*config__cache-relocation/alr-config/cache", | ||
run_alr("version").out) | ||
|
||
# Check toolchain location inside cache location | ||
assert_match(".*toolchain folder:[^\n]*config__cache-relocation/alr-config/cache/toolchains", | ||
run_alr("version").out) | ||
|
||
# Override via config (takes precedence) | ||
run_alr("config", "--global", "--set", "cache.dir", "/relocated-to-root") | ||
assert_match(".*cache folder:\s+/relocated-to-root", | ||
run_alr("version").out) | ||
|
||
# Check toolchain location inside cache location | ||
assert_match(".*toolchain folder:[^\n]*/relocated-to-root/toolchains", | ||
run_alr("version").out) | ||
|
||
# Check toolchain override via config (takes precedence over cache override) | ||
run_alr("config", "--global", "--set", "toolchain.dir", "/relocated-toolchains") | ||
assert_match(".*toolchain folder:[^\n]*/relocated-toolchains", | ||
run_alr("version").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 # one of shared, sandboxed, both (default) | ||
indexes: | ||
compiler_only_index: {} |