summaryrefslogtreecommitdiff
path: root/testsuite/driver/perf_notes.py
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/driver/perf_notes.py')
-rw-r--r--testsuite/driver/perf_notes.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/testsuite/driver/perf_notes.py b/testsuite/driver/perf_notes.py
index c275041252..5ceede7be2 100644
--- a/testsuite/driver/perf_notes.py
+++ b/testsuite/driver/perf_notes.py
@@ -20,11 +20,12 @@ from math import ceil, trunc
from testutil import passed, failBecause
-# Check if "git status" can be run successfully.
+# Check if "git rev-parse" can be run successfully.
# True implies the current directory is a git repo.
-def can_git_status():
+def inside_git_repo():
try:
- subprocess.check_call(['git', 'status'])
+ subprocess.check_call(['git', 'rev-parse', 'HEAD'],
+ stdout=subprocess.DEVNULL)
return True
except subprocess.CalledProcessError:
return False
@@ -388,4 +389,4 @@ if __name__ == '__main__':
# Printing out percentages.
for test, metric in all_tests:
- print("{:27}{:30}".format(test, metric) + commit_string(test,'percentages')) \ No newline at end of file
+ print("{:27}{:30}".format(test, metric) + commit_string(test,'percentages'))