@@ -185,7 +185,6 @@ def test_compile_and_upload_combo(run_command, data_dir, detected_boards):
185
185
# Create a test sketch
186
186
sketch_name = "CompileAndUploadIntegrationTest"
187
187
sketch_path = os .path .join (data_dir , sketch_name )
188
- sketch_main_file = os .path .join (sketch_path , sketch_name + ".ino" )
189
188
result = run_command ("sketch new {}" .format (sketch_path ))
190
189
assert result .ok
191
190
assert "Sketch created in: {}" .format (sketch_path ) in result .stdout
@@ -212,6 +211,7 @@ def run_test(s):
212
211
# check from the logs if the bin file were uploaded on the current board
213
212
log_json = open (log_file_path , "r" )
214
213
json_log_lines = log_json .readlines ()
214
+ print (log_file_path )
215
215
expected_trace_sequence = [
216
216
"Compile {sketch} for {fqbn} started" .format (
217
217
sketch = sketch_path , fqbn = board .fqbn
@@ -222,16 +222,14 @@ def run_test(s):
222
222
"Upload {sketch} on {fqbn} started" .format (
223
223
sketch = sketch_path , fqbn = board .fqbn
224
224
),
225
- "Upload {sketch} on {fqbn} successful" .format (
226
- sketch = sketch_name , fqbn = board .fqbn
227
- ),
225
+ "Upload successful" ,
228
226
]
227
+ print (expected_trace_sequence )
229
228
assert is_message_sequence_in_json_log_traces (
230
229
expected_trace_sequence , json_log_lines
231
230
)
232
231
233
232
run_test (sketch_path )
234
- run_test (sketch_main_file )
235
233
236
234
237
235
def is_message_sequence_in_json_log_traces (message_sequence , log_json_lines ):
@@ -294,23 +292,31 @@ def test_compile_without_precompiled_libraries(run_command, data_dir):
294
292
zip_ref .extractall ("{}/libraries/" .format (data_dir ))
295
293
result = run_command (
"lib install [email protected] " )
296
294
assert result .ok
297
- result = run_command ("compile -b arduino:mbed:nano33ble {}/libraries/Arduino_TensorFlowLite/examples/magic_wand/" .format (data_dir ))
295
+ result = run_command (
296
+ "compile -b arduino:mbed:nano33ble {}/libraries/Arduino_TensorFlowLite/examples/magic_wand/" .format (data_dir ))
298
297
assert result .ok
299
- result = run_command ("compile -b adafruit:samd:adafruit_feather_m4 {}/libraries/Arduino_TensorFlowLite/examples/magic_wand/" .format (data_dir ))
298
+ result = run_command (
299
+ "compile -b adafruit:samd:adafruit_feather_m4 {}/libraries/Arduino_TensorFlowLite/examples/magic_wand/" .format (
300
+ data_dir ))
300
301
assert result .ok
301
302
302
303
# Non-precompiled version of Arduino_TensorflowLite
303
304
result = run_command (
"lib install [email protected] " )
304
305
assert result .ok
305
- result = run_command ("compile -b arduino:mbed:nano33ble {}/libraries/Arduino_TensorFlowLite/examples/magic_wand/" .format (data_dir ))
306
+ result = run_command (
307
+ "compile -b arduino:mbed:nano33ble {}/libraries/Arduino_TensorFlowLite/examples/magic_wand/" .format (data_dir ))
306
308
assert result .ok
307
- result = run_command ("compile -b adafruit:samd:adafruit_feather_m4 {}/libraries/Arduino_TensorFlowLite/examples/magic_wand/" .format (data_dir ))
309
+ result = run_command (
310
+ "compile -b adafruit:samd:adafruit_feather_m4 {}/libraries/Arduino_TensorFlowLite/examples/magic_wand/" .format (
311
+ data_dir ))
308
312
assert result .ok
309
313
310
314
# Bosch sensor library
311
315
result = run_command (
"lib install \" BSEC Software [email protected] \" " )
312
316
assert result .ok
313
- result = run_command ("compile -b arduino:samd:mkr1000 {}/libraries/BSEC_Software_Library/examples/basic/" .format (data_dir ))
317
+ result = run_command (
318
+ "compile -b arduino:samd:mkr1000 {}/libraries/BSEC_Software_Library/examples/basic/" .format (data_dir ))
314
319
assert result .ok
315
- result = run_command ("compile -b arduino:mbed:nano33ble {}/libraries/BSEC_Software_Library/examples/basic/" .format (data_dir ))
320
+ result = run_command (
321
+ "compile -b arduino:mbed:nano33ble {}/libraries/BSEC_Software_Library/examples/basic/" .format (data_dir ))
316
322
assert result .ok
0 commit comments