Skip to content

Commit 2a13475

Browse files
committed
Simplify how testing is done
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!
1 parent 0324249 commit 2a13475

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+981
-6135
lines changed

Cargo.toml

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,37 @@
11
[package]
22
authors = ["Jorge Aparicio <japaricious@gmail.com>"]
3-
build = "build.rs"
43
name = "compiler_builtins"
54
version = "0.1.0"
65

7-
[build-dependencies]
8-
cast = { version = "0.2.2", features = ["x128"], optional = true }
9-
rand = { version = "0.3.15", optional = true }
6+
[lib]
7+
test = false
108

11-
[build-dependencies.cc]
12-
optional = true
13-
version = "1.0"
9+
[build-dependencies]
10+
cc = { optional = true, version = "1.0" }
1411

1512
[features]
13+
default = ["compiler-builtins"]
14+
15+
# Enable compilation of C code in compiler-rt, filling in some more optimized
16+
# implementations and also filling in unimplemented intrinsics
1617
c = ["cc"]
18+
19+
# Flag this library as the unstable compiler-builtins lib
1720
compiler-builtins = []
18-
default = ["compiler-builtins"]
21+
22+
# Generate memory-related intrinsics like memcpy
1923
mem = []
20-
mangled-names = []
2124

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

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

3432
[[example]]
3533
name = "intrinsics"
3634
required-features = ["c", "compiler-builtins"]
3735

3836
[workspace]
37+
members = ["testcrate"]

0 commit comments

Comments
 (0)