Stream: t-compiler/help

Topic: libtest integration tests


tmandry (Aug 20 2019 at 01:18, on Zulip):

are there any rustc integration tests that invoke libtest?

tmandry (Aug 20 2019 at 01:19, on Zulip):

suddenly remembers how to use grep again

simulacrum (Aug 20 2019 at 01:22, on Zulip):

@tmandry I believe compiletest is built ontop of libtest, but I could be wrong. rustdoc tests are for sure

simulacrum (Aug 20 2019 at 01:23, on Zulip):

(i.e., rustdoc --test, not the tests for rustdoc)

tmandry (Aug 20 2019 at 01:23, on Zulip):

I want to test the output of the libtest runner itself

tmandry (Aug 20 2019 at 01:24, on Zulip):

so I'd really like to have a run-pass or run-fail test, but with a stderr matcher

simulacrum (Aug 20 2019 at 01:24, on Zulip):

I think it's all UI tests these days but in theory you'd just do something like // compile-args --test presumably?

tmandry (Aug 20 2019 at 01:24, on Zulip):

right, there are tests which do that

tmandry (Aug 20 2019 at 01:25, on Zulip):

and you can specify // run-pass

simulacrum (Aug 20 2019 at 01:25, on Zulip):

yep, that should work then

tmandry (Aug 20 2019 at 01:25, on Zulip):

but I want to match against the output of the program, not the compiler

simulacrum (Aug 20 2019 at 01:25, on Zulip):

hm, oh, that's an interesting use case

simulacrum (Aug 20 2019 at 01:25, on Zulip):

you can definitely do a run-make test but those are a bit of a pain

simulacrum (Aug 20 2019 at 01:27, on Zulip):

I'd personally think we could definitely make run-pass tests match against the output of the program (perhaps optionally)

simulacrum (Aug 20 2019 at 01:27, on Zulip):

that seems really useful

tmandry (Aug 20 2019 at 01:28, on Zulip):

that would be really useful :)

simulacrum (Aug 20 2019 at 01:28, on Zulip):

I imagine it wouldn't be terribly difficult to hook up as we have most of the functionality already in compiletest

simulacrum (Aug 20 2019 at 01:29, on Zulip):

if you'd like I can try and take a look tomorrow or so, I should have some free time (unless you want to do it, in which case I'd be happy to review)

tmandry (Aug 20 2019 at 01:31, on Zulip):

go for it! otherwise I can pick it up in a couple days

simulacrum (Aug 20 2019 at 17:12, on Zulip):

hm looks like it's mostly a pretty easy patch but requires some reshuffling if done well that I don't think I have the time to do, so I'm going to file an issue with some instructions

tmandry (Aug 20 2019 at 19:07, on Zulip):

okay, that would be helpful, thanks!

simulacrum (Aug 20 2019 at 20:48, on Zulip):

@tmandry oh, forgot to link it here: https://github.com/rust-lang/rust/issues/63751

simulacrum (Aug 20 2019 at 20:48, on Zulip):

(not sure if you already saw it)

tmandry (Aug 21 2019 at 01:22, on Zulip):

I hadn't, thanks for posting that!

Last update: Nov 11 2019 at 22:30UTC