Fixes for arcanist config (#1271)
* Update arc config for ArcanistBaseUnitTestEngine -> ArcanistUnitTestEngine Test Plan: Execute Java test suite Reviewers: yhchiang Differential Revision: https://reviews.facebook.net/D61911 * Fix for arc use of base64 command on Max OS X Test Plan: Run on `arc diff` on Mac OS X and Linux Reviewers: yhchiang Differential Revision: https://reviews.facebook.net/D61917
This commit is contained in:
parent
87c91bd876
commit
db3dfb164e
@ -46,7 +46,7 @@ if (class_exists('ArcanistWorkflow')) {
|
|||||||
'BaseDirectoryScopedFormatLinter' => 'cpp_linter/BaseDirectoryScopedFormatLinter.php',
|
'BaseDirectoryScopedFormatLinter' => 'cpp_linter/BaseDirectoryScopedFormatLinter.php',
|
||||||
'FacebookArcanistConfiguration' => 'config/FacebookOldArcanistConfiguration.php',
|
'FacebookArcanistConfiguration' => 'config/FacebookOldArcanistConfiguration.php',
|
||||||
'FacebookFbcodeLintEngine' => 'lint_engine/FacebookFbcodeLintEngine.php',
|
'FacebookFbcodeLintEngine' => 'lint_engine/FacebookFbcodeLintEngine.php',
|
||||||
'FacebookFbcodeUnitTestEngine' => 'unit_engine/FacebookFbcodeUnitTestEngine.php',
|
'FacebookFbcodeUnitTestEngine' => 'unit_engine/FacebookOldFbcodeUnitTestEngine.php',
|
||||||
'FacebookHowtoevenLintEngine' => 'lint_engine/FacebookHowtoevenLintEngine.php',
|
'FacebookHowtoevenLintEngine' => 'lint_engine/FacebookHowtoevenLintEngine.php',
|
||||||
'FacebookHowtoevenLinter' => 'cpp_linter/FacebookHowtoevenLinter.php',
|
'FacebookHowtoevenLinter' => 'cpp_linter/FacebookHowtoevenLinter.php',
|
||||||
'FbcodeClangFormatLinter' => 'cpp_linter/FbcodeClangFormatLinter.php',
|
'FbcodeClangFormatLinter' => 'cpp_linter/FbcodeClangFormatLinter.php',
|
||||||
|
@ -62,7 +62,9 @@ function getSteps($applyDiff, $diffID, $username, $test) {
|
|||||||
assert(strlen($diffID) > 0);
|
assert(strlen($diffID) > 0);
|
||||||
assert(is_numeric($diffID));
|
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);
|
assert(strlen($arcrc_content) > 0);
|
||||||
|
|
||||||
// Sandcastle machines don't have arc setup. We copy the user certificate
|
// 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
|
// execute. Why compress the job definitions? Otherwise we run over the max
|
||||||
// string size.
|
// string size.
|
||||||
$cmd = "echo " . base64_encode(json_encode($arg))
|
$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);
|
assert(strlen($cmd) > 0);
|
||||||
|
|
||||||
$arg_encoded = shell_exec($cmd);
|
$arg_encoded = shell_exec($cmd);
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
// LICENSE file in the root directory of this source tree. An additional grant
|
// 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.
|
// 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() {
|
public function run() {
|
||||||
// For a call to `arc call-conduit differential.updateunitresults` to
|
// For a call to `arc call-conduit differential.updateunitresults` to
|
||||||
|
@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
// Copyright 2004-present Facebook. All Rights Reserved.
|
||||||
|
// This source code is licensed under the BSD-style license found in the
|
||||||
|
// 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 {
|
||||||
|
|
||||||
|
public function run() {
|
||||||
|
// For a call to `arc call-conduit differential.updateunitresults` to
|
||||||
|
// succeed we need at least one entry here.
|
||||||
|
$result = new ArcanistUnitTestResult();
|
||||||
|
$result->setName("dummy_placeholder_entry");
|
||||||
|
$result->setResult(ArcanistUnitTestResult::RESULT_PASS);
|
||||||
|
return array($result);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user