Skip to content

Commit

Permalink
Auto merge of #79797 - jethrogb:sgx-fix-79038, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
Fix SGX CI, take 3

Broken in #79038

r? `@Mark-Simulacrum`

I actually ran `./x.py test --target x86_64-fortanix-unknown-sgx` on the commit before submitting it this time.
  • Loading branch information
bors committed Dec 7, 2020
2 parents afa995b + 9703bb8 commit 3d6705a
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions library/std/tests/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,11 @@ fn test_env_set_var() {
}

#[test]
#[cfg_attr(any(target_os = "emscripten", target_env = "sgx"), ignore)]
#[cfg_attr(not(any(unix, windows)), ignore, allow(unused))]
#[allow(deprecated)]
fn env_home_dir() {
use std::path::PathBuf;

fn var_to_os_string(var: Result<String, VarError>) -> Option<OsString> {
match var {
Ok(var) => Some(OsString::from(var)),
Expand All @@ -91,8 +93,6 @@ fn env_home_dir() {

cfg_if::cfg_if! {
if #[cfg(unix)] {
use std::path::PathBuf;

let oldhome = var_to_os_string(var("HOME"));

set_var("HOME", "/home/MountainView");
Expand All @@ -110,8 +110,6 @@ fn env_home_dir() {

if let Some(oldhome) = oldhome { set_var("HOME", oldhome); }
} else if #[cfg(windows)] {
use std::path::PathBuf;

let oldhome = var_to_os_string(var("HOME"));
let olduserprofile = var_to_os_string(var("USERPROFILE"));

Expand Down

0 comments on commit 3d6705a

Please sign in to comment.