diff options
-rw-r--r-- | PRESUBMIT.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/PRESUBMIT.py b/PRESUBMIT.py index 9b86bad..e125a57 100644 --- a/PRESUBMIT.py +++ b/PRESUBMIT.py @@ -245,5 +245,9 @@ def CheckChangeOnCommit(input_api, output_api): return results -def GetPreferredTrySlaves(): +def GetPreferredTrySlaves(project, change): + only_objc_files = all( + f.LocalPath().endswith(('.mm', '.m')) for f in change.AffectedFiles()) + if only_objc_files: + return ['mac'] return ['win', 'linux', 'mac'] |