Skip to content

Commit fd748ba

Browse files
committed
Fix regression in renode container
- tagging to previous 1.15 version since 1.16 seems broken - Enforcing nrf52 config set/restore for renode runs
1 parent e30ca2d commit fd748ba

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

tools/renode/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM antmicro/renode:latest
1+
FROM docker.io/antmicro/renode:1.15.3
22

33
RUN whoami
44
USER root

tools/scripts/renode-test-update.sh

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,42 @@
33
export RENODE_UART=/tmp/wolfboot.uart
44
export RENODE_PIDFILE=/tmp/renode.pid
55
export RENODE_CONFIG=tools/renode/nrf52840_wolfboot.resc
6+
export RENODE_BUILD_CONFIG=config/examples/nrf52840.config
67
export POFF=262139
78
export RENODE_PORT=55155
89
export RENODE_OPTIONS="--pid-file=$RENODE_PIDFILE --disable-xwt -P $RENODE_PORT"
910
export EXPVER=tools/test-expect-version/test-expect-version
1011
export TEST_OPTIONS=$@
1112

13+
RENODE_CONFIG_BACKUP=
14+
15+
restore_build_config() {
16+
if [ -n "$RENODE_CONFIG_BACKUP" ] && [ -f "$RENODE_CONFIG_BACKUP" ]; then
17+
mv "$RENODE_CONFIG_BACKUP" .config
18+
else
19+
rm -f .config
20+
fi
21+
}
22+
23+
prepare_build_config() {
24+
if [ -f .config ]; then
25+
RENODE_CONFIG_BACKUP=$(mktemp /tmp/wolfboot-renode-config.XXXXXX)
26+
cp .config "$RENODE_CONFIG_BACKUP"
27+
fi
28+
cp "$RENODE_BUILD_CONFIG" .config
29+
}
30+
1231
quit_renode() {
1332
if (which nc); then
1433
(echo && echo quit && echo) | nc -q 1 localhost $RENODE_PORT >/dev/null
1534
fi
1635
}
1736

18-
37+
trap restore_build_config EXIT
1938

2039

2140
rm -f $RENODE_UART
41+
prepare_build_config
2242

2343
make keysclean
2444
make keytools

0 commit comments

Comments
 (0)