aboutsummaryrefslogtreecommitdiff
path: root/android_bench_suite/apply_patches.py
diff options
context:
space:
mode:
Diffstat (limited to 'android_bench_suite/apply_patches.py')
-rwxr-xr-xandroid_bench_suite/apply_patches.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/android_bench_suite/apply_patches.py b/android_bench_suite/apply_patches.py
index 05849468..fbe1a8d2 100755
--- a/android_bench_suite/apply_patches.py
+++ b/android_bench_suite/apply_patches.py
@@ -76,15 +76,18 @@ def try_patch_synthmark():
# applied in the future.
try:
subprocess.check_call([
- 'bash', '-c', 'cd devrel && '
- 'repo init -u sso://devrel/manifest &&'
+ 'bash', '-c', 'mkdir devrel && '
+ 'cd devrel && '
+ 'repo init -u sso://devrel/manifest && '
'repo sync tools/synthmark'
])
- subprocess.check_call(['cp', '-rf', synthmark_dir, config.android_home])
- subprocess.check_call([
- 'cp', 'devrel/Android.mk',
- os.path.join(config.android_home, 'synthmark')
- ])
+ synthmark_patch = os.path.join(
+ os.path.dirname(os.path.realpath(__file__)), 'synthmark.diff')
+ subprocess.check_call(['git', '-C', synthmark_dir,
+ 'apply', synthmark_patch])
+
+ subprocess.check_call(['mv', '-f', synthmark_dir, config.android_home])
+ subprocess.check_call(['rm', '-rf', 'devrel'])
print('Synthmark patched successfully!')
except subprocess.CalledProcessError:
print('Synthmark patch not applied, error or already patched.')