-
-
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.
This may be useful when no direct editing of manifests is convenient, as otherwise `printenv` will always use the manifest's configuration.
- Loading branch information
Showing
5 changed files
with
56 additions
and
1 deletion.
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,34 @@ | ||
""" | ||
Test that `alr printenv --last-build` works as expected. | ||
""" | ||
|
||
from drivers import builds | ||
from drivers.alr import alr_with, init_local_crate, run_alr | ||
from drivers.asserts import assert_match | ||
|
||
builds.enable_shared() | ||
|
||
init_local_crate() | ||
alr_with("libhello") | ||
run_alr("build") | ||
|
||
# After a default build, we obtain the hash of the build in release mode | ||
hash_release = builds.find_hash("libhello") | ||
|
||
builds.clear_builds_dir() | ||
|
||
# Now obtain the hash of the build in development mode | ||
run_alr("build", "--profiles=*=development") | ||
hash_devel = builds.find_hash("libhello") | ||
|
||
assert hash_release != hash_devel, "Hashes should be different" | ||
|
||
# Check default printenv behavior | ||
p = run_alr("printenv") | ||
assert_match(f".*LIBHELLO_ALIRE_PREFIX=[^\n]*{hash_release}", p.out) | ||
|
||
# Check printenv --last-build behavior | ||
p = run_alr("printenv", "--last-build") | ||
assert_match(f".*LIBHELLO_ALIRE_PREFIX=[^\n]*{hash_devel}", 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,3 @@ | ||
driver: python-script | ||
indexes: | ||
build_hash_index: {} |