- Move adb restart commands so they are only run on tests.
- Sleep after 'adb start-server' to avoid the false positive device alerts.
- Save Test Report logs with unique filename so they are easier to print.

BUG=163476, 165999
TBR=frankf

Review URL: https://codereview.chromium.org/11669022

git-svn-id: http://src.chromium.org/svn/trunk/src/build@174596 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
ilevy@chromium.org 2012-12-25 06:09:44 +00:00
Родитель 6d3de31814
Коммит 5acee5a700
2 изменённых файлов: 8 добавлений и 4 удалений

Просмотреть файл

@ -64,9 +64,6 @@ function bb_baseline_setup {
unset CXX_target unset CXX_target
fi fi
adb kill-server
adb start-server
local build_path="${SRC_ROOT}/out/${BUILDTYPE}" local build_path="${SRC_ROOT}/out/${BUILDTYPE}"
local landmines_triggered_path="$build_path/.landmines_triggered" local landmines_triggered_path="$build_path/.landmines_triggered"
python "$SRC_ROOT/build/landmines.py" python "$SRC_ROOT/build/landmines.py"
@ -406,6 +403,11 @@ function bb_extract_build {
# Does not break build if a phone fails to restart # Does not break build if a phone fails to restart
function bb_reboot_phones { function bb_reboot_phones {
echo "@@@BUILD_STEP Rebooting phones@@@" echo "@@@BUILD_STEP Rebooting phones@@@"
# Restart adb to work around bugs, sleep to wait for usb discovery.
adb kill-server
adb start-server
sleep .5
( (
set +e set +e
cd $CHROME_SRC/build/android/pylib; cd $CHROME_SRC/build/android/pylib;

Просмотреть файл

@ -6,6 +6,7 @@
import json import json
import logging import logging
import os import os
import re
import time import time
import traceback import traceback
@ -133,7 +134,8 @@ class TestResults(object):
build_type, 'test_logs') build_type, 'test_logs')
if not os.path.exists(log_file_path): if not os.path.exists(log_file_path):
os.mkdir(log_file_path) os.mkdir(log_file_path)
full_file_name = os.path.join(log_file_path, test_type) full_file_name = os.path.join(
log_file_path, re.sub('\W', '_', test_type).lower() + '.log')
if not os.path.exists(full_file_name): if not os.path.exists(full_file_name):
with open(full_file_name, 'w') as log_file: with open(full_file_name, 'w') as log_file:
print >> log_file, '\n%s results for %s build %s:' % ( print >> log_file, '\n%s results for %s build %s:' % (