資源簡介
實現camera、system_server,zygote以及factoryreset壓力測試
代碼片段和文件信息
#-*-coding:utf-8?-*-
import?re
import?string
import?datetime
import?time
import?os
import?sys
import?getopt
from?string?import?atoi
import?xml.etree.ElementTree?as?et
import?multiprocessing
from?tools?import?Color
import?json
import?sys
reload(sys)
sys.setdefaultencoding(‘utf8‘)
clr?=?Color()
AAPT?=?os.path.join(os.getcwd()‘tools\\aapt.exe‘)
def?get_devices_list():???
????adb_list?=?re.findall(r‘([a-zA-Z0-9]+)\t+device‘os.popen(“adb?devices“).read().strip())
????return?adb_list
def?get_apk_list(apkSrc):
????“““
????Get?all?apk?packages
????“““
????if?not?os.path.exists(apkSrc):
????????print?“%s?isn‘t?exists“
????else:
????????return?os.popen(‘dir?/b?%s?|?findstr??“.apk“‘%apkSrc).read().strip().split(‘\n‘)
def?get_apk_src(appPath=None):
????“““
????Append?all?apks?list?like:
????[‘\\\\cntds-server\\docs\\apks\\com.baidu.appsearch_035041.apk‘
????‘\\\\cntds-server\\docs\\apks\\com.estrongs.android.pop_501.apk‘]
????“““
????if?appPath:
???
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2019-12-24?10:13??StressTest\
?????目錄???????????0??2019-01-24?10:27??StressTest\.idea\
?????文件?????????663??1980-01-01?00:00??StressTest\.idea\LA_StressTest.iml
?????文件?????????275??2019-12-24?10:11??StressTest\.idea\modules.xm
?????文件???????16231??1980-01-01?00:00??StressTest\.idea\workspace.xm
?????文件???????26341??2017-01-05?13:18??StressTest\ErlangShen.py
?????文件??????????83??2017-09-21?17:32??StressTest\FactoryReset_Stress.bat
?????文件????????2501??2018-12-06?17:52??StressTest\FactoryReset_Stress.py
?????文件????????4956??2019-12-24?10:13??StressTest\Stress.hta
?????目錄???????????0??2019-01-24?10:27??StressTest\jslib\
?????目錄???????????0??2019-01-24?10:27??StressTest\jslib\highcharts\
?????文件??????149191??1980-01-01?00:00??StressTest\jslib\highcharts\highcharts.js
?????目錄???????????0??2019-01-24?10:27??StressTest\jslib\highcharts\modules\
?????文件???????57892??1980-01-01?00:00??StressTest\jslib\highcharts\modules\canvas-tools.js
?????文件????????7670??1980-01-01?00:00??StressTest\jslib\highcharts\modules\exporting.js
?????文件???????94840??1980-01-01?00:00??StressTest\jslib\jquery-1.7.2.min.js
?????目錄???????????0??2019-01-24?10:27??StressTest\jslib\jquery-ui\
?????目錄???????????0??2019-01-24?10:27??StressTest\jslib\jquery-ui\images\
?????文件????????4096??1980-01-01?00:00??StressTest\jslib\jquery-ui\images\Thumbs.db
?????文件?????????418??1980-01-01?00:00??StressTest\jslib\jquery-ui\images\ui-bg_diagonals-thick_18_b81900_40x40.png
?????文件?????????312??1980-01-01?00:00??StressTest\jslib\jquery-ui\images\ui-bg_diagonals-thick_20_666666_40x40.png
?????文件?????????212??1980-01-01?00:00??StressTest\jslib\jquery-ui\images\ui-bg_flat_0_aaaaaa_40x100.png
?????文件?????????208??1980-01-01?00:00??StressTest\jslib\jquery-ui\images\ui-bg_flat_75_ffffff_40x100.png
?????文件?????????262??1980-01-01?00:00??StressTest\jslib\jquery-ui\images\ui-bg_glass_100_f6f6f6_1x400.png
?????文件?????????348??1980-01-01?00:00??StressTest\jslib\jquery-ui\images\ui-bg_glass_100_fdf5ce_1x400.png
?????文件?????????335??1980-01-01?00:00??StressTest\jslib\jquery-ui\images\ui-bg_glass_55_fbf9ee_1x400.png
?????文件?????????207??1980-01-01?00:00??StressTest\jslib\jquery-ui\images\ui-bg_glass_65_ffffff_1x400.png
?????文件?????????262??1980-01-01?00:00??StressTest\jslib\jquery-ui\images\ui-bg_glass_75_dadada_1x400.png
?????文件?????????262??1980-01-01?00:00??StressTest\jslib\jquery-ui\images\ui-bg_glass_75_e6e6e6_1x400.png
?????文件?????????332??1980-01-01?00:00??StressTest\jslib\jquery-ui\images\ui-bg_glass_95_fef1ec_1x400.png
?????文件????????5815??1980-01-01?00:00??StressTest\jslib\jquery-ui\images\ui-bg_gloss-wave_35_f6a828_500x100.png
............此處省略21個文件信息
評論
共有 條評論