Skip to content

Commit 22e3b23

Browse files
committed
Update CI to test libbindgen
- No need to build before running tests anymore
1 parent 5700f13 commit 22e3b23

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

.travis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ cache:
2525

2626
before_install: . ./ci/before_install.sh
2727

28+
before_script: cd libbindgen
29+
2830
script:
29-
- cargo build --verbose --features "$BINDGEN_FEATURES"
3031
- cargo test --features "$BINDGEN_FEATURES"
31-
- cargo build --release --verbose --features "$BINDGEN_FEATURES"
3232
- cargo test --release --features "$BINDGEN_FEATURES"
3333
- git add -A
3434
- git diff @

Makefile

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11

2-
TEST_HEADERS := $(wildcard tests/headers/*.h) $(wildcard tests/headers/*.hpp)
2+
TEST_HEADERS := $(wildcard libbindgen/tests/headers/*.h) $(wildcard libbindgen/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/tests/%, $(TEST_TARGETS))
6+
TEST_TARGETS := $(patsubst libbindgen/tests/headers/%, libbindgen/tests/expectations/tests/%, $(TEST_TARGETS))
77

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

@@ -13,7 +13,7 @@ $(BINDGEN):
1313

1414
.PHONY: test
1515
test:
16-
cargo test --features llvm_stable
16+
cd libbindgen && cargo test --features llvm_stable
1717

1818

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

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

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

0 commit comments

Comments
 (0)