Skip to content

Commit

Permalink
Ensure Foundation tests don't run when passing --skip-foundation-tests (
Browse files Browse the repository at this point in the history
  • Loading branch information
jmschonfeld authored Jul 31, 2024
1 parent af8b19d commit f89db53
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions utils/build_swift/build_swift/driver_arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ def _apply_default_arguments(args):
args.test_android = False
args.test_cmark = False
args.test_swiftpm = False
args.test_foundation = False
args.test_swift_driver = False
args.test_swiftsyntax = False
args.test_indexstoredb = False
Expand Down Expand Up @@ -1316,6 +1317,8 @@ def create_argument_parser():
help='skip testing cmark')
option('--skip-test-swiftpm', toggle_false('test_swiftpm'),
help='skip testing swiftpm')
option('--skip-test-foundation', toggle_false('test_foundation'),
help='skip testing Foundation')
option('--skip-test-swift-driver', toggle_false('test_swift_driver'),
help='skip testing Swift driver')
option('--skip-test-swiftsyntax', toggle_false('test_swiftsyntax'),
Expand Down
2 changes: 2 additions & 0 deletions utils/build_swift/tests/expected_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@
'test_playgroundsupport': True,
'test_cmark': False,
'test_swiftpm': False,
'test_foundation': False,
'test_swift_driver': False,
'test_swiftsyntax': False,
'test_indexstoredb': False,
Expand Down Expand Up @@ -740,6 +741,7 @@ class BuildScriptImplOption(_BaseOption):
dest='test_playgroundsupport'),
DisableOption('--skip-test-cmark', dest='test_cmark'),
DisableOption('--skip-test-swiftpm', dest='test_swiftpm'),
DisableOption('--skip-test-foundation', dest='test_foundation'),
DisableOption('--skip-test-swift-driver', dest='test_swift_driver'),
DisableOption('--skip-test-swiftsyntax', dest='test_swiftsyntax'),
DisableOption('--skip-test-indexstore-db', dest='test_indexstoredb'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def should_install(self, host_target):
return False

def should_test(self, host_target):
return True
return self.args.test_foundation

def configuration(self):
return 'release' if self.is_release() else 'debug'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def should_install(self, host_target):
return False

def should_test(self, host_target):
return True
return self.args.test_foundation

def configuration(self):
return 'release' if self.is_release() else 'debug'
Expand Down

0 comments on commit f89db53

Please sign in to comment.