blob: 13a07fa1b152692e871f1f09705b2106af03c0df (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#!/usr/bin/env python3
# stdlib imports
import atexit
import sys
import subprocess
# stdlib "from" imports
from pathlib import Path
assert __name__ == "__main__", "Can't determine script dir"
_SCRIPT_DIR = Path(sys.argv[0]).parent.resolve()
subprocess.check_call([_SCRIPT_DIR.joinpath("setup")])
# Try to ensure we tear down the network on exit, including failure, ctrl-c, etc.
atexit.register(lambda: subprocess.check_call([_SCRIPT_DIR.joinpath("teardown")]))
# bootstrap the network
subprocess.check_call([_SCRIPT_DIR.joinpath("bootstrap")])
# test the network
subprocess.check_call([_SCRIPT_DIR.joinpath("test"), "-v"])
|