summaryrefslogtreecommitdiff
path: root/test/LedgerHarness.py
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2016-09-29 09:59:06 -0700
committerGitHub <noreply@github.com>2016-09-29 09:59:06 -0700
commitcd58d43228996198b5ba329f7c05109f2aaee65a (patch)
tree62166e8ec93573e1a5b6312e721fb5c24bfc18fc /test/LedgerHarness.py
parent258cab91ab702e82d477b41bb1c6a026c848bda5 (diff)
parent0e691e76dbd928b4aa919cbb9788c805e34937dc (diff)
downloadfork-ledger-cd58d43228996198b5ba329f7c05109f2aaee65a.tar.gz
fork-ledger-cd58d43228996198b5ba329f7c05109f2aaee65a.tar.bz2
fork-ledger-cd58d43228996198b5ba329f7c05109f2aaee65a.zip
Merge pull request #467 from schmave/win-2
Fix test harness to work with msys2
Diffstat (limited to 'test/LedgerHarness.py')
-rwxr-xr-xtest/LedgerHarness.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/LedgerHarness.py b/test/LedgerHarness.py
index 39a31286..63d6a0ec 100755
--- a/test/LedgerHarness.py
+++ b/test/LedgerHarness.py
@@ -86,6 +86,13 @@ class LedgerHarness:
if os.path.isfile(valgrind) and '--verify' in insert:
command = valgrind + ' -q ' + command
+ # If we are running under msys2, use bash to execute the test commands
+ if 'MSYSTEM' in os.environ:
+ bash_path = os.environ['MINGW_PREFIX'] + '/../usr/bin/bash.exe'
+ return Popen([bash_path, '-c', command], shell=False,
+ close_fds=False, env=env, stdin=PIPE, stdout=PIPE,
+ stderr=PIPE, cwd=self.sourcepath)
+
return Popen(command, shell=True, close_fds=True, env=env,
stdin=PIPE, stdout=PIPE, stderr=PIPE,
cwd=self.sourcepath)