Skip to content

Commit 162f5c4

Browse files
committed
Proper migration of renode tests
1 parent d99110f commit 162f5c4

9 files changed

Lines changed: 80 additions & 28 deletions

.github/workflows/test-renode-fastmath-smallstack.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,24 @@ on:
66
pull_request:
77
branches: [ '*' ]
88

9+
permissions:
10+
contents: read
11+
packages: read
12+
913
jobs:
1014
renode_automated_fastmath_smallstack:
1115
runs-on: ubuntu-22.04
16+
container:
17+
image: ghcr.io/wolfssl/wolfboot-ci-renode:latest
1218

1319
steps:
1420
- uses: actions/checkout@v4
1521
with:
1622
submodules: true
1723

24+
- name: Trust workspace
25+
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
26+
1827
- name: Select config
1928
run: |
2029
cp config/examples/nrf52840.config .config && make include/target.h
@@ -55,4 +64,3 @@ jobs:
5564
with:
5665
name: Renode Test Results
5766
path: test_results/
58-

.github/workflows/test-renode-fastmath.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,25 @@ on:
66
pull_request:
77
branches: [ '*' ]
88

9+
permissions:
10+
contents: read
11+
packages: read
12+
913
jobs:
1014
renode_automated_fastmath:
1115
runs-on: ubuntu-22.04
16+
container:
17+
image: ghcr.io/wolfssl/wolfboot-ci-renode:latest
1218
timeout-minutes: 15
1319

1420
steps:
1521
- uses: actions/checkout@v4
1622
with:
1723
submodules: true
1824

25+
- name: Trust workspace
26+
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
27+
1928
- name: Select config
2029
run: |
2130
cp config/examples/nrf52840.config .config && make include/target.h

.github/workflows/test-renode-noasm-smallstack.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,25 @@ on:
66
pull_request:
77
branches: [ '*' ]
88

9+
permissions:
10+
contents: read
11+
packages: read
12+
913
jobs:
1014
renode_automated_noasm_smallstack:
1115
runs-on: ubuntu-22.04
16+
container:
17+
image: ghcr.io/wolfssl/wolfboot-ci-renode:latest
1218
timeout-minutes: 15
1319

1420
steps:
1521
- uses: actions/checkout@v4
1622
with:
1723
submodules: true
1824

25+
- name: Trust workspace
26+
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
27+
1928
- name: Select config
2029
run: |
2130
cp config/examples/nrf52840.config .config && make include/target.h
@@ -56,4 +65,3 @@ jobs:
5665
with:
5766
name: Renode Test Results
5867
path: test_results/
59-

.github/workflows/test-renode-noasm.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,25 @@ on:
66
pull_request:
77
branches: [ '*' ]
88

9+
permissions:
10+
contents: read
11+
packages: read
12+
913
jobs:
1014
renode_automated_noasm:
1115
runs-on: ubuntu-22.04
16+
container:
17+
image: ghcr.io/wolfssl/wolfboot-ci-renode:latest
1218
timeout-minutes: 15
1319

1420
steps:
1521
- uses: actions/checkout@v4
1622
with:
1723
submodules: true
1824

25+
- name: Trust workspace
26+
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
27+
1928
- name: Select config
2029
run: |
2130
cp config/examples/nrf52840.config .config && make include/target.h
@@ -65,4 +74,3 @@ jobs:
6574
with:
6675
name: Renode Test Results
6776
path: test_results/
68-

.github/workflows/test-renode-nrf52.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,25 @@ on:
66
pull_request:
77
branches: [ '*' ]
88

9+
permissions:
10+
contents: read
11+
packages: read
12+
913
jobs:
1014
renode_automated_base:
1115
runs-on: ubuntu-22.04
16+
container:
17+
image: ghcr.io/wolfssl/wolfboot-ci-renode:latest
1218
timeout-minutes: 15
1319

1420
steps:
1521
- uses: actions/checkout@v4
1622
with:
1723
submodules: true
1824

25+
- name: Trust workspace
26+
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
27+
1928
- name: Select config
2029
run: |
2130
cp config/examples/nrf52840.config .config && make include/target.h SIGN=NONE
@@ -84,4 +93,3 @@ jobs:
8493
with:
8594
name: Renode Test Results
8695
path: test_results/
87-

.github/workflows/test-renode-sha3.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,25 @@ on:
66
pull_request:
77
branches: [ '*' ]
88

9+
permissions:
10+
contents: read
11+
packages: read
12+
913
jobs:
1014
renode_automated_multi_sha:
1115
runs-on: ubuntu-22.04
16+
container:
17+
image: ghcr.io/wolfssl/wolfboot-ci-renode:latest
1218
timeout-minutes: 15
1319

1420
steps:
1521
- uses: actions/checkout@v4
1622
with:
1723
submodules: true
1824

25+
- name: Trust workspace
26+
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
27+
1928
- name: Select config
2029
run: |
2130
cp config/examples/nrf52840.config .config && make include/target.h

.github/workflows/test-renode-sha384.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,25 @@ on:
66
pull_request:
77
branches: [ '*' ]
88

9+
permissions:
10+
contents: read
11+
packages: read
12+
913
jobs:
1014
renode_automated_multi_sha:
1115
runs-on: ubuntu-22.04
16+
container:
17+
image: ghcr.io/wolfssl/wolfboot-ci-renode:latest
1218
timeout-minutes: 15
1319

1420
steps:
1521
- uses: actions/checkout@v4
1622
with:
1723
submodules: true
1824

25+
- name: Trust workspace
26+
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
27+
1928
- name: Select config
2029
run: |
2130
cp config/examples/nrf52840.config .config && make include/target.h
@@ -68,4 +77,3 @@ jobs:
6877
with:
6978
name: Renode Test Results
7079
path: test_results/
71-

.github/workflows/test-renode-smallstack.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,25 @@ on:
66
pull_request:
77
branches: [ '*' ]
88

9+
permissions:
10+
contents: read
11+
packages: read
12+
913
jobs:
1014
renode_automated_smallstack:
1115
runs-on: ubuntu-22.04
16+
container:
17+
image: ghcr.io/wolfssl/wolfboot-ci-renode:latest
1218
timeout-minutes: 15
1319

1420
steps:
1521
- uses: actions/checkout@v4
1622
with:
1723
submodules: true
1824

25+
- name: Trust workspace
26+
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
27+
1928
- name: Select config
2029
run: |
2130
cp config/examples/nrf52840.config .config && make include/target.h
@@ -71,4 +80,3 @@ jobs:
7180
with:
7281
name: Renode Test Results
7382
path: test_results/
74-

tools/renode/docker-test.sh

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,22 @@
11
#!/bin/bash
2-
declare -r HOST_ROOT_DIR=`pwd`
3-
declare -r HOST_TEST_RESULTS_PATH=${HOST_ROOT_DIR}/test_results
4-
declare -r HOST_LOG_PATH=${HOST_TEST_RESULTS_PATH}
5-
declare -r HOST_LOG_FILENAME=${HOST_LOG_PATH}/logs.txt
2+
set -euo pipefail
63

7-
declare -r DOCKER_IMAGE="${DOCKER_IMAGE:-ghcr.io/wolfssl/wolfboot-ci-renode:latest}"
8-
declare -r DOCKER_WORKSPACE=/workspace
9-
declare -r DOCKER_TEST_RESULTS_PATH=/tmp/test_results
4+
declare -r HOST_ROOT_DIR="$(pwd)"
5+
declare -r HOST_TEST_RESULTS_PATH="${HOST_ROOT_DIR}/test_results"
6+
declare -r HOST_LOG_PATH="${HOST_TEST_RESULTS_PATH}"
7+
declare -r HOST_LOG_FILENAME="${HOST_LOG_PATH}/logs.txt"
108

11-
mkdir -p ${HOST_LOG_PATH}
12-
13-
docker pull ${DOCKER_IMAGE} >/dev/null 2>&1 || true
14-
15-
# running in `if` to avoid setting +e
9+
mkdir -p "${HOST_LOG_PATH}"
1610

1711
exit_code=0
18-
if ! docker run \
19-
--log-driver=none -a stdout -a stderr \
20-
--volume ${HOST_ROOT_DIR}:${DOCKER_WORKSPACE} \
21-
--volume ${HOST_TEST_RESULTS_PATH}:${DOCKER_TEST_RESULTS_PATH} \
22-
--env SCRIPT=${DOCKER_WORKSPACE}/renode-config.resc \
23-
--env RENODE_CHECKOUT=/home/developer/renode \
24-
--workdir ${DOCKER_WORKSPACE} \
25-
${DOCKER_IMAGE} \
26-
/bin/bash -c "tools/scripts/renode-test-update.sh $@ 2>&1 > ${DOCKER_TEST_RESULTS_PATH}/logs.txt"
12+
if ! tools/scripts/renode-test-update.sh "$@" > "${HOST_LOG_FILENAME}" 2>&1
2713
then
2814
echo "FAILED"
2915
exit_code=1
3016
fi
3117

3218
echo -e "\n----- LOGS -----\n"
33-
cat ${HOST_LOG_FILENAME}
19+
cat "${HOST_LOG_FILENAME}"
3420

3521
if [ $exit_code -eq 0 ]
3622
then

0 commit comments

Comments
 (0)