Is there a way to test all case in real bsp automatically?
Chris Johns
chrisj at rtems.org
Tue Nov 10 23:54:55 UTC 2020
On 10/11/20 7:27 pm, smallphd at aliyun.com wrote:
> hi, all
> Recently, I was testing rtems-5.1 in xilinx bsp. There are many test cases which
> need compile and burn to bsp each time.
> If I test 100 cases, I need compile and burn 100 times manually. This is boring.
> Is there a way to test 100 cases in one compilation and burning ?
> Thanks very much.
For the Zynq I build and run uboot with a configuration to TFTP load an image.
The uboot configuration can seen at [1].
I then configure RTEMS Tester [2] with the configuration for a Zedboard with:
tftp_port = 9101
bsp_tty_dev = cs-ser-2:30003
target_pretest_command = rtems-zynq-mkimg @EXE@
target_exe_filter = /\.exe/.exe.img/
target_on_command = cs-pw-ctl 1 toggle-on 2 4
target_off_command = cs-pw-ctl 1 off 2
target_reset_command = cs-pw-ctl 1 toggle-on 2 3
where port 9101 is a redirected port using the TFTP proxy server in RTEMS Tools,
cs-ser-2 is a RPi box running ser2net for the console, the rtems-zynq-mkimg
command is attached, and cs-pw-ctl is a custom command to control a network
based power switch. The configuration can be saved in $HOME/.rtemstesterrc.
Recent RTEMS Tools have a Python base TFTP server you can test with and a TFTP
proxy that lets you proxy and share a single TFTP port out to many ports using
the MAC address of the board.
You can also use the mkimage.py command in RTEMS Tools if you do not have a
mkimage available on your host.
Chris
[1] https://docs.rtems.org/branches/master/user/testing/tftp.html#u-boot-set-up
[2] https://docs.rtems.org/branches/master/user/testing/tftp.html#bsp-configuration
-------------- next part --------------
#! /bin/sh
set -e
OBJCOPY_FOR_TARGET=/opt/work/rtems/5/bin/arm-rtems5-objcopy
OBJCOPY="$OBJCOPY_FOR_TARGET"
START_ADDR=0x00104000
ENTRY_ADDR=0x00104000
for EXE_NAME in $*
do
if [ ! -f $EXE_NAME ]; then
echo "error: not found: $EXE_NAME"
exit 1
fi
echo "Image: $EXE_NAME"
${OBJCOPY} -R -S --strip-debug -O binary "$EXE_NAME" "$EXE_NAME.bin" || exit 1
cat "$EXE_NAME.bin" | gzip -9 >"$EXE_NAME.gz"
mkimage \
-A arm -O rtems -T kernel -a $START_ADDR -e $ENTRY_ADDR -n "RTEMS" \
-d "$EXE_NAME.gz" "$EXE_NAME.img"
done
exit 0
More information about the devel
mailing list