File: httpfile

package info (click to toggle)
aria2 1.37.0%2Bdebian-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,128 kB
  • sloc: cpp: 115,006; ansic: 9,140; makefile: 1,466; ruby: 475; python: 373; sh: 260; xml: 176
file content (19 lines) | stat: -rwxr-xr-x 393 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh
set -e

PORT=43248

# start local http server
python3 -m http.server $PORT &
HTTP_PID=$!
trap "kill $HTTP_PID" EXIT TERM INT
# let the http server settle down
for i in $(seq 30); do
    ss -nlt | grep -qF :$PORT && break
    sleep 1
done

aria2c -d $AUTOPKGTEST_TMP http://localhost:$PORT/debian/control

# verify that files are identical
cmp debian/control $AUTOPKGTEST_TMP/control