mirror of
https://github.com/facebook/sapling.git
synced 2024-10-12 01:39:21 +03:00
bd9208583d
Summary: Update test-check-clang-format.t to put its output files in "$TESTTMP" rather than using fixed paths in the source repository. This should fix stress test runs of this test, which run multiple copies of the test in parallel. Previously running several copies of this test in parallel would fail as they all try to use the same output path names. Reviewed By: quark-zju Differential Revision: D8229266 fbshipit-source-id: a3728aaae7fa8ff393835e7edf09abf2e3939b69
10 lines
374 B
Perl
10 lines
374 B
Perl
#require clang-format test-repo
|
|
|
|
$ . "$TESTDIR/helpers-testrepo.sh"
|
|
|
|
$ cd "$TESTDIR"/..
|
|
$ for f in `testrepohg files 'set:(mercurial/**.c or mercurial/**.h) and not "listfile:contrib/clang-format-blacklist"'` ; do
|
|
> clang-format --style file "$f" > "$TESTTMP/formatted.txt"
|
|
> cmp "$f" "$TESTTMP/formatted.txt" || diff -u "$f" "$TESTTMP/formatted.txt"
|
|
> done
|