Skip to content

Commit efb1ea4

Browse files
committed
[bug-reducer] Disable bug reducer when the CMAKE_GENERATOR used is not Ninja.
The bug reducer makes assumptions about the layout of the swift build directory that may not be true in non-Ninja builds. Two examples of cmake generators that would cause problems are VisualStudio and Xcode. I do not have time right now to add such support, hence the disabling of the test. rdar://30311943
1 parent bbb0912 commit efb1ea4

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

Diff for: test/lit.site.cfg.in

+2
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ if "@CMAKE_GENERATOR@" == "Xcode":
7777
config.environment['PATH'] = \
7878
os.path.pathsep.join((xcode_bin_dir, config.environment['PATH']))
7979

80+
config.available_features.add("CMAKE_GENERATOR=@CMAKE_GENERATOR@")
81+
8082
if "@LLDB_ENABLE@" == "TRUE":
8183
config.available_features.add('lldb')
8284
for root, dirs, files in os.walk("@LLDB_BUILD_DIR@"):

Diff for: validation-test/Python/bug-reducer.test-sh

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
// RUN: BUGREDUCE_TEST_TMP_DIR=%t BUGREDUCE_TEST_SWIFT_OBJ_ROOT=%swift_obj_root %{python} -m unittest discover -s %utils/bug_reducer
22
// REQUIRES: OS=macosx
33
// REQUIRES: asserts
4+
// REQUIRES: CMAKE_GENERATOR=Ninja

Diff for: validation-test/lit.site.cfg.in

+2
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ if "@CMAKE_GENERATOR@" == "Xcode":
7474
config.environment['PATH'] = \
7575
os.path.pathsep.join((xcode_bin_dir, config.environment['PATH']))
7676

77+
config.available_features.add("CMAKE_GENERATOR=@CMAKE_GENERATOR@")
78+
7779
# Let the main config do the real work.
7880
config.test_exec_root = os.path.dirname(os.path.realpath(__file__))
7981
lit_config.load_config(config, "@SWIFT_SOURCE_DIR@/validation-test/lit.cfg")

0 commit comments

Comments
 (0)