diff options
author | Evan Mallory <schmave@gmail.com> | 2016-09-22 18:51:10 -0400 |
---|---|---|
committer | Evan Mallory <schmave@gmail.com> | 2016-09-23 08:14:30 -0400 |
commit | 0e691e76dbd928b4aa919cbb9788c805e34937dc (patch) | |
tree | 31b4d0c6a09c6e33b1c67b943dbff79adf14bd6a /test/LedgerHarness.py | |
parent | 132156766770da8340138aab117cf7e37787403c (diff) | |
download | fork-ledger-0e691e76dbd928b4aa919cbb9788c805e34937dc.tar.gz fork-ledger-0e691e76dbd928b4aa919cbb9788c805e34937dc.tar.bz2 fork-ledger-0e691e76dbd928b4aa919cbb9788c805e34937dc.zip |
Fix test harness to work with msys2
With this change, 97% of the tests pass. See the build on appveyor for more info: https://ci.appveyor.com/project/Evan/ledger/build/build-49
I'll follow up with another PR to fix some of the remaining broken tests
Diffstat (limited to 'test/LedgerHarness.py')
-rwxr-xr-x | test/LedgerHarness.py | 7 |
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) |