summaryrefslogtreecommitdiff
path: root/testsuite/driver/perf_notes.py
diff options
context:
space:
mode:
authorDavid Eichmann <EichmannD@gmail.com>2018-12-11 13:19:50 -0500
committerBen Gamari <ben@smart-cactus.org>2018-12-11 13:19:51 -0500
commit54ee148c2b28d2326cfd273aed4842c2b53e2625 (patch)
tree0832979cab60c5074ee32bf605c103531ee03dd6 /testsuite/driver/perf_notes.py
parent288f681e06accbae690c46eb8a6e997fa9e5f56a (diff)
downloadhaskell-54ee148c2b28d2326cfd273aed4842c2b53e2625.tar.gz
Do not save performance test results if worktree is dirty.
Reviewers: bgamari, tdammers Reviewed By: bgamari, tdammers Subscribers: rwbarton, carter GHC Trac Issues: #15924 Differential Revision: https://phabricator.haskell.org/D5368
Diffstat (limited to 'testsuite/driver/perf_notes.py')
-rw-r--r--testsuite/driver/perf_notes.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/testsuite/driver/perf_notes.py b/testsuite/driver/perf_notes.py
index 5ceede7be2..6d80e07e12 100644
--- a/testsuite/driver/perf_notes.py
+++ b/testsuite/driver/perf_notes.py
@@ -30,6 +30,10 @@ def inside_git_repo():
except subprocess.CalledProcessError:
return False
+# Check if the worktree is dirty.
+def is_worktree_dirty():
+ return subprocess.check_output(['git', 'status', '--porcelain']) != b''
+
#
# Some data access functions. A the moment this uses git notes.
#