From 0353b853cba635e50e574211b068818676bf469e Mon Sep 17 00:00:00 2001 From: krad Date: Tue, 12 Apr 2016 10:37:58 -0700 Subject: [PATCH] Propagate sandcastle run error to UI Summary: Currently the code does not propagate the sandcastle precommit test run error status to UI. This can confuse the developer when searching for errors. With this change, all success should be in green and all errors should be in red Test Plan: Submit the diff (and hopefully something will fail) Reviewers: andrewkr Subscribers: andrewkr, dhruba, leveldb Differential Revision: https://reviews.facebook.net/D56595 --- arcanist_util/config/FacebookArcanistConfiguration.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/arcanist_util/config/FacebookArcanistConfiguration.php b/arcanist_util/config/FacebookArcanistConfiguration.php index 156a6dbfb..16b545311 100644 --- a/arcanist_util/config/FacebookArcanistConfiguration.php +++ b/arcanist_util/config/FacebookArcanistConfiguration.php @@ -92,12 +92,13 @@ class FacebookArcanistConfiguration extends ArcanistConfiguration { // Run the actual command $this->updateTest($diffID, $test); $cmd = $this->updateTestCommand($diffID, $test, "running") . ";" - . "(./build_tools/precommit_checker.py " . $test - . "&& " + . "./build_tools/precommit_checker.py " . $test + . "; exit_code=$?; ([[ \$exit_code -eq 0 ]] &&" . $this->updateTestCommand($diffID, $test, "pass") . ")" - . "|| " . $this->updateTestCommand($diffID, $test, "fail") + . "||" . $this->updateTestCommand($diffID, $test, "fail") . "; cat /tmp/precommit-check.log" - . "; for f in `ls t/log-*`; do echo \$f; cat \$f; done"; + . "; for f in `ls t/log-*`; do echo \$f; cat \$f; done;" + . "[[ \$exit_code -eq 0 ]]"; $run_test = array( "name" => "Run " . $test,