( )⚙ D1133 test-clang-format: new test to verify that files stay clang-formatted

This is an archive of the discontinued Mercurial Phabricator instance.

test-clang-format: new test to verify that files stay clang-formatted
ClosedPublic

Authored by durin42 on Oct 16 2017, 9:53 PM.

Details

Summary

For now all .c and .h files are blacklisted. As they become
clang-formatted, we'll remove them from the blacklist,and then this
test will produce output if there are diffs.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

durin42 created this revision.Oct 16 2017, 9:53 PM
ryanmce requested changes to this revision.Oct 17 2017, 7:36 AM
ryanmce added a subscriber: ryanmce.
ryanmce added inline comments.
tests/test-check-clang-format.t
2

This test fails for me with errors about lz4revlog.

It feels like what we need here is a change similar to 6c113a7dec52, where we use the system hg to examine the local repository. Please reuse the syshg function here.

This revision now requires changes to proceed.Oct 17 2017, 7:36 AM
durin42 updated this revision to Diff 2916.Oct 17 2017, 10:21 AM
durin42 added inline comments.Oct 17 2017, 10:21 AM
tests/test-check-clang-format.t
2

Derp, this is done.

I get skipped: unknown feature: clang-format when running test-check-clang-format.t now. What am I doing wrong?

quark added a subscriber: quark.EditedOct 17 2017, 5:27 PM

I get skipped: unknown feature: clang-format when running test-check-clang-format.t now. What am I doing wrong?

Are you using run-tests.py from this repo and running it in the tests/ directory from this repo?

(and this repo has 15b561fffde5)

ryanmce accepted this revision.Oct 17 2017, 5:31 PM

Yeah, I was running the wrong run-tests.py. Thanks for the help @durin42.

queued

This revision is now accepted and ready to land.Oct 17 2017, 5:31 PM
This revision was automatically updated to reflect the committed changes.