-
-
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
2 changed files
with
37 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
""" | ||
Check that when running `alr test` with the verbose flag, the spawned command | ||
of the default test action inherits the verbosity flag. | ||
""" | ||
|
||
import os | ||
from drivers.alr import init_local_crate, run_alr | ||
from drivers.asserts import assert_not_substring, assert_substring | ||
from drivers.helpers import content_of | ||
|
||
# Run `alr test` in a local crate for this test with increasing verbosity | ||
# levels; we check the existence of expected output in the test log. The | ||
# selected messages are representative of the log level at play. | ||
|
||
LOGFILE = os.path.join("alire", "alr_test_local.log") | ||
|
||
init_local_crate() | ||
|
||
# Default log level | ||
run_alr("test", quiet=False) | ||
assert_not_substring("alr build done", content_of(LOGFILE)) | ||
|
||
# Verbose | ||
run_alr("-v", "test", quiet=False) | ||
assert_substring("alr build done", content_of(LOGFILE)) | ||
assert_not_substring("Setenv ALIRE=True", content_of(LOGFILE)) | ||
|
||
# More verbose | ||
run_alr("-vv", "test", quiet=False) | ||
assert_substring("alr build done", content_of(LOGFILE)) | ||
assert_substring("Setenv ALIRE=True", content_of(LOGFILE)) | ||
|
||
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: {} |