Skip to content

Commit 2a322c7

Browse files
committed
Auto merge of #720 - Susurrus:fcntl, r=alexcrichton
Add more fcntl and seal constants for Android/Linux
2 parents f4bbd7f + b7902df commit 2a322c7

File tree

27 files changed

+237
-166
lines changed

27 files changed

+237
-166
lines changed

.travis.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,17 @@ matrix:
5151
- os: osx
5252
osx_image: xcode8.2
5353
env: TARGET=i386-apple-ios
54+
CARGO_TARGET_I386_APPLE_IOS_RUNNER=$HOME/runtest
55+
RUSTFLAGS=-Clink-arg=-mios-simulator-version-min=7.0
56+
before_install:
57+
rustc ./ci/ios/deploy_and_run_on_ios_simulator.rs -o $HOME/runtest
5458
- os: osx
5559
osx_image: xcode8.2
5660
env: TARGET=x86_64-apple-ios
61+
CARGO_TARGET_X86_64_APPLE_IOS_RUNNER=$HOME/runtest
62+
RUSTFLAGS=-Clink-arg=-mios-simulator-version-min=7.0
63+
before_install:
64+
rustc ./ci/ios/deploy_and_run_on_ios_simulator.rs -o $HOME/runtest
5765
- env: TARGET=x86_64-rumprun-netbsd
5866
- env: TARGET=powerpc-unknown-linux-gnu
5967
- env: TARGET=powerpc64-unknown-linux-gnu

Cargo.lock

Lines changed: 7 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ With that in mind, the steps for adding a new API are:
9393
We have two automated tests running on [Travis](https://travis-ci.org/rust-lang/libc):
9494

9595
1. [`libc-test`](https://github.com/alexcrichton/ctest)
96-
- `cd libc-test && cargo run`
96+
- `cd libc-test && cargo test`
9797
- Use the `skip_*()` functions in `build.rs` if you really need a workaround.
9898
2. Style checker
9999
- `rustc ci/style.rs && ./style src`

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ build: false
2424

2525
test_script:
2626
- cargo test --target %TARGET%
27-
- cargo run --manifest-path libc-test/Cargo.toml --target %TARGET%
27+
- cargo test --manifest-path libc-test/Cargo.toml --target %TARGET%
2828

2929
cache:
3030
- target

ci/docker/aarch64-linux-android/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,17 @@ RUN chmod 755 /android/sdk/tools/* /android/sdk/tools/qemu/linux-x86_64/*
2929

3030
ENV PATH=$PATH:/rust/bin \
3131
CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER=aarch64-linux-android-gcc \
32+
CARGO_TARGET_AARCH64_LINUX_ANDROID_RUNNER=/tmp/runtest \
3233
HOME=/tmp
34+
35+
ADD runtest-android.rs /tmp/runtest.rs
36+
ENTRYPOINT [ \
37+
"bash", \
38+
"-c", \
39+
# set SHELL so android can detect a 64bits system, see
40+
# http://stackoverflow.com/a/41789144
41+
"SHELL=/bin/dash emulator @aarch64 -no-window & \
42+
rustc /tmp/runtest.rs -o /tmp/runtest && \
43+
exec \"$@\"", \
44+
"--" \
45+
]
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM ubuntu:17.10
2-
RUN apt-get update
3-
RUN apt-get install -y --no-install-recommends \
2+
RUN apt-get update && apt-get install -y --no-install-recommends \
43
gcc libc6-dev ca-certificates \
54
gcc-aarch64-linux-gnu libc6-dev-arm64-cross qemu-user
65
ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc \
6+
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUNNER="qemu-aarch64 -L /usr/aarch64-linux-gnu" \
77
PATH=$PATH:/rust/bin

ci/docker/arm-linux-androideabi/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,17 @@ RUN chmod 755 /android/sdk/tools/* /android/sdk/tools/qemu/linux-x86_64/*
2929

3030
ENV PATH=$PATH:/rust/bin \
3131
CARGO_TARGET_ARM_LINUX_ANDROIDEABI_LINKER=arm-linux-androideabi-gcc \
32+
CARGO_TARGET_ARM_LINUX_ANDROIDEABI_RUNNER=/tmp/runtest \
3233
HOME=/tmp
34+
35+
ADD runtest-android.rs /tmp/runtest.rs
36+
ENTRYPOINT [ \
37+
"bash", \
38+
"-c", \
39+
# set SHELL so android can detect a 64bits system, see
40+
# http://stackoverflow.com/a/41789144
41+
"SHELL=/bin/dash emulator @arm -no-window & \
42+
rustc /tmp/runtest.rs -o /tmp/runtest && \
43+
exec \"$@\"", \
44+
"--" \
45+
]
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM ubuntu:17.10
2-
RUN apt-get update
3-
RUN apt-get install -y --no-install-recommends \
2+
RUN apt-get update && apt-get install -y --no-install-recommends \
43
gcc libc6-dev ca-certificates \
54
gcc-arm-linux-gnueabihf libc6-dev-armhf-cross qemu-user
65
ENV CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc \
6+
CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_RUNNER="qemu-arm -L /usr/arm-linux-gnueabihf" \
77
PATH=$PATH:/rust/bin

ci/docker/i686-linux-android/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,17 @@ RUN chmod 755 /android/sdk/tools/* /android/sdk/tools/qemu/linux-x86_64/*
2929

3030
ENV PATH=$PATH:/rust/bin \
3131
CARGO_TARGET_I686_LINUX_ANDROID_LINKER=i686-linux-android-gcc \
32+
CARGO_TARGET_I686_LINUX_ANDROID_RUNNER=/tmp/runtest \
3233
HOME=/tmp
34+
35+
ADD runtest-android.rs /tmp/runtest.rs
36+
ENTRYPOINT [ \
37+
"bash", \
38+
"-c", \
39+
# set SHELL so android can detect a 64bits system, see
40+
# http://stackoverflow.com/a/41789144
41+
"SHELL=/bin/dash emulator @i686 -no-window -no-accel & \
42+
rustc /tmp/runtest.rs -o /tmp/runtest && \
43+
exec \"$@\"", \
44+
"--" \
45+
]
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
FROM ubuntu:17.10
22

3-
RUN apt-get update
4-
RUN apt-get install -y --no-install-recommends \
3+
RUN apt-get update && apt-get install -y --no-install-recommends \
54
gcc libc6-dev qemu-user ca-certificates \
65
gcc-mips-linux-gnu libc6-dev-mips-cross \
76
qemu-system-mips
87

98
ENV CARGO_TARGET_MIPS_UNKNOWN_LINUX_GNU_LINKER=mips-linux-gnu-gcc \
9+
CARGO_TARGET_MIPS_UNKNOWN_LINUX_GNU_RUNNER="qemu-mips -L /usr/mips-linux-gnu" \
1010
PATH=$PATH:/rust/bin

0 commit comments

Comments
 (0)