File tree Expand file tree Collapse file tree 2 files changed +54
-3
lines changed Expand file tree Collapse file tree 2 files changed +54
-3
lines changed Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ function cleanup {
4
+ sleep 1
5
+ pkill -9 rv32emu
6
+ }
7
+
8
+ function ASSERT {
9
+ $*
10
+ local RES=$?
11
+ if [ $RES -ne 0 ]; then
12
+ echo ' Assert failed: "' $* ' "'
13
+ exit $RES
14
+ fi
15
+ }
16
+
17
+ cleanup
18
+
19
+ TIMEOUT=50
20
+ OPTS=" -k build/linux-image/Image "
21
+ OPTS+=" -i build/linux-image/rootfs.cpio "
22
+ OPTS+=" -b build/minimal.dtb "
23
+ RUN_LINUX=" build/rv32emu ${OPTS} "
24
+
25
+ ASSERT expect << DONE
26
+ set timeout ${TIMEOUT}
27
+ spawn ${RUN_LINUX}
28
+ expect "buildroot login:" { send "root\n" } timeout { exit 1 }
29
+ expect "# " { send "uname -a\n" } timeout { exit 2 }
30
+ expect "riscv32 GNU/Linux" { send "\x01"; send "x" } timeout { exit 3 }
31
+ DONE
32
+
33
+ ret=$?
34
+ cleanup
35
+
36
+ MESSAGES=(" OK!" \
37
+ " Fail to boot" \
38
+ " Fail to login" \
39
+ " Fail to run commands" \
40
+ )
41
+
42
+ COLOR_G=' \e[32;01m' # Green
43
+ COLOR_N=' \e[0m' # No color
44
+ printf " \n[ ${COLOR_G}${MESSAGES[$ret]}${COLOR_N} ]\n"
45
+
46
+ exit ${ret}
Original file line number Diff line number Diff line change 42
42
- name : install-dependencies
43
43
run : |
44
44
sudo apt-get update -q -y
45
- sudo apt-get install -q -y libsdl2-dev libsdl2-mixer-dev
45
+ sudo apt-get install -q -y libsdl2-dev libsdl2-mixer-dev device-tree-compiler expect
46
46
.ci/riscv-toolchain-install.sh
47
47
echo "${{ github.workspace }}/toolchain/bin" >> $GITHUB_PATH
48
48
wget https://apt.llvm.org/llvm.sh
@@ -67,11 +67,11 @@ jobs:
67
67
- name : misalignment test in block emulation
68
68
run : |
69
69
make -C tests/system/alignment/
70
- make distclean && make ENABLE_EXT_C=0 ENABLE_SYSTEM=1 misalign-in-blk-emu -j$(nproc)
70
+ make distclean && make ENABLE_ELF_LOADER=1 ENABLE_EXT_C=0 ENABLE_SYSTEM=1 misalign-in-blk-emu -j$(nproc)
71
71
- name : MMU test
72
72
run : |
73
73
make -C tests/system/mmu/
74
- make distclean && make ENABLE_SYSTEM=1 mmu-test -j$(nproc)
74
+ make distclean && make ENABLE_ELF_LOADER=1 ENABLE_SYSTEM=1 mmu-test -j$(nproc)
75
75
- name : gdbstub test
76
76
run : |
77
77
make distclean && make ENABLE_GDBSTUB=1 gdbstub-test -j$(nproc)
85
85
run : |
86
86
make clean && make ENABLE_UBSAN=1 check -j$(nproc)
87
87
make ENABLE_JIT=1 clean && make ENABLE_JIT=1 ENABLE_UBSAN=1 check -j$(nproc)
88
+ - name : boot Linux kernel test
89
+ run : |
90
+ make clean && make ENABLE_SYSTEM=1 && make ENABLE_SYSTEM=1 artifact -j$(nproc)
91
+ .ci/boot-linux.sh
92
+ make ENABLE_SYSTEM=1 clean
88
93
89
94
host-arm64 :
90
95
needs : [detect-code-related-file-changes]
You can’t perform that action at this time.
0 commit comments