Skip to content

Update ctest version #1419

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jul 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,12 @@ matrix:
- mv ci/switch.json switch.json
- cargo xbuild --target switch.json


allow_failures:
- name: "Semver Linux"
- name: "Semver MacOSX"
- env: TARGET=wasm32-wasi
- env: TARGET=powerpc-unknown-linux-gnu
- env: TARGET=s390x-unknown-linux-gnu

install: travis_retry rustup target add $TARGET

Expand Down
21 changes: 9 additions & 12 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
environment:
# When this was added there were revocation check failures when using the
# libcurl backend as libcurl checks by default, but rustup doesn't provide the
# switch to turn this off. Switch to Reqwest which looks to not check for
# revocation by default like libcurl does.
RUSTUP_USE_REQWEST: 1
CARGO_HTTP_CHECK_REVOKE: false
matrix:
- TARGET: x86_64-pc-windows-gnu
MSYS2_BITS: 64
MSYS_BITS: 64
ARCH: x86_64
- TARGET: i686-pc-windows-gnu
MSYS2_BITS: 32
MSYS_BITS: 32
ARCH: i686
- TARGET: x86_64-pc-windows-msvc
- TARGET: i686-pc-windows-msvc
install:
- appveyor-retry appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe
- rustup-init.exe -y --default-host %TARGET%
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
- if defined MSYS2_BITS set PATH=%PATH%;C:\msys64\mingw%MSYS2_BITS%\bin
- if defined MSYS_BITS set PATH=C:\msys64\mingw%MSYS_BITS%\bin;C:\msys64\usr\bin;%PATH%;
- ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-nightly-${env:TARGET}.exe"
- rust-nightly-%TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust"
- set PATH=%PATH%;C:\Program Files (x86)\Rust\bin
- if defined MSYS_BITS for %%I in (crt2.o dllcrt2.o libmsvcrt.a) do xcopy /Y "C:\msys64\mingw%MSYS_BITS%\%ARCH%-w64-mingw32\lib\%%I" "C:\Program Files (x86)\Rust\lib\rustlib\%TARGET%\lib"
- rustc -V
- cargo -V

Expand Down
80 changes: 79 additions & 1 deletion libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,12 @@ fn test_apple(target: &str) {
}
});

cfg.skip_roundtrip(move |s| match s {
// FIXME: TODO
"utsname" | "statfs" | "dirent" | "utmpx" => true,
_ => false,
});

cfg.generate("../src/lib.rs", "main.rs");
}

Expand Down Expand Up @@ -467,6 +473,11 @@ fn test_windows(target: &str) {
}
});

cfg.skip_roundtrip(move |s| match s {
"dirent" | "statfs" | "utsname" | "utmpx" => true,
_ => false,
});

cfg.generate("../src/lib.rs", "main.rs");
}

Expand Down Expand Up @@ -1426,6 +1437,13 @@ fn test_android(target: &str) {
field == "ssi_arch"))
});

let bit64 = target.contains("64");
cfg.skip_roundtrip(move |s| match s {
"utsname" | "dirent" | "dirent64" => true,
"utmp" if bit64 => true,
_ => false,
});

cfg.generate("../src/lib.rs", "main.rs");

test_linux_like_apis(target);
Expand Down Expand Up @@ -1628,6 +1646,11 @@ fn test_freebsd(target: &str) {
(struct_ == "sigaction" && field == "sa_sigaction")
});

cfg.skip_roundtrip(move |s| match s {
"dirent" | "statfs" | "utsname" | "utmpx" => true,
_ => false,
});

cfg.generate("../src/lib.rs", "main.rs");
}

Expand Down Expand Up @@ -1832,6 +1855,15 @@ fn test_emscripten(target: &str) {
field == "ssi_arch"))
});

cfg.skip_roundtrip(move |s| match s {
"pthread_mutexattr_t"
| "utsname"
| "dirent"
| "dirent64"
| "sysinfo" => true,
_ => false,
});

// FIXME: test linux like
cfg.generate("../src/lib.rs", "main.rs");
}
Expand Down Expand Up @@ -1859,8 +1891,11 @@ fn test_linux(target: &str) {
let x86_32 = target.contains("i686");
let x32 = target.contains("x32");
let mips = target.contains("mips");
let mips32_musl = mips && !target.contains("64") && musl;
let mips32 = mips && !target.contains("64");
let mips64 = mips && target.contains("64");
let mips32_musl = mips32 && musl;
let sparc64 = target.contains("sparc64");
let s390x = target.contains("s390x");

let mut cfg = ctest::TestGenerator::new();
cfg.define("_GNU_SOURCE", None);
Expand Down Expand Up @@ -2253,6 +2288,49 @@ fn test_linux(target: &str) {
field == "ssi_arch"))
});

cfg.skip_roundtrip(move |s| match s {
// FIXME: TODO
"_libc_fpstate" | "user_fpregs_struct" if x86_64 => true,
"utsname"
| "statx"
| "dirent"
| "dirent64"
| "utmpx"
| "user"
| "user_fpxregs_struct" => true,
"sysinfo" if musl => true,
"ucontext_t" if x86_64 && musl => true,
"sockaddr_un" | "sembuf" | "ff_constant_effect"
if mips32 && (gnu || musl) =>
{
true
}
"ipv6_mreq"
| "sockaddr_in6"
| "sockaddr_ll"
| "in_pktinfo"
| "arpreq"
| "arpreq_old"
| "sockaddr_un"
| "ff_constant_effect"
| "ff_ramp_effect"
| "ff_condition_effect"
| "Elf32_Ehdr"
| "Elf32_Chdr"
| "ucred"
| "in6_pktinfo"
| "sockaddr_nl"
| "termios"
| "nlmsgerr"
if (mips64 || sparc64) && gnu =>
{
true
}
"mcontext_t" if s390x => true,

_ => false,
});

cfg.generate("../src/lib.rs", "main.rs");

test_linux_like_apis(target);
Expand Down