gnzlbg / ctest

Automatic testing of FFI bindings for Rust

Home Page:https://docs.rs/ctest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Testing rust-libc (ctest with syntex-syntax 0.3.0 ?)

daym opened this issue · comments

Is it possible to use ctest with syntex-syntax 0.3.0?

The reason I ask is because we are trying to bootstrap rust-libc, including running the tests (Note: it already works without the tests).

Now rust-libc requires rust-ctest for the tests and rust-ctest requires rust-gcc and rust-syntex-syntax. However, current rust-syntex-syntax has quite a large number of dependencies, including rust-libc (!). But rust-syntex-syntax 0.3.0 has only one dependency, rust-bitflags, which has itself none.

Therefore we would like to bootstrap current rust-libc using ctest with rust-syntex-syntax 0.3.0.

Also, does rust-syntex-syntax work with stable Rust at all?

So far I didn't get syntex-syntax 0.3.0 to work (lots of things broken) - however I thought before I try to fix it I'd ask whether it should be possible to use it (with reasonable effort).

Alternatively, is there another way to test rust-libc?

Our goal is to test rust-libc using a minimal amount of extra packages (whose artifacts we throw away after each libc test).

Possibly! I haven't looked into it at all, but PRs to update are always welcome!

Given that we are currently using syntex_syntax = "0.59.1", I'd say it would be hard to downgrade to 0.3. You would possibly end up re-implementing ctest and its dependencies (cc) in the process, which would be a huge amount of work.

Alternatively, is there another way to test rust-libc?

ctest doesn't fully test libc, and it isn't a necessary test either. I'd suggest getting libc to "work" good enough that you can bootstrap (just write manual run-time tests for the basic apis) and once you are able to build a newer version of syntex-syntax, then you can use ctest to polish the details.