Skip to content

Commit 242d437

Browse files
committed
test 7, change to device order
1 parent eb6773d commit 242d437

File tree

2 files changed

+87
-85
lines changed

2 files changed

+87
-85
lines changed

.github/workflows/hil-unity-checks.yml

+74-74
Original file line numberDiff line numberDiff line change
@@ -57,107 +57,106 @@ jobs:
5757
5858
# fetch unity libraries
5959
readarray -t data < <(echo $hil | jq -r '.|keys[]')
60-
export lib=$(jq --compact-output --null-input '$ARGS.positional' --args -- "${data[@]}")
61-
echo libraries="$lib" >> $GITHUB_OUTPUT
60+
export dev=$(jq --compact-output --null-input '$ARGS.positional' --args -- "${data[@]}")
61+
echo devices="$dev" >> $GITHUB_OUTPUT
62+
63+
echo "hil=${hil}"
64+
echo "devices=${dev}"
6265
6366
6467
# Connect the GITHUB_OUTPUT to the variables and the workflow output mechanism
6568
outputs:
66-
libraries: ${{ steps.startup.outputs.libraries }}
6769
hil: ${{ steps.startup.outputs.hil }}
70+
device: ${{ steps.startup.outputs.devices }}
6871

6972

70-
#############################################################################
71-
# This step allows HIL (Hardware in the loop), therefore
72-
# is searches for the given board/sensor combination and tries to find the actual port
73-
# on the self hosted runner. (see documentation for the board2port finder)
74-
flash:
73+
# #############################################################################
74+
# # This step allows HIL (Hardware in the loop), therefore
75+
# # is searches for the given board/sensor combination and tries to find the actual port
76+
# # on the self hosted runner. (see documentation for the board2port finder)
77+
# flash:
7578

76-
# We need a successful build before we can run the deploy
77-
needs: [setup]
79+
# # We need a successful build before we can run the deploy
80+
# needs: [setup]
7881

79-
# we run this on self hosted runner, use labels to be more specific
80-
# add specific names if there are some, otherwise self-hosted, X64, Linux are the default ones
81-
runs-on:
82-
- self-hosted
83-
- X64
84-
- Linux
82+
# # we run this on self hosted runner, use labels to be more specific
83+
# # add specific names if there are some, otherwise self-hosted, X64, Linux are the default ones
84+
# runs-on:
85+
# - self-hosted
86+
# - X64
87+
# - Linux
8588

86-
# do not stop if a single job fails
87-
continue-on-error: true
89+
# # do not stop if a single job fails
90+
# continue-on-error: true
8891

89-
strategy:
92+
# strategy:
9093

91-
# the code to flash
92-
matrix:
93-
# the serials of the hardware boards
94-
libraries: ${{ fromJson(needs.setup.outputs.libraries) }}
94+
# # the code to flash
95+
# matrix:
96+
# # the serials of the hardware boards
97+
# libraries: ${{ fromJson(needs.setup.outputs.libraries) }}
9598

96-
# These are the steps which should run for each combination of fqbn and example code
97-
steps:
98-
- name: Environment
99-
run: |
100-
cd $HOME
101-
rm -rf ~/.arduino15/packages/Infineon/hardware/xmc/*
102-
ln -s $GITHUB_WORKSPACE ~/.arduino15/packages/Infineon/hardware/xmc/$TEST_VERSION
99+
# # These are the steps which should run for each combination of fqbn and example code
100+
# steps:
101+
# - name: Environment
102+
# run: |
103+
# cd $HOME
104+
# rm -rf ~/.arduino15/packages/Infineon/hardware/xmc/*
105+
# ln -s $GITHUB_WORKSPACE ~/.arduino15/packages/Infineon/hardware/xmc/$TEST_VERSION
103106

104-
REPO="$(basename "$GITHUB_REPOSITORY")"
105-
LIBRARY="$(basename ${{ matrix.libraries }} )"
107+
# REPO="$(basename "$GITHUB_REPOSITORY")"
108+
# LIBRARY="$(basename ${{ matrix.libraries }} )"
106109

107-
echo "repo=$REPO" >> $GITHUB_ENV
108-
echo "library=$LIBRARY" >> $GITHUB_ENV
109-
echo "version=$TEST_VERSION" >> $GITHUB_ENV
110+
# echo "repo=$REPO" >> $GITHUB_ENV
111+
# echo "library=$LIBRARY" >> $GITHUB_ENV
112+
# echo "version=$TEST_VERSION" >> $GITHUB_ENV
110113

111-
echo "Repo " $REPO
112-
echo "Libraries " $LIBRARY
113-
echo "Version " ${TEST_VERSION}
114+
# echo "Repo " $REPO
115+
# echo "Libraries " $LIBRARY
116+
# echo "Version " ${TEST_VERSION}
114117

115118

116-
# Build the test code with make and flash it to the board
117-
- name: Build
118-
run: |
119-
cd /opt/runner_support/
119+
# # Build the test code with make and flash it to the board
120+
# - name: Build
121+
# run: |
122+
# cd /opt/runner_support/
120123

121-
hil=${{ toJson(needs.setup.outputs.hil) }}
122-
lib=$(./py_checkusb.py --type ${{ env.library }} --json)
123-
if [[ -z $lib || $lib == "{}" ]]; then
124-
echo "No library information found"
125-
exit 0
126-
fi
127-
readarray -t DEVICES < <(echo $lib | jq ".\"${{ env.library }}\" | keys[]" -r --compact-output)
124+
# hil=${{ toJson(needs.setup.outputs.hil) }}
125+
# lib=$(./py_checkusb.py --type ${{ env.library }} --json)
126+
# if [[ -z $lib || $lib == "{}" ]]; then
127+
# echo "No library information found"
128+
# exit 0
129+
# fi
130+
# readarray -t DEVICES < <(echo $lib | jq ".\"${{ env.library }}\" | keys[]" -r --compact-output)
128131

129-
# loop over all fqbn in the library
130-
cd $GITHUB_WORKSPACE/tests/Unity/
131-
for DEVICE in "${DEVICES[@]}"; do
132-
FQBN=`tr '.' ':' <<<"${DEVICE}"`
132+
# # loop over all fqbn in the library
133+
# cd $GITHUB_WORKSPACE/tests/Unity/
134+
# for DEVICE in "${DEVICES[@]}"; do
135+
# FQBN=`tr '.' ':' <<<"${DEVICE}"`
133136

134-
# loop over all serials and fetch the ports
135-
readarray -t SERIALS < <(echo $lib | jq ".\"${{ env.library }}\".\"${DEVICE}\" | keys[]" -r --compact-output)
136-
PORTS=()
137-
for SERIAL in "${SERIALS[@]}"; do
138-
PORTS+=$(/opt/runner_support/find_usb.sh $SERIAL)
139-
done
137+
# # loop over all serials and fetch the ports
138+
# readarray -t SERIALS < <(echo $lib | jq ".\"${{ env.library }}\".\"${DEVICE}\" | keys[]" -r --compact-output)
139+
# PORTS=()
140+
# for SERIAL in "${SERIALS[@]}"; do
141+
# PORTS+=$(/opt/runner_support/find_usb.sh $SERIAL)
142+
# done
140143

141-
# loop over all tests
142-
readarray -t TESTS < <(echo $hil | jq ".\"${{ env.library }}\".\"${DEVICE}\" | keys[]" -r --compact-output)
143-
for ((tidx=0; tidx<${#TESTS[@]}; tidx++)); do
144-
readarray -t MAKES < <(echo $hil | jq ".\"${{ env.library }}\".\"${DEVICE}\".\"${TESTS[$tidx]}\"[]" -r --compact-output)
144+
# # loop over all tests
145+
# readarray -t TESTS < <(echo $hil | jq ".\"${{ env.library }}\".\"${DEVICE}\" | keys[]" -r --compact-output)
146+
# for ((tidx=0; tidx<${#TESTS[@]}; tidx++)); do
147+
# readarray -t MAKES < <(echo $hil | jq ".\"${{ env.library }}\".\"${DEVICE}\".\"${TESTS[$tidx]}\"[]" -r --compact-output)
145148

146-
# loop over all makes in the test for sender receiver tests
147-
for ((midx=0; midx<${#MAKES[@]}; midx++)); do
148-
echo "FQBN: ${FQBN}"
149-
echo "PORT: ${PORTS[$tidx]}"
150-
echo "MAKE: ${MAKES[$midx]}"
151-
make FQBN=${FQBN} PORT=${PORTS[$tidx]} UNITY_PATH=/opt/runner_support/Unity ${MAKES[$midx]}
152-
echo "MAKE: ${MAKES[$midx]}"
153-
done
149+
# # loop over all makes in the test for sender receiver tests
150+
# for ((midx=0; midx<${#MAKES[@]}; midx++)); do
151+
# make FQBN=${FQBN} PORT=${PORTS[$tidx]} UNITY_PATH=/opt/runner_support/Unity ${MAKES[$midx]}
152+
# done
154153

155154

156155

157156

158157

159-
done
160-
done
158+
# done
159+
# done
161160

162161

163162

@@ -168,7 +167,8 @@ jobs:
168167
# we run this no matter if before fails
169168
if: always()
170169
# wait on first setup run before starting main function
171-
needs: [setup, flash]
170+
# needs: [setup, flash]
171+
needs: [setup]
172172

173173
# we run this on self hosted runner, use labels to be more specific
174174
# add specific names if there are some, otherwise self-hosted, X64, Linux are the default ones

tests/Unity/hil-unity-checklist.yaml

+13-11
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,29 @@
1-
CAN:
2-
Infineon.xmc.XMC1400_XMC2GO:
1+
Infineon.xmc.XMC4700_Relax_Kit:
2+
CAN:
33
1:
44
- "CAN_connected_node1"
55
- "CAN_connected_node2"
66
2:
77
- CAN
88

9-
Infineon.xmc.XMC4700_Relax_Kit:
9+
Wire:
10+
1:
11+
- "I2C"
12+
2:
13+
- "I2C"
14+
15+
16+
Infineon.xmc.XMC1400_XMC2GO:
17+
CAN:
1018
1:
1119
- "CAN_connected_node1"
1220
- "CAN_connected_node2"
1321
2:
1422
- CAN
1523

16-
Wire:
17-
Infineon.xmc.XMC1100_XMC2GO:
24+
Infineon.xmc.XMC1100_XMC2GO:
25+
Wire:
1826
1:
1927
- "I2C"
2028
2:
2129
- "I2C"
22-
23-
Infineon.xmc.XMC4700_Relax_Kit:
24-
1:
25-
- "I2C"
26-
2:
27-
- "I2C"

0 commit comments

Comments
 (0)