diff options
Diffstat (limited to 'tools/calmbench')
-rw-r--r-- | tools/calmbench/calmbench.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/calmbench/calmbench.py b/tools/calmbench/calmbench.py index 827bf4f909..4b484c905b 100644 --- a/tools/calmbench/calmbench.py +++ b/tools/calmbench/calmbench.py @@ -137,7 +137,11 @@ def compile_modified(args): cwd=args.skiadir) print "Compiling stashed code" - subprocess.check_call(['git', 'stash'], cwd=args.skiadir) + stash_output = subprocess.check_output(['git', 'stash'], cwd=args.skiadir) + if 'No local changes to save' in stash_output: + subprocess.check_call(['git', 'reset', 'HEAD^', '--soft']) + subprocess.check_call(['git', 'stash']) + subprocess.check_call( ['ninja', '-C', args.ninjadir, 'nanobench'], cwd=args.skiadir) subprocess.check_call( |