mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-25 07:31:01 +02:00
The original --quiet change failed (and was reverted) because cros_au_test_harness.py wasn't updated when the argument was changed from --quiet to --hide_info.
So... revert the reversion, and fix cros_au_test_harness. BUG=chromium-os:11680 TEST=Manual Review URL: http://codereview.chromium.org/6537005 Change-Id: I1bdf66a5735d4178ee1e2eaa838e7b4b7fb966d5
This commit is contained in:
parent
b885b80a33
commit
e47eee3bc8
@ -515,6 +515,7 @@ class RealAUTest(unittest.TestCase, AUTest):
|
|||||||
output = RunCommand([
|
output = RunCommand([
|
||||||
'%s/run_remote_tests.sh' % self.crosutils,
|
'%s/run_remote_tests.sh' % self.crosutils,
|
||||||
'--remote=%s' % self.remote,
|
'--remote=%s' % self.remote,
|
||||||
|
'--hide_info',
|
||||||
self.verify_suite,
|
self.verify_suite,
|
||||||
], error_ok=True, enter_chroot=False, redirect_stdout=True)
|
], error_ok=True, enter_chroot=False, redirect_stdout=True)
|
||||||
return self.AssertEnoughTestsPassed(self, output, percent_required_to_pass)
|
return self.AssertEnoughTestsPassed(self, output, percent_required_to_pass)
|
||||||
|
@ -41,6 +41,7 @@ DEFINE_string board "$DEFAULT_BOARD" \
|
|||||||
DEFINE_boolean build ${FLAGS_FALSE} "Build tests while running" b
|
DEFINE_boolean build ${FLAGS_FALSE} "Build tests while running" b
|
||||||
DEFINE_string chroot "${DEFAULT_CHROOT_DIR}" "alternate chroot location" c
|
DEFINE_string chroot "${DEFAULT_CHROOT_DIR}" "alternate chroot location" c
|
||||||
DEFINE_boolean cleanup ${FLAGS_FALSE} "Clean up temp directory"
|
DEFINE_boolean cleanup ${FLAGS_FALSE} "Clean up temp directory"
|
||||||
|
DEFINE_boolean hide_info ${FLAGS_FALSE} "Hide most test logs on success"
|
||||||
DEFINE_integer iterations 1 "Iterations to run every top level test" i
|
DEFINE_integer iterations 1 "Iterations to run every top level test" i
|
||||||
DEFINE_string results_dir_root "" "alternate root results directory"
|
DEFINE_string results_dir_root "" "alternate root results directory"
|
||||||
DEFINE_boolean verbose ${FLAGS_FALSE} "Show verbose autoserv output" v
|
DEFINE_boolean verbose ${FLAGS_FALSE} "Show verbose autoserv output" v
|
||||||
@ -69,7 +70,10 @@ function start_ssh_agent() {
|
|||||||
fi
|
fi
|
||||||
cp $FLAGS_private_key $tmp_private_key
|
cp $FLAGS_private_key $tmp_private_key
|
||||||
chmod 0400 $tmp_private_key
|
chmod 0400 $tmp_private_key
|
||||||
ssh-add $tmp_private_key
|
|
||||||
|
# Run this way to capture normal stderr output but only display it
|
||||||
|
# on failure.
|
||||||
|
result="$(ssh-add $tmp_private_key 2>&1)" || die "$result"
|
||||||
}
|
}
|
||||||
|
|
||||||
function cleanup() {
|
function cleanup() {
|
||||||
@ -320,12 +324,20 @@ function main() {
|
|||||||
sudo chmod a+w ./server/{tests,site_tests}
|
sudo chmod a+w ./server/{tests,site_tests}
|
||||||
echo ./server/autoserv ${autoserv_args}
|
echo ./server/autoserv ${autoserv_args}
|
||||||
|
|
||||||
|
# run autoserv in subshell, capture it's output, and only display output
|
||||||
|
# on error.
|
||||||
|
code=0
|
||||||
if [ ${FLAGS_build} -eq ${FLAGS_TRUE} ]; then
|
if [ ${FLAGS_build} -eq ${FLAGS_TRUE} ]; then
|
||||||
# run autoserv in subshell
|
result="$(. ${BUILD_ENV} && tc-export CC CXX PKG_CONFIG &&
|
||||||
(. ${BUILD_ENV} && tc-export CC CXX PKG_CONFIG &&
|
./server/autoserv ${autoserv_args} 2>&1)" || code=1
|
||||||
./server/autoserv ${autoserv_args})
|
|
||||||
else
|
else
|
||||||
./server/autoserv ${autoserv_args}
|
result="$(./server/autoserv ${autoserv_args} 2>&1)" || code=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $code -ne 0 -o ${FLAGS_hide_info} -eq ${FLAGS_FALSE} ]; then
|
||||||
|
echo
|
||||||
|
echo "${result}"
|
||||||
|
exit $code
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
|
Loading…
x
Reference in New Issue
Block a user