Skip to content

Commit baa05be

Browse files
vriesdavidmalcolm
authored andcommitted
testcpychecker.py: Find cpychecker.py relative to self
Currently testcpychecker.py finds cpychecker.py in the current directory, which makes the test fail in a seperate build setting. Fix this by finding cpychecker.py relative to testcpychecker.py.
1 parent 50d8816 commit baa05be

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

testcpychecker.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,9 @@ def _describe_activity(self):
6262

6363
class AnalyzerTests(unittest.TestCase):
6464
def compile_src(self, bm):
65+
here = os.path.dirname(os.path.abspath(__file__))
6566
extra_cflags=['-fplugin=%s' % os.path.abspath('%s.so' % PLUGIN_NAME),
66-
'-fplugin-arg-%s-script=cpychecker.py' % PLUGIN_NAME]
67+
'-fplugin-arg-%s-script=%s/cpychecker.py' % (PLUGIN_NAME, here)]
6768

6869
# GCC 4.8 started showing the source line where the problem is,
6970
# followed by another line showing a caret indicating column.

0 commit comments

Comments
 (0)