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
diff --git a/apply_patches.py b/apply_patches.py
index e0499d4..ff706f1 100755
--- a/apply_patches.py
+++ b/apply_patches.py
@@ -64,6 +64,7 @@
# 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 7a4b0b5..4dd99ea 100755
--- a/discard_patches.py
+++ b/discard_patches.py
@@ -36,6 +36,11 @@
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():
diff --git a/run.py b/run.py
index 55acb66..e74162b 100755
--- a/run.py
+++ b/run.py
@@ -109,12 +109,12 @@
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.')