@@ -10,6 +10,15 @@ function run_test() {
10
10
local result=0
11
11
local error=0
12
12
13
+ if [ $options -eq 0 ] && [ -f $sketchdir /ci.json ]; then
14
+ len=` jq -r --arg target $target ' .fqbn[$target] | length' $sketchdir /ci.json`
15
+ if [ $len -eq 0 ]; then
16
+ len=1
17
+ fi
18
+ else
19
+ len=1
20
+ fi
21
+
13
22
if [ -f $sketchdir /ci.json ]; then
14
23
# If the target or platform is listed as false, skip the sketch. Otherwise, include it.
15
24
is_target=$( jq -r --arg target $target ' .targets[$target]' $sketchdir /ci.json)
@@ -21,11 +30,21 @@ function run_test() {
21
30
return 0
22
31
fi
23
32
33
+ if [ -d $ARDUINO_ESP32_PATH /tools/esp32-arduino-libs ]; then
34
+ SDKCONFIG_PATH=" $ARDUINO_ESP32_PATH /tools/esp32-arduino-libs/$target /sdkconfig"
35
+ else
36
+ if [ $len -eq 1 ]; then
37
+ SDKCONFIG_PATH=" $HOME /.arduino/tests/$sketchname /build.tmp/sdkconfig"
38
+ else
39
+ SDKCONFIG_PATH=" $HOME /.arduino/tests/$sketchname /build0.tmp/sdkconfig"
40
+ fi
41
+ fi
42
+
24
43
# Check if the sketch requires any configuration options
25
44
requirements=$( jq -r ' .requires[]? // empty' $sketchdir /ci.json)
26
45
if [[ " $requirements " != " null" ]] || [[ " $requirements " != " " ]]; then
27
46
for requirement in $requirements ; do
28
- found_line=$( grep -E " ^$requirement " " $LIBS_DIR / $target /sdkconfig " )
47
+ found_line=$( grep -E " ^$requirement " " $SDKCONFIG_PATH " )
29
48
if [[ " $found_line " == " " ]]; then
30
49
printf " \033[93mTarget $target does not meet the requirement $requirement for $sketchname . Skipping.\033[0m\n"
31
50
printf " \n\n\n"
@@ -35,15 +54,6 @@ function run_test() {
35
54
fi
36
55
fi
37
56
38
- if [ $options -eq 0 ] && [ -f $sketchdir /ci.json ]; then
39
- len=` jq -r --arg target $target ' .fqbn[$target] | length' $sketchdir /ci.json`
40
- if [ $len -eq 0 ]; then
41
- len=1
42
- fi
43
- else
44
- len=1
45
- fi
46
-
47
57
if [ $len -eq 1 ]; then
48
58
# build_dir="$sketchdir/build"
49
59
build_dir=" $HOME /.arduino/tests/$sketchname /build.tmp"
@@ -120,7 +130,10 @@ function run_test() {
120
130
121
131
SCRIPTS_DIR=" ./.github/scripts"
122
132
COUNT_SKETCHES=" ${SCRIPTS_DIR} /sketch_utils.sh count"
123
- LIBS_DIR=" $ARDUINO_ESP32_PATH /tools/esp32-arduino-libs"
133
+
134
+ if [ -d $ARDUINO_ESP32_PATH /tools/esp32-arduino-libs ]; then
135
+ SDKCONFIG_DIR=" $ARDUINO_ESP32_PATH /tools/esp32-arduino-libs"
136
+ fi
124
137
125
138
platform=" hardware"
126
139
wokwi_timeout=60000
0 commit comments