This is an archive of the discontinued Mercurial Phabricator instance.

tests: make hg frame optional
ClosedPublic

Authored by indygreg on Jan 14 2018, 6:04 PM.

Details

Summary

When hg is a Rust binary, the hg frame doesn't exist because an
hg Python script doesn't exist.

This commit updates expected test output to make the hg frame
optional.

There /might/ be a way to do this more accurately with the
"(feature !)" syntax in .t files. However, I poked at it for a
few minutes and couldn't get it to work. Worst case with using
(?) is we drop the frame from output for Python hg. The hg
frame isn't terribly important. So the worst case doesn't feel that
bad. If someone wants to enlighten me on how to use "(feature !)"
for optional output based on hghave features, I'd be more than
willing to update this.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

indygreg created this revision.Jan 14 2018, 6:04 PM

I haven't been paying attention to the rust threads, but is there an hghave test for it? I don't see one locally. If so, then all that should be needed is appending ' (no-rust !)'. (Note the spaces.) I think this works for #test-cases too.

Note that this is *not* an "if and only if" test. If you evaluate the feature(s) listed, it will be required for '(true !)', and reverts to (?) for '(false !)'. I had a patch to make it IFF, because that's how it seems to be used in practice. But somehow I came up with a test that succeeded outside test-run-tests.t, but failed inside it.

yuja added a subscriber: yuja.Jan 15 2018, 8:05 AM

I think the frame details aren't important here, so making some lines optional
should be just fine.

Queued, thanks.

yuja accepted this revision.Jan 15 2018, 8:05 AM
This revision is now accepted and ready to land.Jan 15 2018, 8:05 AM
This revision was automatically updated to reflect the committed changes.