From: François HORTA Date: Tue, 23 Nov 2021 17:48:35 +0000 (+0100) Subject: Use python2 for tests because for travis, fix valgrind list1 test X-Git-Tag: v1.8.0~13^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2e0ab62f8da2bd814c537e3eba063139d7ff3ec0;p=thirdparty%2Frrdtool-1.x.git Use python2 for tests because for travis, fix valgrind list1 test --- diff --git a/tests/cached/valgrind-supressions b/tests/cached/valgrind-supressions new file mode 120000 index 00000000..e409c1e3 --- /dev/null +++ b/tests/cached/valgrind-supressions @@ -0,0 +1 @@ +../valgrind-supressions \ No newline at end of file diff --git a/tests/functions b/tests/functions index cafb5abf..bf6ed5a8 100644 --- a/tests/functions +++ b/tests/functions @@ -204,10 +204,11 @@ function run_cached { export RRDTOOL=RRDTOOLCOMPAT randport=$(python -S -c "import random; random.seed('$(basename $0)'); print(random.randrange(49152,65535))") - port=$(python -S << HERE -import socketserver -with socketserver.TCPServer(("localhost", 0), None) as s: - print(s.server_address[1]) + port=$(python2 -S << HERE +import SocketServer +s = SocketServer.TCPServer(("localhost", 0), None) +print(s.server_address[1]) +s.server_close() HERE ) ADDR="localhost:$port"