diff --git a/build/fbcode_builder/getdeps/builder.py b/build/fbcode_builder/getdeps/builder.py index 0684cea4d..5f4339280 100644 --- a/build/fbcode_builder/getdeps/builder.py +++ b/build/fbcode_builder/getdeps/builder.py @@ -329,21 +329,65 @@ class CMakeBuilder(BuilderBase): env.set("http_proxy", "") env.set("https_proxy", "") - self._run_cmd( - [ - testpilot, - # Need to force the repo type otherwise testpilot on windows - # can be confused (presumably sparse profile related) - "--force-repo", - "fbcode", - "--force-repo-root", - self.build_opts.fbsource_dir, - "--buck-test-info", - buck_test_info_name, - ], - cwd=self.build_opts.fbcode_builder_dir, - env=env, - ) + + runs = [] + + testpilot_args = [ + testpilot, + # Need to force the repo type otherwise testpilot on windows + # can be confused (presumably sparse profile related) + "--force-repo", + "fbcode", + "--force-repo-root", + self.build_opts.fbsource_dir, + "--buck-test-info", + buck_test_info_name, + ] + + if schedule_type == "continuous": + runs.append( + [ + "--tag-new-tests", + "--collection", + "oss-continuous", + "--purpose", + "continuous", + ] + ) + elif schedule_type == "testwarden": + # One run to assess new tests + runs.append( + [ + "--tag-new-tests", + "--collection", + "oss-new-test-stress", + "--stress-runs", + "10", + "--purpose", + "stress-run-new-test", + ] + ) + # And another for existing tests + runs.append( + [ + "--tag-new-tests", + "--collection", + "oss-existing-test-stress", + "--stress-runs", + "10", + "--purpose", + "stress-run", + ] + ) + else: + runs.append(["--collection", "oss-diff", "--purpose", "diff"]) + + for run in runs: + self._run_cmd( + testpilot_args + run, + cwd=self.build_opts.fbcode_builder_dir, + env=env, + ) else: self._run_cmd( [ctest, "--output-on-failure", "-j", str(self.build_opts.num_jobs)],