summaryrefslogtreecommitdiff
path: root/tests/tools/run-bindgen.py
AgeCommit message (Collapse)Author
2016-11-16Transition to libbindgen sub-crateJeff Waugh
- The root crate is the `bindgen` binary - Rust-ify the test suite, no more subprocesses! - Update Travis config to test both crates
2016-11-06Test for --use-core.Emilio Cobos Álvarez
2016-11-05Speed up integration tests (move building expectations)Jean-Philippe DUFRAIGNE
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.
2016-11-02Generate dummy uses when running our test suiteNick Fitzgerald
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.
2016-11-01Always run tests with RUST_BACKTRACE=1Nick Fitzgerald
2016-11-01tests: Get rid of feature-specific tests.Emilio Cobos Álvarez
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>
2016-10-18Allow test headers to supply required bindgen featuresNick Fitzgerald
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
2016-10-18Rewrite tests/tools/run-bindgen.pyNick Fitzgerald
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.
2016-10-18Use 4 space indentation in run-bindgen.pyNick Fitzgerald
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.
2016-10-18Make tests/tools/run-bindgen.py check expectations if the rust path already ↵Nick Fitzgerald
exists
2016-09-23Run tests on stable.Emilio Cobos Álvarez
2016-09-16Back out docopt.Emilio Cobos Álvarez
2016-08-26Use docopt for argument parsingNick Fitzgerald
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.
2016-07-26Make it possible to run tests on El CapitanManish Goregaokar
2016-07-10Use aster and quasi to allow building with stable Rust.Emilio Cobos Álvarez
2016-05-18Support in-class constants in C++Emilio Cobos Álvarez
2016-04-16tests: Add allow(non_snake_case) to be less noisyEmilio Cobos Álvarez
2016-04-16tests: Add a simple test suite that checks that every test is compilingEmilio Cobos Álvarez
and passing tests correctly Ideally it should be done in rust, but I was too lazy right now. Should be easy to port.