Rewrite integration test suite in Python
authorKirill Isakov <bootctl@gmail.com>
Sun, 10 Apr 2022 07:53:25 +0000 (13:53 +0600)
committerKirill Isakov <bootctl@gmail.com>
Sun, 10 Apr 2022 08:42:59 +0000 (14:42 +0600)
commit9a012e485a2ed5ea5a28903d93bc625767bb20b2
treee45628d80bf24b476cf156032b0eda2ed60b99a4
parent2ded4a80352dfbbd17b35ae0eafcbdc62243d574
Rewrite integration test suite in Python

While the previous test suite ran fine in practice, it relied on
subtle differences in behavior of many UNIX tools, and thus needed GNU
Coreutils on many operating systems to work properly, and didn't work on
"pure" Windows at all.

A simple example would be how different versions of tail handle SIGPIPE
if you pipe its output into another process: GNU tail exits on SIGPIPE
since about 2017 (too lazy to look up the exact version, but this
changed recently), while most other tails continue reading the file and
piping the output into god knows where.

Since we need Python to run the new build system (meson) anyway, let's
use it for the test suite, and get rid of all other test dependencies.

It (currently) requires only the standard library of Python 3.6 or newer.

Unlike the original test suite, this one assigns node names and port
numbers randomly to support `meson test --repeat` (because meson can run
the same test multiple times in parallel, and this breaks with the old
approach).

Also remove old integration tests based on shell scripts.
56 files changed:
.pylintrc [new file with mode: 0644]
src/sptps_test.c
test/integration/algorithms.py [new file with mode: 0755]
test/integration/algorithms.test [deleted file]
test/integration/basic.py [new file with mode: 0755]
test/integration/basic.test [deleted file]
test/integration/command-fsck.test [deleted file]
test/integration/command_fsck.py [new file with mode: 0755]
test/integration/commandline.py [new file with mode: 0755]
test/integration/commandline.test [deleted file]
test/integration/compression.py [new file with mode: 0755]
test/integration/compression.test [deleted file]
test/integration/executables.py [new file with mode: 0755]
test/integration/executables.test [deleted file]
test/integration/import-export.test [deleted file]
test/integration/import_export.py [new file with mode: 0755]
test/integration/invite-join.test [deleted file]
test/integration/invite-offline.test [deleted file]
test/integration/invite-tinc-up.test [deleted file]
test/integration/invite.py [new file with mode: 0755]
test/integration/invite_tinc_up.py [new file with mode: 0755]
test/integration/legacy-protocol.test [deleted file]
test/integration/legacy_protocol.py [new file with mode: 0755]
test/integration/meson.build
test/integration/ns-ping.test [deleted file]
test/integration/ns_ping.py [new file with mode: 0755]
test/integration/scripts.py [new file with mode: 0755]
test/integration/scripts.test [deleted file]
test/integration/security-legacy.test [deleted file]
test/integration/security-sptps.test [deleted file]
test/integration/security.py [new file with mode: 0755]
test/integration/security.test [deleted file]
test/integration/splice.py [new file with mode: 0755]
test/integration/sptps-basic.test [deleted file]
test/integration/sptps_basic.py [new file with mode: 0755]
test/integration/testlib.sh [deleted file]
test/integration/testlib/__init__.py [new file with mode: 0755]
test/integration/testlib/check.py [new file with mode: 0755]
test/integration/testlib/cmd.py [new file with mode: 0755]
test/integration/testlib/const.py [new file with mode: 0755]
test/integration/testlib/event.py [new file with mode: 0755]
test/integration/testlib/external.py [new file with mode: 0755]
test/integration/testlib/log.py [new file with mode: 0755]
test/integration/testlib/notification.py [new file with mode: 0755]
test/integration/testlib/path.py [new file with mode: 0755]
test/integration/testlib/proc.py [new file with mode: 0755]
test/integration/testlib/script.py [new file with mode: 0755]
test/integration/testlib/template.py [new file with mode: 0755]
test/integration/testlib/template/netns.py.tpl [new file with mode: 0644]
test/integration/testlib/template/script.cmd.tpl [new file with mode: 0644]
test/integration/testlib/template/script.py.tpl [new file with mode: 0644]
test/integration/testlib/test.py [new file with mode: 0755]
test/integration/testlib/util.py [new file with mode: 0755]
test/integration/variables.py [new file with mode: 0755]
test/integration/variables.test [deleted file]
test/meson.build