Skip to content

Commit a835f96

Browse files
committed
Test 4, funnel array through env vars
1 parent 1e0ace5 commit a835f96

File tree

1 file changed

+19
-6
lines changed

1 file changed

+19
-6
lines changed

.github/workflows/hil-library-test.yml

+19-6
Original file line numberDiff line numberDiff line change
@@ -121,18 +121,29 @@ jobs:
121121
readarray -t serials < <(echo $(./py_checkusb.py --type ${{ env.library }} --list serial --json) | jq ".\"${{ env.library }}\"[]" -r --compact-output)
122122
123123
hil=$(./py_checkusb.py --type ${{ env.library }} --json)
124-
readarray -t fqbn < <(echo $hil | jq ".\"${{ env.library }}\" | keys[]" -r --compact-output)
124+
readarray -t fqbns < <(echo $hil | jq ".\"${{ env.library }}\" | keys[]" -r --compact-output)
125125
126126
echo "HIL: $hil"
127-
echo "FQBN: $fqbn"
128-
echo "Serials: $serials"
129-
127+
echo "FQBN: ${fqbns[@]}"
130128
131129
# loop over all serials
132-
for serial in "${serials[@]}"; do
133-
echo "Serial: $serial"
130+
cd ~/.arduino15/packages/Infineon/hardware/xmc/$TEST_VERSION/libraries/${{ env.library }} # change this
131+
132+
for fqbn in "${fqbns[@]}"; do
133+
echo "fqbn: $fqbn"
134+
echo "Serials: ${serials[@]}"
135+
# loop over all serials
136+
for serial in "${serials[@]}"; do
137+
echo "Serial: $serial"
138+
done
139+
140+
134141
135142
143+
#make UNITY_PATH=/opt/runner_support/Unity FQBN=${fqbn} PORT=${{ env.port }} ????
144+
#make FQBN=Infineon:xmc:XMC1400_XMC2GO PORT=COM42 UNITY_PATH=/home/zhanglinjing/repo/Unity CAN_connected_node2 monitor
145+
#make FQBN=Infineon:xmc:XMC1400_XMC2GO PORT=COM41 UNITY_PATH=/home/zhanglinjing/repo/Unity CAN_connected_node1 monitor
146+
136147
137148
done
138149
@@ -143,6 +154,8 @@ jobs:
143154
144155
145156
157+
158+
146159
#############################################################################
147160
# Switch off the HIL after all tests are done
148161
post:

0 commit comments

Comments
 (0)