Skip to content

Commit eaa674e

Browse files
author
bors-servo
authored
Auto merge of #216 - jeanphilippeD:test_move_to_subpackage, r=emilio
Speed up integration tests (move building expectations) Speed up running 'cargo test': -Before: 2'17s -After: 30s Update to use new path: Makefile, .travis.yml, CONTRIBUTING.md, tests/tests.rs Delete unused expectation that fail to compile: tests/expectations/moar_bitfields.rs tests/expectations/variadic_template_args.rs
2 parents 09e6fe4 + 2866ab5 commit eaa674e

File tree

118 files changed

+29
-87
lines changed

Some content is hidden

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

118 files changed

+29
-87
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ script:
3333
- git add -A
3434
- git diff @
3535
- git diff-index --quiet HEAD
36+
- cargo test -p tests_expectations
3637
- cargo build --features "$BINDGEN_FEATURES _docs"
3738

3839
notifications:

CONTRIBUTING.md

Lines changed: 8 additions & 2 deletions

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,8 @@ _docs = []
5454
name = "bindgen"
5555
path = "src/lib.rs"
5656

57+
[dev-dependencies.tests_expectations]
58+
path = "tests/expectations"
59+
5760
[[test]]
5861
name = "tests"

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ TEST_HEADERS := $(wildcard tests/headers/*.h) $(wildcard tests/headers/*.hpp)
33

44
TEST_TARGETS := $(TEST_HEADERS:.h=.rs)
55
TEST_TARGETS := $(TEST_TARGETS:.hpp=.rs)
6-
TEST_TARGETS := $(patsubst tests/headers/%, tests/expectations/%, $(TEST_TARGETS))
6+
TEST_TARGETS := $(patsubst tests/headers/%, tests/expectations/tests/%, $(TEST_TARGETS))
77

88
BINDGEN := ./target/debug/bindgen
99

@@ -25,10 +25,10 @@ clean-tests:
2525
$(RM) $(TEST_TARGETS)
2626

2727
# TODO: Add options to add flags and whatnot
28-
tests/expectations/%.rs: tests/headers/%.h
28+
tests/expectations/tests/%.rs: tests/headers/%.h
2929
@mkdir -p $(dir $@)
3030
./tests/tools/run-bindgen.py $(BINDGEN) $< $@
3131

32-
tests/expectations/%.rs: tests/headers/%.hpp
32+
tests/expectations/tests/%.rs: tests/headers/%.hpp
3333
@mkdir -p $(dir $@)
3434
./tests/tools/run-bindgen.py $(BINDGEN) $< $@

tests/expectations/Cargo.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[package]
2+
name = "tests_expectations"
3+
description = "bindgen results when ran on ../headers/*"
4+
version = "0.1.0"
5+
authors = [
6+
"Jyun-Yan You <[email protected]>",
7+
"Emilio Cobos Álvarez <[email protected]>",
8+
"The Servo project developers",
9+
]
10+
11+
[dependencies]

tests/expectations/moar_bitfields.rs

Lines changed: 0 additions & 48 deletions
This file was deleted.

tests/expectations/src/lib.rs

Whitespace-only changes.

0 commit comments

Comments
 (0)