~linaro-validation/lava-android-test/trunk

« back to all changes in this revision

Viewing changes to lava_android_test/test_definitions/cts/cts_wrapper.py

  • Committer: Yongqin Liu
  • Date: 2013-06-09 07:36:23 UTC
  • mfrom: (256.1.1 lava-android-test)
  • Revision ID: yongqin.liu@linaro.org-20130609073623-2p8ug3zj30xtn4be
add host log and logcat log of the CTS test into the result as attachment

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
            if ret_code != 0:
62
62
                print "Failed to push file %s to device(%s)" % (zip_f,
63
63
                                                           adb.get_serial())
 
64
        log_target_dir = os.path.join(os.getcwd(),
 
65
                                  './android-cts/repository/logs/')
 
66
        for zip_f in find_files(log_target_dir, '.zip'):
 
67
            base_name = os.path.basename(zip_f)
 
68
            if base_name.startswith('device_logcat_'):
 
69
                base_name = 'device_logcat.zip'
 
70
            if base_name.startswith('host_log_'):
 
71
                base_name = 'host_log.zip'
 
72
 
 
73
            ret_code = adb.push(zip_f, '/data/local/tmp/%s' % base_name)[0]
 
74
            if ret_code != 0:
 
75
                print "Failed to push file %s to device(%s)" % (zip_f,
 
76
                                                           adb.get_serial())
64
77
    return result
65
78
 
66
79