This is an archive of the discontinued LLVM Phabricator instance.

Resolve build bot problems in unittests/Format/FormatTest.cpp
ClosedPublic

Authored by bjope on Feb 24 2018, 5:35 AM.

Details

Summary

Make the new GetStyleWithEmptyFileName test case independent
of the file system used when running the test. Since the
test is supposed to use the fallback "Google" style we now
use a InMemoryFileSystem to make sure that we do not accidentaly
find a .clang-format file in the real file system. That could
for example happen when having the build directory inside the
llvm och clang repo (as there is a .clang-format file inside
the repos).

Diff Detail

Repository
rC Clang

Event Timeline

bjope created this revision.Feb 24 2018, 5:35 AM

This is an attempt to fix problems seen after https://reviews.llvm.org/D43590

twoh added a subscriber: twoh.Feb 24 2018, 12:08 PM
krasimir accepted this revision.Feb 26 2018, 4:46 AM
This revision is now accepted and ready to land.Feb 26 2018, 4:46 AM
This revision was automatically updated to reflect the committed changes.

Thanks for fixing this. (Sorry for not getting to it, I was away traveling until today.)

I'll add a tidy-up in D43598 to ensure all tests which call getStyle() pass in an in-memory filesystem.

Actually, looks like all the other tests explicitly want a non-empty in-memory FS, so there's no good cleanup I can do.

bjope added a comment.Feb 27 2018, 7:59 AM

Actually, looks like all the other tests explicitly want a non-empty in-memory FS, so there's no good cleanup I can do.

Well, it was only this new test case that failed, so I think other tests are fine (some of them have been adjusted in a similar way in the past if I remember correctly).
And our downstream integration bots has started to pull in things from trunk again, after I landed this fix.