From 0e691e76dbd928b4aa919cbb9788c805e34937dc Mon Sep 17 00:00:00 2001 From: Evan Mallory Date: Thu, 22 Sep 2016 18:51:10 -0400 Subject: 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 --- test/LedgerHarness.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/LedgerHarness.py') 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) -- cgit v1.2.3