Generate empty .clang-format-ignore before running tests (#136154)
Followup to #136022, this ensures formatting tests are run with an empty `.clang-format-ignore` in their root directory, to prevent failures if the file also exists higher in the tree.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import os
|
||||
import platform
|
||||
import lit.formats
|
||||
|
||||
@@ -27,3 +28,8 @@ config.suffixes = [
|
||||
# python implementation does, so use that for cross platform compatibility
|
||||
if platform.system() == "AIX":
|
||||
config.test_format = lit.formats.ShTest()
|
||||
|
||||
# Create an empty .clang-format-ignore file so that tests don't get messed
|
||||
# up if one exists higher in the tree
|
||||
with open(".clang-format-ignore", 'w'):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user