diff options
| author | Egor Tensin <egor@tensin.name> | 2026-10-14 18:01:31 +0500 |
|---|---|---|
| committer | Egor Tensin <egor@tensin.name> | 2026-10-14 18:01:31 +0500 |
| commit | 206f2718d753fac0f121fc994aa3d1280b9fdfee (patch) | |
| tree | 69e13e0ebb940872be39cd0b2b8d23f8e5d7dfd4 /test/lib/test.sh | |
| parent | README: update (diff) | |
| download | linux-status-206f2718d753fac0f121fc994aa3d1280b9fdfee.tar.gz linux-status-206f2718d753fac0f121fc994aa3d1280b9fdfee.zip | |
test: migrate to test-harness
Diffstat (limited to 'test/lib/test.sh')
| -rw-r--r-- | test/lib/test.sh | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/test/lib/test.sh b/test/lib/test.sh index ee35b05..a04e5a3 100644 --- a/test/lib/test.sh +++ b/test/lib/test.sh @@ -3,16 +3,13 @@ # For details, see https://github.com/egor-tensin/linux-status # Distributed under the MIT License. -test_should_fail= -test_root_dir= - test_server_port=35605 test_server_pid= _test_run_server() { log "Starting up server..." - log_run "$script_dir/../src/server.py" --port "$test_server_port" - "$script_dir/../src/server.py" --port "$test_server_port" >&2 & + log_run "$tests_dir/../src/server.py" --port "$test_server_port" + "$tests_dir/../src/server.py" --port "$test_server_port" >&2 & test_server_pid="$!" log "Server's PID: $test_server_pid" sleep 5 @@ -32,11 +29,7 @@ test_setup() { _test_run_server } -test_cleanup_default() { - if [ -n "$test_root_dir" ]; then - log "Removing test's root directory: $test_root_dir" - rm -rf -- "$test_root_dir" - fi +test_cleanup() { _test_kill_server } |
