mirror of
https://github.com/JasonN3/build-container-installer.git
synced 2025-12-25 10:57:55 +01:00
use fifo for input
This commit is contained in:
parent
cb5f9058fa
commit
aab0d2b73d
1 changed files with 4 additions and 3 deletions
7
.github/workflows/build-and-test.yml
vendored
7
.github/workflows/build-and-test.yml
vendored
|
|
@ -167,12 +167,13 @@ jobs:
|
||||||
|
|
||||||
- name: Start the test VM
|
- name: Start the test VM
|
||||||
run: |
|
run: |
|
||||||
|
mkfifo vm.stdin
|
||||||
qemu-system-x86_64 -name "Anaconda" -boot c -m 4096 -cpu qemu64 -display none -smp 2 -drive file=disk.qcow2 -serial telnet:localhost:4321,server,nowait & export QEMU_PID=$!
|
qemu-system-x86_64 -name "Anaconda" -boot c -m 4096 -cpu qemu64 -display none -smp 2 -drive file=disk.qcow2 -serial telnet:localhost:4321,server,nowait & export QEMU_PID=$!
|
||||||
echo "PID: $QEMU_PID"
|
echo "PID: $QEMU_PID"
|
||||||
timeout 1m bash -c "while ! (echo > /dev/tcp/127.0.0.1/4321); do sleep 0.1; done"
|
timeout 1m bash -c "while ! (echo > /dev/tcp/127.0.0.1/4321); do sleep 0.1; done"
|
||||||
(nc localhost 4321 | tee vm.stdout) &
|
(nc localhost 4321 < vm.stdin | tee vm.stdout) &
|
||||||
timeout 30m bash -c "while ! (grep 'login:' vm.stdout); do sleep 1; done"
|
timeout 30m bash -c "while ! (grep 'login:' vm.stdout); do sleep 1; done"
|
||||||
timeout 1m bash -c 'echo "core" | nc localhost 4321'
|
timeout 1m bash -c 'echo "core" > vm.stdin'
|
||||||
timeout 30m bash -c "while ! (grep -i 'password:' vm.stdout); do sleep 1; done"
|
timeout 30m bash -c "while ! (grep -i 'password:' vm.stdout); do sleep 1; done"
|
||||||
timeout 1m bash -c 'echo "foobar" | nc localhost 4321'
|
timeout 1m bash -c 'echo "foobar" > vm.stdin'
|
||||||
echo "VM ready for tests"
|
echo "VM ready for tests"
|
||||||
Loading…
Add table
Add a link
Reference in a new issue