Commit Graph

60 Commits

Author SHA1 Message Date
gnzlbg 8f1acf4643 Build all platforms in CI
This commit adds a `ci/build.sh` script that checks that libc builds correctly
for some common configurations (`--no-default-features`, `default`,
`extra_traits`) on most targets supported by Rust since Rust 1.13.0 (the oldest
Rust version that libc supports).

The build matrix is refactored into two stages.

The first stage is called `tools-and-build-and-tier1` and it aims to discover
issues quickly by running the documentation and linter builds, as well as
checking that the library builds correctly on all targets in all supported
channels and "problematic" Rust versions; Rust versions adding major new
features like `repr(align)`, `union`, etc. This first stage also runs
libc-test for the tier-1 targets on linux and osx. These builds finish
quickly because no emulation is necessary.

The second stage is called `tier2` and it runs libc-test for all other targets
for which we are currently able to do so.

Closes #1229 .
2019-02-07 13:44:32 +01:00
Alan Somers 38cf5b15c6 Add an integration test for the cmsg(3) functions.
Since these are defined in C as macros, they must be reimplemented in
libc as Rust functions.  They're hard to get exactly right, and they
vary from platform to platform.  The test builds custom C code that uses
the real macros, and compares its output to the Rust versions' output
for various inputs.

Skip the CMSG_NXTHDR test on sparc64 linux because it hits a Bus Error.

Issue #1239

Skip the entire cmsg test program on s390x because it dumps core
seemingly before the kernel finishes booting.

Issue #1240
2019-02-05 08:26:17 -07:00
Bryant Mairs 868a85d05d Implement PartialEq,Eq for all types 2019-02-02 13:06:58 -08:00
Tom Parker-Shemilt b46b6e2e72 Retry all curl operations 2018-11-26 21:34:43 +00:00
gnzlbg 37a0bd3251 Fix shellcheck issues 2018-11-20 10:25:26 +01:00
Linus Färnstrand 5f38367da3 Add testing with align feature 2018-07-29 18:54:45 +02:00
Amanieu d'Antras 3d763ae4aa Disable test for --no-default-features on rumprun 2018-07-12 17:47:31 +01:00
Wesley Moore c1fa4b68a8 Update FreeBSD docker CI to use FreeBSD 11.1 image 2018-03-16 08:23:01 +11:00
gnzlbg f9c396803c perform ctest with and without std 2018-02-27 17:36:45 +01:00
gnzlbg 5b890a31bd fix ci script 2018-02-27 17:08:14 +01:00
gnzlbg 988843834f test --no-default-features and fix musl builds 2018-02-27 15:47:18 +01:00
Alex Crichton 4d7fa243c6 Fix the FreeBSD target
It wasn't expecting a `*.d` file to exist, now it does.
2017-11-25 13:56:29 -08:00
Marco A L Barbosa e63f46a0ce Add issue for linux x32 failing to build 2017-10-27 13:15:32 -02:00
Marco A L Barbosa 0ee3935ed3 Add x86_64-unknown-linux-gnux32 docker image 2017-10-27 11:06:14 -02:00
Alex Crichton 050d8c8b0f Update s3 download locations 2017-09-16 09:13:07 -07:00
Alex Crichton d2044231dc Remove caching and fix FreeBSD tests 2017-09-05 20:18:21 -07:00
Alex Crichton d424022005 Update Android images/runners 2017-08-21 22:52:06 -07:00
Alex Crichton bcbfa85651 Leverage Cargo's target runner support to execute tests 2017-08-21 21:41:37 -07:00
Bryant Mairs 2f06a79e23 Run CI tests using cargo
This works by specifying a "runner" for actually executing the binary.
This doesn't apply to the Android or NetBSD runs because there
isn't a simple binary that just runs the executable.
2017-08-21 21:10:28 -07:00
Bryant Mairs 362134d8d6 Simplify iOS builds by using Cargo's RUSTFLAGS support 2017-08-21 10:46:26 -07:00
Bryant Mairs 2e11d9e14c Add more fcntl and seal constants for Android/Linux
We now create an additional binary `linux_fcntl` for testing this
since there are header conflicts when including all necessary headers.
This binary is run on all platforms even though it's empty on all non-
Android/non-Linux platforms.

Testing has been switched from a custom binary to using a runner-less
test (or pair of tests). This means that for local development a simple
`cd libc-test && cargo test` will run all the tests. CI has also been
updated here to reflect that.
2017-08-20 20:52:43 -07:00
Alex Crichton 201d539465 Remove OpenBSD CI
It's now broken due to changes in the `gcc` crate and having a too-old compiler,
and in general it's unfortunately architecturally so different from the other
test frameworks that it's difficult to maintain over time.
2017-08-18 09:34:08 -07:00
Alex Crichton 7d74c0993c Clean up CI configuration and add s390x
We can't test s390x because qemu segfaults but we can at least verify that it
compiles.

Closes #650
2017-07-07 14:19:06 -07:00
Marco A L Barbosa 2fd7f7a43f Add x86_64-linux-android test 2017-05-03 20:12:49 -03:00
Marco A L Barbosa e1c6dedf62 Add test support for x86_64-linux-android 2017-04-19 11:03:19 -03:00
Marco A L Barbosa 0b05b2a845 Enable kvm in docker images if available 2017-04-19 10:59:04 -03:00
Marco A L Barbosa 599eec3781 Add test support for {aarch64, i686}-linux-android 2017-02-23 16:08:29 -03:00
Kevin Brothaler f8e12769ca Replace Python script with Rust script. 2017-01-17 21:19:30 -04:00
Kevin Brothaler 938955c0f4 Fix i386-apple-ios 2017-01-17 14:47:08 -04:00
Kevin Brothaler c8a4d214eb Run the unit tests on the iOS simulator for x86_64-apple-ios 2017-01-17 14:47:08 -04:00
Alex Crichton cffe1f245d Update CI download location 2016-11-06 00:31:02 -07:00
Alex Crichton dcf47d21ba Add a number of constants to mips64 2016-10-14 16:36:40 -07:00
Alex Crichton 739edbc468 Use workspaces in this repo
Also cache on appveyor to speed up builds.
2016-10-08 17:26:56 -07:00
Jorge Aparicio c0fd46fa36 handle mips-musl in ci/run.sh 2016-09-29 21:12:54 -05:00
Sébastien Marie 919939451f extend QEMU image management
- allow QEMU name to have subdirectory inside (replace `/` by `__` in
  the filename)
- add a new code path for plain qcow2 image (for efficient bandwidth
  usage, the qcow2 is expected to use compressed qcow2 format)
- move freebsd image to explicitly download the gzipped QEMU
2016-09-09 06:24:46 +02:00
Alex Crichton ed32e3fc8e Add CI for mipsel-unknown-linux-musl
Download a trunk OpenWRT toolchain and verify bindings against that. Also fixup
a few stray errors today
2016-08-28 11:53:38 -07:00
Alex Crichton a6b1c2d296 Fix and add testing for powerpc64 2016-08-26 23:11:45 -07:00
Alex Crichton 8018a50514 Get powerpc-unknown-linux-gnu working and tested 2016-08-26 22:59:19 -07:00
Alex Crichton 3eb4a48b1b Use docker for all CI tests and images
Previously we were somewhat half-Docker, half-Travis, half apt-get, etc. This
commit alters the CI infrastructure to use Docker images for each target. This
should make it much easier to update the images and tweak various bits and
pieces of installed software. Additionally, it's also much clearer now what's
needed for each suite of tests!

Some images were updated a bit (e.g. musl is now 1.1.14), but other images
encountered failures when updating so they're not getting updated just yet.
2016-06-15 03:33:30 -07:00
Alex Crichton d820c4a8f7 Add OpenBSD and FreeBSD CI to Travis
This commit adds support to test all libc definitions on both OpenBSD and
FreeBSD via QEMU userspace emulation. Specially prepared images for each OS are
used which are essentially intended to run a script on startup and then exit.
Documentation has been added to the `ci/README.md` file describing this new
system.
2016-01-18 22:54:28 -08:00
Alexander Polakov 2cdb21ea2b Use docker for MIPS 2015-12-27 12:22:59 +03:00
Alex Crichton 881ef9b966 Update the android CI image
It's got a new toolchain which should hopefully support some more modern
definitions.
2015-12-18 13:15:09 -08:00
Alex Crichton 49d7bca8aa Add rumprun CI and get tests passing 2015-12-01 17:16:43 -08:00
Alex Crichton 9f52b89c2e Add NI_MAXHOST 2015-11-07 15:50:40 -08:00
Alex Crichton 2995f5595c Use the standard android slave docker image 2015-10-29 16:34:55 -07:00
Alex Crichton baef6116da iOS support 2015-09-21 14:37:14 -07:00
Alex Crichton 22f3c5e1a7 Use a switch instead of if/else 2015-09-18 17:33:14 -07:00
Alex Crichton 2536b35aa8 OK, apparently MIPS can run now? 2015-09-18 17:33:14 -07:00
Alex Crichton 70b1f23f27 Try running MIPS again 2015-09-18 16:32:03 -07:00
Alex Crichton d9962f4bd1 CI dox 2015-09-17 17:45:10 -07:00