File: run-hatop

package info (click to toggle)
hatop 0.8.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 632 kB
  • sloc: python: 1,794; sh: 152; makefile: 75
file content (19 lines) | stat: -rwxr-xr-x 427 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash


set -e

# run it

hatop -h
hatop --version

# try a socket connection
ln -s /usr/bin/hatop "${AUTOPKGTEST_TMP}/hatop.py"
export PYTHONPATH="${AUTOPKGTEST_TMP}"
SOCKET='/run/haproxy/admin.sock'

for py in $(py3versions -s 2> /dev/null)
do echo "Testing with $py in $(pwd):"
    ${py} -c "import hatop; s=hatop.Socket('${SOCKET}', False); sd=hatop.SocketData(s); s.connect(); sd.update_info(); print(sd.info)"
done