From 3a638edecd4dfae78f7b3f1bb567287f93220fee Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sun, 24 Jan 2021 16:24:28 -0800 Subject: [PATCH] fix: teach rtest.py how to find its default files regardless of CWD If rtest.py is run from a different directory -- e.g. from a top-level make check-recursive -- it could not find its default inputs. --- rtest/rtest.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rtest/rtest.py b/rtest/rtest.py index 3bedc80b7..2af10e1e4 100755 --- a/rtest/rtest.py +++ b/rtest/rtest.py @@ -18,8 +18,10 @@ import argparse import atexit import pathlib -TESTFILE = 'tests.txt' # Test specifications -GRAPHDIR = 'graphs' # Directory of input graphs and data +TESTFILE = os.path.join(os.path.dirname(__file__), 'tests.txt') + # Test specifications +GRAPHDIR = os.path.join(os.path.dirname(__file__), 'graphs') + # Directory of input graphs and data OUTDIR = 'ndata' # Directory for test output OUTHTML = 'nhtml' # Directory for html test report REFDIR = os.environ.get('REFDIR', '') # Directory for expected test output -- 2.40.0