DragonOS/oscomp/ci-boot-test.sh
Samuel Dai 717bd9209a
feat(ci): add CI support for building and booting riscv64 kernel in workflow, within oscomp environment (#6)
* feat(ide): add gdb-multiarch debug support for better stack tracking

* feat(test): add oscomp testcase aquirement

* feat(ci): bump to oscomp test

* feat(ci): new ci procedure

* feat(ci): update CI workflow to replace git mirror and remove unnecessary userland build condition
2025-03-21 22:47:57 +08:00

17 lines
504 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# 启动qemu并在后台运行将输出重定向到文件描述符3
exec 3< <(bash ./ci-start-${ARCH}.sh 2>&1)
# 读取qemu的输出直到检测到错误字段
while read -u 3 -r line; do
# 打印输出到控制台
echo "$line"
# 检查输出中是否包含指定的错误字段
if [[ "$line" == *"Hello, World!"* ]]; then
echo "启动成功!"
kill $(ps aux | grep "qemu-system-${ARCH}" | grep -v grep | awk "{print \$2}")
exit 0
fi
done