Commit graph

10 commits

Author SHA1 Message Date
Simon Hausmann
cb081a6bda Test that loading types from the include path works
This uses the recently added "hooks" or APIs to pass an include path that's specified in the test case itself.
2020-07-19 18:31:10 +02:00
Simon Hausmann
8b2ff87db9 Minor cleanup
Don't concatenate paths as strings with directory separators, use the
variant to create from an iterator. This could also be cannonicalized,
but it's not necessary AFAICS.
2020-07-14 22:12:31 +02:00
Simon Hausmann
547a732e33 Fix rebuild issues, part 10523
By setting RUSTFLAGS in the Cargo config we run into the situation that
when doing a host build, all rust files are compiled with the flags,
including build.rs. When cross-compiling, build.rs is not build with the
RUSTFLAGS specified. That makes kind of sense, but it also means that
all the build scripts are always recompiled when switching between a
target and a host build - and that applies to *all* packages, including
dependencies.

So short of a better solution, this patch removes the need to set
RUSTFLAGS. It was used to extract the system library dependencies for
the static library we'd create. Instead we're now building two shared
libraries and are linking against them. They contain the rust library
twice, so that's not really a desirable final state either, but
productivity wins right now :-)

It might make sense to go back to creating *one* shared library through
a dedicated crate and -- since 'pub extern "C"' functions are not
transitively exported, it may require re-exporting them by hand or using
some clever build trick perhaps.
2020-06-09 13:08:59 +02:00
Olivier Goffart
b7bc884447 Run the JS test without using npm install 2020-06-09 10:25:38 +02:00
Olivier Goffart
34931e58c0 Polishing of the documentation 2020-06-08 17:57:18 +02:00
Olivier Goffart
11a0e89827 Test framework: extract the cpp and rust snippets 2020-06-08 10:54:17 +02:00
Simon Hausmann
8b475440c6 Reduce build ping-pong due to system library extraction 2020-06-05 17:22:42 +02:00
Simon Hausmann
54b02d2b0d Change the test driver to use the rust test framework
Collect all tests are build time in build.rs and generate Rust code that
uses #[test] annotated functions. This gives nice reporting and the
ability to run individual tests.
2020-06-05 14:47:05 +02:00
Simon Hausmann
46d7aaa2cb WIP 2020-06-05 14:11:29 +02:00
Simon Hausmann
31da762245 Complete compilation and running of .60 to mapped c++ tests
* Fix text-file-busy error when running the binary by replacing the use
  of named temp file with simply using the input source file and the
  extension replaced. A scope guard make sure to also delete the binary.
* Fix hard-coded library dependencies by sharing code with the cmake
  xtask that needs the same list.
2020-06-05 13:30:13 +02:00