aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xautomated/android/tradefed/tradefed-runner.py11
-rw-r--r--automated/android/tradefed/tradefed.yaml2
-rwxr-xr-xautomated/lib/android-test-lib2
-rwxr-xr-xautomated/lib/sh-test-lib20
-rw-r--r--automated/linux/ltp/skipfile-lsk-juno24
-rwxr-xr-xautomated/utils/test-runner.py9
6 files changed, 40 insertions, 28 deletions
diff --git a/automated/android/tradefed/tradefed-runner.py b/automated/android/tradefed/tradefed-runner.py
index 3fb97a3c..dd636454 100755
--- a/automated/android/tradefed/tradefed-runner.py
+++ b/automated/android/tradefed/tradefed-runner.py
@@ -150,6 +150,14 @@ if command is None:
logger.error("Not supported path: %s" % args.TEST_PATH)
sys.exit(1)
+vts_monitor_enabled = False
+if command == 'android-vts/tools/vts-tradefed' and \
+ os.path.exists('android-vts/testcases/vts/script/monitor-runner-output.py'):
+ vts_monitor_enabled = True
+ vts_run_details = open('{}/vts_run_details.txt'.format(OUTPUT), 'w')
+ monitor_cmd = 'android-vts/testcases/vts/script/monitor-runner-output.py -m'
+ monitor_vts_output = subprocess.Popen(shlex.split(monitor_cmd), stderr=subprocess.STDOUT, stdout=vts_run_details)
+
child = pexpect.spawn(command, logfile=tradefed_stdout)
try:
child.expect(prompt, timeout=60)
@@ -217,6 +225,9 @@ logger.info('Tradefed test finished')
tradefed_logcat.kill()
tradefed_logcat_out.close()
tradefed_stdout.close()
+if vts_monitor_enabled:
+ monitor_vts_output.kill()
+ vts_run_details.close()
# Locate and parse test result.
result_dir = '%s/results' % args.TEST_PATH
diff --git a/automated/android/tradefed/tradefed.yaml b/automated/android/tradefed/tradefed.yaml
index baf2a5e6..f9d4f9c3 100644
--- a/automated/android/tradefed/tradefed.yaml
+++ b/automated/android/tradefed/tradefed.yaml
@@ -53,3 +53,5 @@ run:
# Send test result to LAVA.
- ../../utils/send-to-lava.sh ./output/result.txt
- userdel testuser -f -r || true
+ # When adb device lost, end test job to mark it as 'incomplete'.
+ - if ! adb shell echo ok; then error_fatal "adb device $ANDROID_SERIAL lost!"; fi
diff --git a/automated/lib/android-test-lib b/automated/lib/android-test-lib
index 633dd454..a9044110 100755
--- a/automated/lib/android-test-lib
+++ b/automated/lib/android-test-lib
@@ -33,7 +33,7 @@ initialize_adb() {
set -x
adb_debug_info
adb start-server
- timeout 600 adb wait-for-device || error_msg "Device NOT found!"
+ timeout 600 adb wait-for-device || error_fatal "Device NOT found!"
adb devices
if [ -z "${ANDROID_SERIAL}" ]; then
diff --git a/automated/lib/sh-test-lib b/automated/lib/sh-test-lib
index ed0d96e2..95ff3f24 100755
--- a/automated/lib/sh-test-lib
+++ b/automated/lib/sh-test-lib
@@ -3,6 +3,17 @@
LANG=C
export LANG
+error_fatal() {
+ msg="$1"
+ [ -z "${msg}" ] && msg="Unknown error"
+ if which lava-test-raise;then
+ lava-test-raise msg
+ else
+ printf "FATAL ERROR: %s\n" "${msg}" >&2
+ fi
+ exit 1
+}
+
error_msg() {
msg="$1"
[ -z "${msg}" ] && msg="Unknown error"
@@ -193,8 +204,13 @@ install_deps() {
dist_name
case "${dist}" in
debian|ubuntu)
- # Use the default answers for all questions.
- DEBIAN_FRONTEND=noninteractive apt-get update -q -y
+ last_apt_time=/tmp/apt-get-updated.last
+ apt_cache_time=21600 # 6 hours
+ # Only run apt-get update if it hasn't been run in $apt_cache_time seconds
+ if [ ! -e ${last_apt_time} ] || \
+ [ "$(stat --format=%Y ${last_apt_time})" -lt $(( $(date +%s) - apt_cache_time )) ]; then
+ DEBIAN_FRONTEND=noninteractive apt-get update -q -y && touch ${last_apt_time}
+ fi
# shellcheck disable=SC2086
DEBIAN_FRONTEND=noninteractive apt-get install -q -y ${pkgs}
;;
diff --git a/automated/linux/ltp/skipfile-lsk-juno b/automated/linux/ltp/skipfile-lsk-juno
index 4584802d..89fb4938 100644
--- a/automated/linux/ltp/skipfile-lsk-juno
+++ b/automated/linux/ltp/skipfile-lsk-juno
@@ -71,14 +71,6 @@ isofs
# https://bugs.linaro.org/show_bug.cgi?id=3354
quota_remount_test01 quota_remount_test01.sh
-# pth_str02 hangs when using NFS filesystem.
-# LKFT: linux-mainline: x86 : ltp sched tests hang due to NFS not responding
-# https://bugs.linaro.org/show_bug.cgi?id=3338
-pth_str01 pth_str01
-pth_str02 pth_str02
-pth_str03 pth_str03
-time-schedule01 time-schedule
-
# syscalls
# mainline kernel tests baselining
# https://projects.linaro.org/projects/CTT/queues/issue/CTT-585
@@ -86,21 +78,7 @@ time-schedule01 time-schedule
# https://bugs.linaro.org/show_bug.cgi?id=3378
fcntl35 fcntl35
fcntl35_64 fcntl35_64
-open12 open12
-openat02 openat02
-renameat201 renameat201
-renameat202 renameat202 -i 10
-sendfile09 sendfile09
-sendfile09_64 sendfile09_64
-
-utime01 utime01
-utime02 utime02
-utime06 utime06
-utimes01 utimes01
-
-# LKFT: linux-mainline: Juno: LTP utimensat01 failed due to NFS mounted rootfs
-# https://bugs.linaro.org/show_bug.cgi?id=3398
-utimensat01 utimensat_tests.sh
+
# LKFT: linux-mainline: HiKey and Juno: ltp-containers Network Namespaces tests failed
# https://bugs.linaro.org/show_bug.cgi?id=3327
diff --git a/automated/utils/test-runner.py b/automated/utils/test-runner.py
index af640fd0..16f5e30c 100755
--- a/automated/utils/test-runner.py
+++ b/automated/utils/test-runner.py
@@ -874,21 +874,26 @@ def get_args():
* amend test parameters
* add new tests
'''))
+ parser.add_argument('-v', '--verbose', action='store_true', dest='verbose',
+ default=False, help='Set log level to DEBUG.')
args = parser.parse_args()
return args
def main():
+ args = get_args()
+
# Setup logger.
logger = logging.getLogger('RUNNER')
- logger.setLevel(logging.DEBUG)
+ logger.setLevel(logging.INFO)
+ if args.verbose:
+ logger.setLevel(logging.DEBUG)
ch = logging.StreamHandler()
ch.setLevel(logging.DEBUG)
formatter = logging.Formatter('%(asctime)s - %(name)s: %(levelname)s: %(message)s')
ch.setFormatter(formatter)
logger.addHandler(ch)
- args = get_args()
logger.debug('Test job arguments: %s' % args)
if args.kind != "manual" and args.target is None:
if os.geteuid() != 0: