Add cleanup to http test (#6745)

This commit is contained in:
Khairul Azhar Kasmiran
2026-09-15 21:35:58 +08:00
committed by GitHub
parent 78da8aec6f
commit 165fa91c1c
3 changed files with 15 additions and 1 deletions
+1 -1
View File
@@ -97,7 +97,7 @@ jobs:
- name: Install test dependencies
run: |
python3 -m pip install --user 'git+https://github.com/rizinorg/rz-pipe#egg=rzpipe&subdirectory=python' requests
python3 -m pip install --user 'git+https://github.com/rizinorg/rz-pipe#egg=rzpipe&subdirectory=python' psutil requests
sudo apt-get update
sudo apt-get --assume-yes install libc6 libc6-i386 debuginfod gdbserver
+1
View File
@@ -6,6 +6,7 @@ o http://127.0.0.1:9000/simple.html
r
b 256
ps
!python3 scripts/kill_http_server.py
EOF
EXPECT=<<EOF
342
+13
View File
@@ -0,0 +1,13 @@
#!/usr/bin/env python3
r"""
This script kills the http.server launched by http_server.py.
"""
import psutil
for p in psutil.process_iter(["cmdline"]):
if "python3 -m http.server" in " ".join(p.cmdline()):
p.kill()
break