mirror of
https://github.com/rizinorg/rizin.git
synced 2026-10-12 02:21:57 +00:00
Add cleanup to http test (#6745)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Executable
+13
@@ -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
|
||||
Reference in New Issue
Block a user