mirror of
https://github.com/flatpak/flatpak.git
synced 2026-01-17 04:08:23 -05:00
Rather than this weird shell loop with a timeout and polling we move the httpd spawning entirely into the python code, and use a pipe to synchronize the spawning. This way we can also use the shell job control to properly clean up any running processes from the test suite. Additionally, this adds some (lame) support for token handling in the test webserver, where you for any file foo can create a foo.need_token containing a token that is needed for that file.
11 lines
144 B
Bash
Executable File
11 lines
144 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -euo pipefail
|
|
|
|
dir=$1
|
|
|
|
rm -f httpd-pipe
|
|
mkfifo httpd-pipe
|
|
$(dirname $0)/web-server.py "$dir" 3> httpd-pipe &
|
|
read < httpd-pipe
|