diff options
author | Zhizhou Yang <zhizhouy@google.com> | 2017-08-29 10:26:29 -0700 |
---|---|---|
committer | Zhizhou Yang <zhizhouy@google.com> | 2017-08-29 10:44:01 -0700 |
commit | bd23f99b6e4016cee6108f40695268d3a3f4dbc1 (patch) | |
tree | 99db9c9cf1e0e1a8fbc0795e0ebfda343adaed4e | |
parent | 403f859c16e8ad5e75e8200728a22a717ebd1e00 (diff) | |
download | benchmark-bd23f99b6e4016cee6108f40695268d3a3f4dbc1.tar.gz |
Fix bug patching panorama benchmark
Need to create benchmark directory before patching panorama.diff.
Will also delete the directory after cleaning the git.
Meanwhile, since we are using marlin/sailfish device to do test often,
changed default frequency to 979200 to match it.
Test: Run panorama benchmark from a new repo and succeeded.
Change-Id: I1244438ef93be0d27b45b267815d619dcb86a863
-rwxr-xr-x | apply_patches.py | 1 | ||||
-rwxr-xr-x | discard_patches.py | 5 | ||||
-rwxr-xr-x | run.py | 4 |
3 files changed, 8 insertions, 2 deletions
diff --git a/apply_patches.py b/apply_patches.py index e0499d44..ff706f1d 100755 --- a/apply_patches.py +++ b/apply_patches.py @@ -64,6 +64,7 @@ def try_patch_panorama(): # FIXME: A quick hack, need to handle errors and check whether has been # applied in the future. try: + subprocess.check_call(['mkdir', '-p', panorama_dir]) subprocess.check_call(['git', '-C', panorama_dir, 'apply', panorama_patch]) print('Panorama patched successfully!') except subprocess.CalledProcessError: diff --git a/discard_patches.py b/discard_patches.py index 7a4b0b56..4dd99ead 100755 --- a/discard_patches.py +++ b/discard_patches.py @@ -36,6 +36,11 @@ def dispatch_panorama(): panorama_dir = os.path.join(config.android_home, config.bench_dict['Panorama']) discard_git(panorama_dir) + try: + subprocess.check_call(['rm', '-rf', panorama_dir]) + print('Panorama benchmark directory deleted successfully!') + except subprocess.CalledProcessError: + print('Error deleting Panorama benchmark directory') def dispatch_synthmark(): @@ -109,12 +109,12 @@ def _parse_arguments(argv): parser.add_argument( '--frequency', type=int, - default=960000, + default=979200, help='Specify the CPU frequency of the device. The ' 'unit is KHZ. The available value is defined in' 'cpufreq/scaling_available_frequency file in ' 'device\'s each core directory. ' - 'The default value is 960000, which shows a ' + 'The default value is 979200, which shows a ' 'balance in noise and performance. Lower ' 'frequency will slow down the performance but ' 'reduce noise.') |