mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-11-05 04:06:38 +08:00
Merge branch 'cargo-test' into 'master'
Fix flaky cargo test See merge request redox-os/redox!2227
This commit is contained in:
commit
6797dbbec9
@ -209,6 +209,11 @@ pub fn get_config() -> &'static CookbookConfig {
|
||||
return CONFIG.get().expect("Configuration is not initialized");
|
||||
}
|
||||
|
||||
/// Fallible version of get_config(), because it's not loaded when testing
|
||||
pub fn try_get_config() -> Option<&'static CookbookConfig> {
|
||||
return CONFIG.get();
|
||||
}
|
||||
|
||||
pub fn translate_mirror(original_url: &str) -> String {
|
||||
let config = CONFIG.get().expect("Configuration is not initialized");
|
||||
|
||||
|
||||
@ -23,7 +23,9 @@ fn auto_deps_from_dynamic_linking(
|
||||
) -> BTreeSet<PackageName> {
|
||||
let mut paths = BTreeSet::new();
|
||||
let mut visited = BTreeSet::new();
|
||||
let verbose = crate::config::get_config().cook.verbose;
|
||||
let verbose = crate::config::try_get_config()
|
||||
.map(|s| s.cook.verbose)
|
||||
.unwrap_or(true);
|
||||
// Base directories may need to be updated for packages that place binaries in odd locations.
|
||||
let mut walk = VecDeque::new();
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user