]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix PYTHONPATH set for ans.py servers by start.pl
authorMichał Kępień <michal@isc.org>
Tue, 18 Mar 2025 05:19:01 +0000 (06:19 +0100)
committerMichał Kępień <michal@isc.org>
Tue, 18 Mar 2025 05:19:01 +0000 (06:19 +0100)
Commit 6c010a5644324947c8c13b5600cd8d988ae7684f caused the PYTHONPATH
environment variable to be set for ans.py servers started using
start.pl.  However, no system test has actually used the new
isctest.asyncserver module since that change was applied, so it has not
been noticed until now that including the source directory in PYTHONPATH
is only sufficient for in-tree builds.  Include the build directory
instead of the source directory in the PYTHONPATH environment variable
set for ans.py servers started by start.pl so that they work correctly
for both in-tree and out-of-tree builds.

bin/tests/system/start.pl

index 20e8bdc82ba51a69bb4a6c3e17a4632f3340ba56..35a7efe6906d7b580945ad2675f6525932769fb7 100755 (executable)
@@ -324,7 +324,7 @@ sub construct_ans_command {
        }
 
        if (-e "$testdir/$server/ans.py") {
-               $ENV{'PYTHONPATH'} = $testdir . ":" . $ENV{'srcdir'};
+               $ENV{'PYTHONPATH'} = $testdir . ":" . $builddir;
                $command = "$PYTHON -u ans.py 10.53.0.$n $queryport";
        } elsif (-e "$testdir/$server/ans.pl") {
                $command = "$PERL ans.pl";