CI: add example to sim

Signed-off-by: nietingting <nietingting@xiaomi.com>
This commit is contained in:
nietingting 2022-10-21 18:04:29 +08:00 committed by Xiang Xiao
parent 61b1791584
commit f361d1cd41
6 changed files with 69 additions and 4 deletions

View File

@ -6,6 +6,7 @@
# modifications.
#
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
# CONFIG_NSH_NETINIT is not set
CONFIG_ARCH="arm"
CONFIG_ARCH_BOARD="sabre-6quad"
CONFIG_ARCH_BOARD_SABRE_6QUAD=y
@ -27,8 +28,10 @@ CONFIG_DEBUG_FULLOPT=y
CONFIG_DEBUG_SYMBOLS=y
CONFIG_DEV_ZERO=y
CONFIG_EXAMPLES_HELLO=y
CONFIG_EXAMPLES_HELLOXX=y
CONFIG_EXAMPLES_PIPE=y
CONFIG_EXAMPLES_POPEN=y
CONFIG_EXAMPLES_USRSOCKTEST=y
CONFIG_EXPERIMENTAL=y
CONFIG_FS_PROCFS=y
CONFIG_HAVE_CXX=y
@ -37,11 +40,13 @@ CONFIG_IMX6_UART1=y
CONFIG_IMX_DDR_SIZE=1073741824
CONFIG_INIT_ENTRYPOINT="nsh_main"
CONFIG_INTELHEX_BINARY=y
CONFIG_NET=y
CONFIG_NETDEV_LATEINIT=y
CONFIG_NET_USRSOCK=y
CONFIG_NSH_ARCHINIT=y
CONFIG_NSH_BUILTIN_APPS=y
CONFIG_NSH_FILEIOSIZE=512
CONFIG_NSH_READLINE=y
CONFIG_PIPES=y
CONFIG_PL310_LOCKDOWN_BY_LINE=y
CONFIG_PL310_LOCKDOWN_BY_MASTER=y
CONFIG_PREALLOC_TIMERS=4

View File

@ -7,6 +7,7 @@
#
# CONFIG_DISABLE_OS_API is not set
# CONFIG_NSH_DISABLE_LOSMART is not set
# CONFIG_NSH_NETINIT is not set
CONFIG_16550_ADDRWIDTH=0
CONFIG_16550_UART0=y
CONFIG_16550_UART0_BASE=0x10000000
@ -33,10 +34,13 @@ CONFIG_DEBUG_SYMBOLS=y
CONFIG_DEV_ZERO=y
CONFIG_ELF=y
CONFIG_EXAMPLES_HELLO=y
CONFIG_EXAMPLES_HELLOXX=y
CONFIG_EXAMPLES_PIPE=y
CONFIG_EXAMPLES_POPEN=y
CONFIG_EXAMPLES_USRSOCKTEST=y
CONFIG_FS_HOSTFS=y
CONFIG_FS_PROCFS=y
CONFIG_HAVE_CXX=y
CONFIG_IDLETHREAD_STACKSIZE=2048
CONFIG_INIT_ENTRYPOINT="nsh_main"
CONFIG_INTELHEX_BINARY=y
@ -45,13 +49,16 @@ CONFIG_LIBC_EXECFUNCS=y
CONFIG_LIBC_FLOATINGPOINT=y
CONFIG_LIBC_PERROR_STDOUT=y
CONFIG_LIBC_STRERROR=y
CONFIG_NET=y
CONFIG_NETDEV_LATEINIT=y
CONFIG_NETUTILS_NETINIT=y
CONFIG_NET_USRSOCK=y
CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6
CONFIG_NSH_ARCHINIT=y
CONFIG_NSH_BUILTIN_APPS=y
CONFIG_NSH_FILEIOSIZE=512
CONFIG_NSH_READLINE=y
CONFIG_PATH_INITIAL="/system/bin"
CONFIG_PIPES=y
CONFIG_PREALLOC_TIMERS=0
CONFIG_PSEUDOFS_SOFTLINKS=y
CONFIG_RAM_SIZE=33554432
@ -59,6 +66,8 @@ CONFIG_RAM_START=0x80000000
CONFIG_READLINE_CMD_HISTORY=y
CONFIG_RISCV_SEMIHOSTING_HOSTFS=y
CONFIG_RR_INTERVAL=200
CONFIG_SCHED_HPWORK=y
CONFIG_SCHED_LPWORK=y
CONFIG_SERIAL_UART_ARCH_MMIO=y
CONFIG_STACK_COLORATION=y
CONFIG_START_MONTH=12

View File

@ -7,6 +7,7 @@
#
# CONFIG_DISABLE_OS_API is not set
# CONFIG_NSH_DISABLE_LOSMART is not set
# CONFIG_NSH_NETINIT is not set
CONFIG_16550_ADDRWIDTH=0
CONFIG_16550_UART0=y
CONFIG_16550_UART0_BASE=0x10000000
@ -33,10 +34,13 @@ CONFIG_DEBUG_SYMBOLS=y
CONFIG_DEV_ZERO=y
CONFIG_ELF=y
CONFIG_EXAMPLES_HELLO=y
CONFIG_EXAMPLES_HELLOXX=y
CONFIG_EXAMPLES_PIPE=y
CONFIG_EXAMPLES_POPEN=y
CONFIG_EXAMPLES_USRSOCKTEST=y
CONFIG_FS_HOSTFS=y
CONFIG_FS_PROCFS=y
CONFIG_HAVE_CXX=y
CONFIG_IDLETHREAD_STACKSIZE=2048
CONFIG_INIT_ENTRYPOINT="nsh_main"
CONFIG_INIT_STACKSIZE=3072
@ -46,13 +50,16 @@ CONFIG_LIBC_EXECFUNCS=y
CONFIG_LIBC_FLOATINGPOINT=y
CONFIG_LIBC_PERROR_STDOUT=y
CONFIG_LIBC_STRERROR=y
CONFIG_NET=y
CONFIG_NETDEV_LATEINIT=y
CONFIG_NETUTILS_NETINIT=y
CONFIG_NET_USRSOCK=y
CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6
CONFIG_NSH_ARCHINIT=y
CONFIG_NSH_BUILTIN_APPS=y
CONFIG_NSH_FILEIOSIZE=512
CONFIG_NSH_READLINE=y
CONFIG_PATH_INITIAL="/system/bin"
CONFIG_PIPES=y
CONFIG_PREALLOC_TIMERS=0
CONFIG_PSEUDOFS_SOFTLINKS=y
CONFIG_RAM_SIZE=33554432
@ -60,6 +67,8 @@ CONFIG_RAM_START=0x80000000
CONFIG_READLINE_CMD_HISTORY=y
CONFIG_RISCV_SEMIHOSTING_HOSTFS=y
CONFIG_RR_INTERVAL=200
CONFIG_SCHED_HPWORK=y
CONFIG_SCHED_LPWORK=y
CONFIG_SERIAL_UART_ARCH_MMIO=y
CONFIG_STACK_COLORATION=y
CONFIG_START_MONTH=12

View File

@ -6,6 +6,7 @@
# modifications.
#
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
# CONFIG_NSH_NETINIT is not set
CONFIG_ALLSYMS=y
CONFIG_ARCH="sim"
CONFIG_ARCH_BOARD="sim"
@ -23,6 +24,10 @@ CONFIG_DEV_LOOP=y
CONFIG_DEV_ZERO=y
CONFIG_EXAMPLES_GPIO=y
CONFIG_EXAMPLES_HELLO=y
CONFIG_EXAMPLES_HELLOXX=y
CONFIG_EXAMPLES_PIPE=y
CONFIG_EXAMPLES_POPEN=y
CONFIG_EXAMPLES_USRSOCKTEST=y
CONFIG_FAT_LCNAMES=y
CONFIG_FAT_LFN=y
CONFIG_FSUTILS_PASSWD=y
@ -45,6 +50,8 @@ CONFIG_LIBC_LOCALE_CATALOG=y
CONFIG_LIBC_LOCALE_GETTEXT=y
CONFIG_LIBC_MAX_EXITFUNS=1
CONFIG_LIBC_NUMBERED_ARGS=y
CONFIG_NET=y
CONFIG_NET_USRSOCK=y
CONFIG_NSH_ARCHINIT=y
CONFIG_NSH_ARCHROMFS=y
CONFIG_NSH_BUILTIN_APPS=y
@ -63,11 +70,11 @@ CONFIG_READLINE_TABCOMPLETION=y
CONFIG_SCHED_BACKTRACE=y
CONFIG_SCHED_HAVE_PARENT=y
CONFIG_SCHED_HPWORK=y
CONFIG_SCHED_WAITPID=y
CONFIG_START_MONTH=6
CONFIG_START_YEAR=2008
CONFIG_SYSTEM_DUMPSTACK=y
CONFIG_SYSTEM_NSH=y
CONFIG_SYSTEM_POPEN=y
CONFIG_TESTING_CXXTEST=y
CONFIG_TESTING_FSTEST=y
CONFIG_TESTING_GETPRIME=y

View File

@ -0,0 +1,2 @@
#!/usr/bin/python3
# encoding: utf-8

View File

@ -0,0 +1,33 @@
#!/usr/bin/python3
# encoding: utf-8
import pytest
pytestmark = [pytest.mark.common, pytest.mark.qemu]
def test_hello(p):
ret = p.sendCommand("hello", "Hello, World!!")
assert ret == 0
def test_helloxx(p):
ret = p.sendCommand("helloxx", "Hello, World!!")
assert ret == 0
def test_pipe(p):
p.sendCommand("umount /tmp")
ret = p.sendCommand("pipe", "redirect_reader: Returning success", 60)
assert ret == 0
p.sendCommand("\n")
p.sendCommand("mount -t tmpfs /tmp")
def test_popen(p):
ret = p.sendCommand("popen", "Calling pclose()")
assert ret == 0
def test_usrsocktest(p):
ret = p.sendCommand("usrsocktest", "HEAP AFTER TESTS", 60)
assert ret == 0