Skip to content

Commit

Permalink
Simplify how testing is done
Browse files Browse the repository at this point in the history
All tests are moved to a separate crate in this repository to enable features by
default. Additionally the test generation is moved to a seprate build script and
simplified to reduce the amount of boilerplate needed per test.

Overall this should still be testing everything, just in a different location!
  • Loading branch information
alexcrichton committed Jan 31, 2018
1 parent 0324249 commit 2a13475
Show file tree
Hide file tree
Showing 88 changed files with 981 additions and 6,135 deletions.
37 changes: 18 additions & 19 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,38 +1,37 @@
[package]
authors = ["Jorge Aparicio <[email protected]>"]
build = "build.rs"
name = "compiler_builtins"
version = "0.1.0"

[build-dependencies]
cast = { version = "0.2.2", features = ["x128"], optional = true }
rand = { version = "0.3.15", optional = true }
[lib]
test = false

[build-dependencies.cc]
optional = true
version = "1.0"
[build-dependencies]
cc = { optional = true, version = "1.0" }

[features]
default = ["compiler-builtins"]

# Enable compilation of C code in compiler-rt, filling in some more optimized
# implementations and also filling in unimplemented intrinsics
c = ["cc"]

# Flag this library as the unstable compiler-builtins lib
compiler-builtins = []
default = ["compiler-builtins"]

# Generate memory-related intrinsics like memcpy
mem = []
mangled-names = []

# generate tests
#
# Note that this is an internal-only feature used in testing, this should not
# be relied on with crates.io! Enabling this may expose you to breaking
# changes.
gen-tests = ["cast", "rand"]
# Mangle all names so this can be linked in with other versions or other
# compiler-rt implementations. Also used for testing
mangled-names = []

[target.'cfg(all(target_arch = "arm", not(any(target_env = "gnu", target_env = "musl")), target_os = "linux"))'.dev-dependencies]
test = { git = "https:/japaric/utest" }
utest-cortex-m-qemu = { default-features = false, git = "https:/japaric/utest" }
utest-macros = { git = "https:/japaric/utest" }
# Don't generate lang items for i128 intrisnics and such
no-lang-items = []

[[example]]
name = "intrinsics"
required-features = ["c", "compiler-builtins"]

[workspace]
members = ["testcrate"]
Loading

0 comments on commit 2a13475

Please sign in to comment.