diff -r 57c79542bebb -r 4fb489a998c9 tests/run-tests.py --- a/tests/run-tests.py Mon Nov 13 18:22:25 2017 -0800 +++ b/tests/run-tests.py Sun Nov 05 06:34:27 2017 +0100 @@ -968,6 +968,13 @@ ] r.append((self._escapepath(self._testtmp), b'$TESTTMP')) + testdir = os.path.dirname(self.path) + replacementfile = os.path.join(testdir, 'common-pattern.py') + + if os.path.exists(replacementfile): + data = {} + execfile(replacementfile, data) + r.extend(data.get('substitutions', ())) return r def _escapepath(self, p):