]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests: py: re-enables nft-test.py to load the local nftables.py master
authorZhongqiu Duan <dzq.aishenghu0@gmail.com>
Fri, 4 Jul 2025 03:12:16 +0000 (03:12 +0000)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 4 Jul 2025 07:46:17 +0000 (09:46 +0200)
This is a needed follow-up of commit ce443afc21455 ("py: move
package source into src directory") from 2023. Since that change,
nft-test.py started using the host's nftables.py instead of the local
one. But since nft-test.py passes the local src/.libs/libnftables.so.1
as parameter when instantiating the Nftables class, we did nevertheless
use the local libnftables.

Fixes: ce443afc21455 ("py: move package source into src directory")
Reviewed-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Zhongqiu Duan <dzq.aishenghu0@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
tests/py/nft-test.py

index c7e55b0c324128131ee0183e5b7f8d73adbbec3c..984f2b937a077a51b67ef23043056e6e10f0c926 100755 (executable)
@@ -23,7 +23,7 @@ import traceback
 import tempfile
 
 TESTS_PATH = os.path.dirname(os.path.abspath(__file__))
-sys.path.insert(0, os.path.join(TESTS_PATH, '../../py/'))
+sys.path.insert(0, os.path.join(TESTS_PATH, '../../py/src'))
 os.environ['TZ'] = 'UTC-2'
 
 from nftables import Nftables