Add build, deploy and test sources
This commit is contained in:
1 parent
b962581812
commit
3d1a08f230
259 files changed
+15273
No files matched your search
@@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
# Запуск ia32 Xorboot и выбор пункта N (по умолчанию 6 = Ventoy).
|
||||
set -e
|
||||
IMG=/root/xor32.img
|
||||
N=${1:-6}
|
||||
WAIT=${2:-25}
|
||||
TAG=${3:-v}
|
||||
|
||||
rm -f /tmp/x32-$TAG.ppm /tmp/xm32-$TAG.sock
|
||||
qemu-system-i386 -m 1024 -machine q35 \
|
||||
-drive if=pflash,format=raw,readonly=on,file=/usr/share/OVMF/OVMF32_CODE_4M.fd \
|
||||
-drive if=pflash,format=raw,file=/root/OVMF32_VARS.fd \
|
||||
-drive file="$IMG",format=raw,if=ide \
|
||||
-device qemu-xhci -device usb-tablet -display none -vga std \
|
||||
-monitor unix:/tmp/xm32-$TAG.sock,server,nowait -daemonize
|
||||
|
||||
python3 - "$N" "$WAIT" "$TAG" <<'EOF'
|
||||
import socket, time, sys
|
||||
N = int(sys.argv[1]); WAIT = int(sys.argv[2]); TAG = sys.argv[3]
|
||||
sock = f'/tmp/xm32-{TAG}.sock'
|
||||
def mon(cmd, pause=0.25):
|
||||
s = socket.socket(socket.AF_UNIX); s.connect(sock); time.sleep(0.2)
|
||||
s.recv(65536); s.sendall((cmd+'\n').encode()); time.sleep(pause)
|
||||
try: s.recv(65536)
|
||||
except Exception: pass
|
||||
s.close()
|
||||
time.sleep(12)
|
||||
# текущий пункт — 2-й; шагаем вниз до N
|
||||
for _ in range(N-2):
|
||||
mon('sendkey down')
|
||||
time.sleep(0.5)
|
||||
mon('sendkey ret')
|
||||
time.sleep(WAIT)
|
||||
mon(f'screendump /tmp/x32-{TAG}.ppm')
|
||||
time.sleep(1)
|
||||
mon('quit')
|
||||
EOF
|
||||
sleep 2
|
||||
pkill -f "qemu-system-i386.*xor32.img" 2>/dev/null || true
|
||||
ls -l /tmp/x32-$TAG.ppm
|
||||
Reference in new issue
Block a user