summaryrefslogtreecommitdiff
path: root/test/RegressTests.py
diff options
context:
space:
mode:
authorAlexis Hildebrandt <afh@surryhill.net>2022-06-30 14:30:21 +0200
committerMartin Michlmayr <tbm@cyrius.com>2022-07-01 11:51:03 +0800
commit18305fd30df731e27b6e909ea7d846b579f0abc4 (patch)
tree9a941ccd86ad64ae934e73802a8d4e061272c3cd /test/RegressTests.py
parent7424c244d69c386187f6df87d309c1d54f8a435b (diff)
downloadfork-ledger-18305fd30df731e27b6e909ea7d846b579f0abc4.tar.gz
fork-ledger-18305fd30df731e27b6e909ea7d846b579f0abc4.tar.bz2
fork-ledger-18305fd30df731e27b6e909ea7d846b579f0abc4.zip
Replace os.path.abspath with os.path.realpath
to fix failing tests on Darwin, where /tmp is a symlink to /private/tmp and the tests fail as ledger reports filenames with the symlink resolved to /private/tmp, but the tests expect files with /tmp.
Diffstat (limited to 'test/RegressTests.py')
-rwxr-xr-xtest/RegressTests.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/RegressTests.py b/test/RegressTests.py
index b20c0aa6..2aefd80a 100755
--- a/test/RegressTests.py
+++ b/test/RegressTests.py
@@ -45,7 +45,7 @@ class RegressFile(object):
def transform_line(self, line):
line = line.replace('$sourcepath', harness.sourcepath)
- line = line.replace('$FILE', os.path.abspath(self.filename))
+ line = line.replace('$FILE', os.path.realpath(self.filename))
return line
def read_test(self):
@@ -117,7 +117,7 @@ class RegressFile(object):
use_stdin = True
else:
test['command'] = (('$ledger -f "%s" ' %
- os.path.abspath(self.filename)) +
+ os.path.realpath(self.filename)) +
test['command'])
p = harness.run(test['command'],