2 // Copyright 2004-present Facebook. All Rights Reserved.
3 // This source code is licensed under the BSD-style license found in the
4 // LICENSE file in the root directory of this source tree. An additional grant
5 // of patent rights can be found in the PATENTS file in the same directory.
7 require('RocksDBCommonHelper.php');
9 define("DIFF_COMMAND", "diff");
11 class FacebookArcanistConfiguration
extends ArcanistConfiguration
{
12 public function getCustomArgumentsForCommand($command) {
13 if ($command == "land") {
15 'async' => array('help' => 'Just to make tools happy'));
20 public function didRunWorkflow($command,
21 ArcanistBaseWorkflow
$workflow,
23 // Default options don't terminate on failure, but that's what we want. In
24 // the current case we use assertions intentionally as "terminate on failure
26 assert_options(ASSERT_BAIL
, true);
29 assert(strlen($command) > 0);
31 if ($command == DIFF_COMMAND
&& !$workflow->isRawDiffSource()) {
32 $diffID = $workflow->getDiffId();
34 // When submitting a diff this code path gets executed multiple times in
35 // a row. We only care about the case when ID for the diff is provided
36 // because that's what we need to apply the diff and trigger the tests.
37 if (strlen($diffID) > 0) {
38 assert(is_numeric($diffID));
39 startTestsInSandcastle(true /* $applyDiff */, $workflow, $diffID);