diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2017-08-07 22:30:39 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2017-08-09 11:44:21 -0700 |
| commit | c25ddf21f18c3eeeaea2a4dffd70d2f6183068b5 (patch) | |
| tree | 9715e57405ae14bd7877dec129bce733daf72dc1 /src/libstd/process.rs | |
| parent | cc4ff8f4d169562ff4ae22b94197a191215e6d56 (diff) | |
| parent | c5e2051f070c01241f68720a92a0957bcb070597 (diff) | |
| download | rust-c25ddf21f18c3eeeaea2a4dffd70d2f6183068b5.tar.gz rust-c25ddf21f18c3eeeaea2a4dffd70d2f6183068b5.zip | |
Merge remote-tracking branch 'origin/master' into gen
Diffstat (limited to 'src/libstd/process.rs')
| -rw-r--r-- | src/libstd/process.rs | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/libstd/process.rs b/src/libstd/process.rs index 31809e38239..a872e7eee06 100644 --- a/src/libstd/process.rs +++ b/src/libstd/process.rs @@ -1417,8 +1417,19 @@ mod tests { let output = String::from_utf8(result.stdout).unwrap(); for (ref k, ref v) in env::vars() { - // don't check android RANDOM variables - if cfg!(target_os = "android") && *k == "RANDOM" { + // Don't check android RANDOM variable which seems to change + // whenever the shell runs, and our `env_cmd` is indeed running a + // shell which means it'll get a different RANDOM than we probably + // have. + // + // Also skip env vars with `-` in the name on android because, well, + // I'm not sure. It appears though that the `set` command above does + // not print env vars with `-` in the name, so we just skip them + // here as we won't find them in the output. Note that most env vars + // use `_` instead of `-`, but our build system sets a few env vars + // with `-` in the name. + if cfg!(target_os = "android") && + (*k == "RANDOM" || k.contains("-")) { continue } |
