diff --git a/arcanist_util/__phutil_library_map__.php b/arcanist_util/__phutil_library_map__.php index e3117382b499049beb55973f6190dac666b07e94..84ebc7b0a137a625b2c5eea9545b8f94db0a41f5 100644 --- a/arcanist_util/__phutil_library_map__.php +++ b/arcanist_util/__phutil_library_map__.php @@ -46,7 +46,7 @@ if (class_exists('ArcanistWorkflow')) { 'BaseDirectoryScopedFormatLinter' => 'cpp_linter/BaseDirectoryScopedFormatLinter.php', 'FacebookArcanistConfiguration' => 'config/FacebookOldArcanistConfiguration.php', 'FacebookFbcodeLintEngine' => 'lint_engine/FacebookFbcodeLintEngine.php', - 'FacebookFbcodeUnitTestEngine' => 'unit_engine/FacebookFbcodeUnitTestEngine.php', + 'FacebookFbcodeUnitTestEngine' => 'unit_engine/FacebookOldFbcodeUnitTestEngine.php', 'FacebookHowtoevenLintEngine' => 'lint_engine/FacebookHowtoevenLintEngine.php', 'FacebookHowtoevenLinter' => 'cpp_linter/FacebookHowtoevenLinter.php', 'FbcodeClangFormatLinter' => 'cpp_linter/FbcodeClangFormatLinter.php', diff --git a/arcanist_util/config/RocksDBCommonHelper.php b/arcanist_util/config/RocksDBCommonHelper.php index 28ee90a905f703132bea44c2ef1f39b529c2557a..cc876c4573127908ec385a83144f4554195a087a 100644 --- a/arcanist_util/config/RocksDBCommonHelper.php +++ b/arcanist_util/config/RocksDBCommonHelper.php @@ -62,7 +62,9 @@ function getSteps($applyDiff, $diffID, $username, $test) { assert(strlen($diffID) > 0); assert(is_numeric($diffID)); - $arcrc_content = exec("cat ~/.arcrc | gzip -f | base64 -w0"); + $arcrc_content = (PHP_OS == "Darwin" ? + exec("cat ~/.arcrc | gzip -f | base64") : + exec("cat ~/.arcrc | gzip -f | base64 -w0")); assert(strlen($arcrc_content) > 0); // Sandcastle machines don't have arc setup. We copy the user certificate @@ -257,7 +259,9 @@ function getSandcastleConfig() { // execute. Why compress the job definitions? Otherwise we run over the max // string size. $cmd = "echo " . base64_encode(json_encode($arg)) - . " | gzip -f | base64 -w0"; + . (PHP_OS == "Darwin" ? + " | gzip -f | base64" : + " | gzip -f | base64 -w0"); assert(strlen($cmd) > 0); $arg_encoded = shell_exec($cmd); diff --git a/arcanist_util/unit_engine/FacebookFbcodeUnitTestEngine.php b/arcanist_util/unit_engine/FacebookFbcodeUnitTestEngine.php index 985bd68fc26433eeeb55c90e4c4b9008044cd297..62c275f6a942ba1cae64fa5b8654d1c6ae7fca20 100644 --- a/arcanist_util/unit_engine/FacebookFbcodeUnitTestEngine.php +++ b/arcanist_util/unit_engine/FacebookFbcodeUnitTestEngine.php @@ -4,7 +4,7 @@ // LICENSE file in the root directory of this source tree. An additional grant // of patent rights can be found in the PATENTS file in the same directory. -class FacebookFbcodeUnitTestEngine extends ArcanistBaseUnitTestEngine { +class FacebookFbcodeUnitTestEngine extends ArcanistUnitTestEngine { public function run() { // For a call to `arc call-conduit differential.updateunitresults` to diff --git a/arcanist_util/unit_engine/FacebookOldFbcodeUnitTestEngine.php b/arcanist_util/unit_engine/FacebookOldFbcodeUnitTestEngine.php new file mode 100644 index 0000000000000000000000000000000000000000..985bd68fc26433eeeb55c90e4c4b9008044cd297 --- /dev/null +++ b/arcanist_util/unit_engine/FacebookOldFbcodeUnitTestEngine.php @@ -0,0 +1,17 @@ +setName("dummy_placeholder_entry"); + $result->setResult(ArcanistUnitTestResult::RESULT_PASS); + return array($result); + } +}