mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-20 13:06:33 +00:00
Running regression test in ci
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
af81741f23
commit
d24775001f
4
.github/workflows/integration_test.yml
vendored
4
.github/workflows/integration_test.yml
vendored
@ -28,6 +28,10 @@ jobs:
|
|||||||
id: syscall_test_linux
|
id: syscall_test_linux
|
||||||
run: make run AUTO_TEST=syscall ENABLE_KVM=0 BOOT_PROTOCOL=linux RELEASE_MODE=1
|
run: make run AUTO_TEST=syscall ENABLE_KVM=0 BOOT_PROTOCOL=linux RELEASE_MODE=1
|
||||||
|
|
||||||
|
- name: Regression Test (Linux Boot Portocol)
|
||||||
|
id: regression_test_linux
|
||||||
|
run: make run AUTO_TEST=regression ENABLE_KVM=0 BOOT_PROTOCOL=multiboot2 RELEASE_MODE=1
|
||||||
|
|
||||||
- name: Syscall Test (MicroVM)
|
- name: Syscall Test (MicroVM)
|
||||||
id: syscall_test_microvm
|
id: syscall_test_microvm
|
||||||
run: make run AUTO_TEST=syscall ENABLE_KVM=0 BOOT_METHOD=microvm RELEASE_MODE=1
|
run: make run AUTO_TEST=syscall ENABLE_KVM=0 BOOT_METHOD=microvm RELEASE_MODE=1
|
||||||
|
3
Makefile
3
Makefile
@ -22,6 +22,9 @@ ifeq ($(AUTO_TEST), syscall)
|
|||||||
BUILD_SYSCALL_TEST := 1
|
BUILD_SYSCALL_TEST := 1
|
||||||
INIT_CMDLINE += /opt/syscall_test/run_syscall_test.sh
|
INIT_CMDLINE += /opt/syscall_test/run_syscall_test.sh
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(AUTO_TEST), regression)
|
||||||
|
INIT_CMDLINE += /regression/run_regression_test.sh
|
||||||
|
endif
|
||||||
ifeq ($(AUTO_TEST), boot)
|
ifeq ($(AUTO_TEST), boot)
|
||||||
INIT_CMDLINE += -c exit 0
|
INIT_CMDLINE += -c exit 0
|
||||||
endif
|
endif
|
||||||
|
@ -94,6 +94,15 @@ cargo component-check
|
|||||||
|
|
||||||
### Integration Test
|
### Integration Test
|
||||||
|
|
||||||
|
#### Regression Test
|
||||||
|
|
||||||
|
This command will automatically run Jinux with the test binaries in `regression/apps` directory.
|
||||||
|
```bash
|
||||||
|
make run AUTO_TEST=regression
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Syscall Test
|
||||||
|
|
||||||
This command will build the syscall test binary and automatically run Jinux with the tests using QEMU.
|
This command will build the syscall test binary and automatically run Jinux with the tests using QEMU.
|
||||||
```bash
|
```bash
|
||||||
make run AUTO_TEST=syscall
|
make run AUTO_TEST=syscall
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
NETTEST_DIR=/regression/network
|
NETTEST_DIR=/regression/network
|
||||||
cd ${NETTEST_DIR}
|
cd ${NETTEST_DIR}
|
||||||
echo "Start net test......"
|
echo "Start network test......"
|
||||||
./tcp_server &
|
./tcp_server &
|
||||||
./tcp_client
|
./tcp_client
|
||||||
./udp_server &
|
./udp_server &
|
||||||
@ -11,4 +13,4 @@ echo "Start net test......"
|
|||||||
./unix_client
|
./unix_client
|
||||||
./socketpair
|
./socketpair
|
||||||
|
|
||||||
echo "All net test passed"
|
echo "All network test passed"
|
@ -5,11 +5,11 @@ set -e
|
|||||||
SCRIPT_DIR=/regression
|
SCRIPT_DIR=/regression
|
||||||
cd ${SCRIPT_DIR}/..
|
cd ${SCRIPT_DIR}/..
|
||||||
|
|
||||||
echo "Running tests......"
|
echo "Start process test......"
|
||||||
tests="hello_world/hello_world fork/fork execve/execve fork_c/fork signal_c/signal_test pthread/pthread_test hello_pie/hello pty/open_pty"
|
tests="hello_world/hello_world fork/fork execve/execve fork_c/fork signal_c/signal_test pthread/pthread_test hello_pie/hello pty/open_pty"
|
||||||
for testcase in ${tests}
|
for testcase in ${tests}
|
||||||
do
|
do
|
||||||
echo "Running test ${testcase}......"
|
echo "Running test ${testcase}......"
|
||||||
${SCRIPT_DIR}/${testcase}
|
${SCRIPT_DIR}/${testcase}
|
||||||
done
|
done
|
||||||
echo "All tests passed"
|
echo "All process test passed."
|
10
regression/apps/scripts/run_regression_test.sh
Executable file
10
regression/apps/scripts/run_regression_test.sh
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
SCRIPT_DIR=/regression
|
||||||
|
cd ${SCRIPT_DIR}
|
||||||
|
|
||||||
|
./shell_cmd.sh
|
||||||
|
./process.sh
|
||||||
|
./network.sh
|
@ -10,23 +10,23 @@ touch hello.txt
|
|||||||
mv hello.txt hello_world.txt
|
mv hello.txt hello_world.txt
|
||||||
rm hello_world.txt
|
rm hello_world.txt
|
||||||
|
|
||||||
awk '{print $2}' test_cmd.sh
|
awk '{print $2}' shell_cmd.sh
|
||||||
cp test_cmd.sh test_cmd_backup.sh
|
cp shell_cmd.sh shell_cmd_backup.sh
|
||||||
cat test_cmd_backup.sh
|
cat shell_cmd_backup.sh
|
||||||
rm test_cmd_backup.sh
|
rm shell_cmd_backup.sh
|
||||||
|
|
||||||
ln -s test_cmd.sh tesk_cmd_soft_link
|
ln -s shell_cmd.sh tesk_cmd_soft_link
|
||||||
readlink -f tesk_cmd_soft_link
|
readlink -f tesk_cmd_soft_link
|
||||||
tail -n 1 tesk_cmd_soft_link
|
tail -n 1 tesk_cmd_soft_link
|
||||||
rm tesk_cmd_soft_link
|
rm tesk_cmd_soft_link
|
||||||
|
|
||||||
ln test_cmd.sh tesk_cmd_hard_link
|
ln shell_cmd.sh tesk_cmd_hard_link
|
||||||
tail -n 1 tesk_cmd_hard_link
|
tail -n 1 tesk_cmd_hard_link
|
||||||
unlink tesk_cmd_hard_link
|
unlink tesk_cmd_hard_link
|
||||||
|
|
||||||
sed 3q test_cmd.sh
|
sed 3q shell_cmd.sh
|
||||||
|
|
||||||
find . -name "*test_cmd*"
|
find . -name "*shell_cmd*"
|
||||||
|
|
||||||
mkdir foo
|
mkdir foo
|
||||||
rmdir foo
|
rmdir foo
|
Reference in New Issue
Block a user