Re: Testing Rust code in tree

2020-06-25 Thread Nicholas Nethercote
I have written some draft docs about testing and debugging Rust code, which can be seen in bug 1647987 . I have done my best to summarize the important info mentioned in this thread, plus other stuff. I'd be happy to hear feedback. Relatedly,

Re: Testing Rust code in tree

2020-05-12 Thread Chris Hutten-Czapski
Glean Team here. Can confirm that libxul-provided symbols aren't in rusttests builds at present (Rust stuff is built first then wrapped in the loving embrace of libxul). We do write rusttests in our crates that (currently) have no Gecko symbols (see toolkit/components/glean/api/), but have ended

Re: Testing Rust code in tree

2020-05-12 Thread James Graham
On 11/05/2020 23:54, Mike Hommey wrote: On Mon, May 11, 2020 at 03:37:07PM -0700, Dave Townsend wrote: Do we have any standard way to test in-tree Rust code? Context: We're building a standalone binary in Rust that in the future will be distributed with Firefox and of course we want to test

Re: Testing Rust code in tree

2020-05-11 Thread Lina Cambridge
Oooh, this question comes at a perfect time, the Glean team has been looking at this recently in bug 1627024, too! Nick's quote from the Oxidation wiki alludes to this, but, if your Rust code is pulling in Gecko crates like `nsstring`, `xpcom`, and such, I don't think `RUST_TESTS` will work—you'd

Re: Testing Rust code in tree

2020-05-11 Thread Mike Hommey
On Mon, May 11, 2020 at 03:37:07PM -0700, Dave Townsend wrote: > Do we have any standard way to test in-tree Rust code? > > Context: We're building a standalone binary in Rust that in the future will > be distributed with Firefox and of course we want to test it. It lives > in-tree and while we

Re: Testing Rust code in tree

2020-05-11 Thread Nicholas Nethercote
The Oxidation wiki has this entry in its FAQ : *Q:* How are in-tree Rust crates tested? *A:* In general we don't run tests for third-party crates; the assumption is that these crates are sufficiently well-tested

Re: Testing Rust code in tree

2020-05-11 Thread Dave Townsend
Aha, someone has pointed out that I skipped over rusttests, which don't appear to be listed at https://developer.mozilla.org/en-US/docs/Mozilla/QA/Automated_testing, or indeed anywhere in our various docs that I can see. I guess that makes it my job? On Mon, May 11, 2020 at 3:37 PM Dave Townsend

Testing Rust code in tree

2020-05-11 Thread Dave Townsend
Do we have any standard way to test in-tree Rust code? Context: We're building a standalone binary in Rust that in the future will be distributed with Firefox and of course we want to test it. It lives in-tree and while we could use something like xpcshell to drive the produced executable and