Age | Commit message (Collapse) | Author |
|
- The root crate is the `bindgen` binary
- Rust-ify the test suite, no more subprocesses!
- Update Travis config to test both crates
|
|
|
|
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
For every 'cargo test' run, the bindgen output where built.
We already test that the bindgen output match expectations/*.rs,
so there is no need to check it build unless the expectation is updated.
Move tests/expectations/*.rs to tests/expectations/tests/*.rs and make
tests/expectations a new dev-dependency package. This allow running:
- cargo test -p tests_expectations
In addition to the speed up, we also get a clean output for the build
and test run. In particular, a number of warnings are generated that should
probably be silenced, and eventually enforced modifying travis to build:
- RUSTFLAGS='-D warnings' cargo test -p tests_expectations
The benefit of having it as a new package is that it avoid polluting
the 'cargo test' output that should focus on bindgen.
|
|
This extends the test runner to generate dummy C/C++ uses of the whitelisted
types in a test header in the tests/uses/ directory. It does not yet compile the
dummy uses into an object file whose DWARF debug info can be compared against
our Rust bindings' DWARF debug info.
Part of #151.
|
|
|
|
The only difference in bindings is because the methods were inlined, so with
llvm 3.9 we can skip those.
Signed-off-by: Emilio Cobos Álvarez <ecoal95@gmail.com>
|
|
This adds the ability for tests to supply required features, and if the
bindgen we're testing was not built with those features, then the test
will be skipped. The syntax used to require features is like this:
// bindgen-features: llvm_stable some_experiment another
|
|
Changes include:
* Using argparse for argument parsing. This will help when extending the
script to skip tests that will only pass when --features llvm_stable
is used to build bindgen.
* Pulling out all the various steps of the script into helper functions
that are easier to digest at a glance, and have docstrings describing
their role in the script.
* Printing diffs between expected and actual generated bindings rather
than the full source text of each.
|
|
Python style (PEP8) is 4 space indentation, and you'll be hard pressed
to find anything else in the python community. We should match up with
expectations, editor defaults, etc.
|
|
exists
|
|
|
|
|
|
This commit switches bindgen over to using the docopt crate for argument parsing
instead of manual argument parsing. This required two notable changes in the
arguments and flags style:
1. All flags of the form `-foo` are now of the form `--foo`.
2. We can no longer pass unknown flags straight through to clang. Instead, the
user appends `--` after the bindgen flags and input header, after which point
any more flags and arguments get collected and passed to clang. This required
changes to the test runner and the `// bindgen-flags` comments.
|
|
|
|
|
|
|
|
|
|
and passing tests correctly
Ideally it should be done in rust, but I was too lazy right now.
Should be easy to port.
|