@@ -287,30 +287,25 @@ yun.serial.disableDTR=true
287
287
stdout , _ , err := cli .RunWithCustomInput (quitMonitor (), "monitor" , "-b" , "arduino:avr:uno" , "--raw" , "--profile" , "profile1" , sketchWithPortAndFQBN )
288
288
require .NoError (t , err )
289
289
require .Contains (t , string (stdout ), "Opened port: /dev/ttyDEF" )
290
- require .Contains (t , string (stdout ), "Configuration rts = off" )
290
+ require .Contains (t , string (stdout ), "Configuration rts = on" ) // This is taken from profile-downloaded platform that is not patched for test
291
291
require .Contains (t , string (stdout ), "Configuration dtr = on" )
292
292
})
293
293
294
294
t .Run ("WithDefaultPortAndConfig" , func (t * testing.T ) {
295
- stdout , _ , err := cli .RunWithCustomInput (quitMonitor (), "monitor" , "-b" , "arduino:avr:uno" , "--raw" , "--profile" , "profile1" , sketchWithPortAndConfig )
296
- require .NoError (t , err )
297
- require .Contains (t , string (stdout ), "Opened port: /dev/ttyDEF" )
298
- require .Contains (t , string (stdout ), "Configuration rts = off" )
299
- require .Contains (t , string (stdout ), "Configuration dtr = on" )
300
- require .Contains (t , string (stdout ), "Configuration baudrate = 57600" )
301
- require .Contains (t , string (stdout ), "Configuration bits = 9" )
302
- require .Contains (t , string (stdout ), "Configuration parity = none" )
303
- require .Contains (t , string (stdout ), "Configuration stop_bits = 1" )
295
+ _ , stderr , err := cli .RunWithCustomInput (quitMonitor (), "monitor" , "-b" , "arduino:avr:uno" , "--raw" , "--profile" , "profile1" , sketchWithPortAndConfig )
296
+ require .Error (t , err )
297
+ require .Contains (t , string (stderr ), "Profile 'profile1' not found" )
298
+ require .Contains (t , string (stderr ), "Unknown FQBN: unknown package arduino" )
304
299
})
305
300
306
301
t .Run ("WithDefaultPortAndConfigAndProfile" , func (t * testing.T ) {
307
- stdout , _ , err := cli .RunWithCustomInput (quitMonitor (), "monitor" , "-b" , "arduino:avr:uno" , "--raw" , "--profile" , "profile1 " , sketchWithPortAndConfigAndProfile )
302
+ stdout , _ , err := cli .RunWithCustomInput (quitMonitor (), "monitor" , "-b" , "arduino:avr:uno" , "--raw" , "--profile" , "uno " , sketchWithPortAndConfigAndProfile )
308
303
require .NoError (t , err )
309
- require .Contains (t , string (stdout ), "Opened port: /dev/ttyDEF " )
310
- require .Contains (t , string (stdout ), "Configuration rts = off" )
304
+ require .Contains (t , string (stdout ), "Opened port: /dev/ttyPROF " )
305
+ require .Contains (t , string (stdout ), "Configuration rts = on" ) // This is taken from profile-downloaded platform that is not patched for test
311
306
require .Contains (t , string (stdout ), "Configuration dtr = on" )
312
- require .Contains (t , string (stdout ), "Configuration baudrate = 57600 " )
313
- require .Contains (t , string (stdout ), "Configuration bits = 9 " )
307
+ require .Contains (t , string (stdout ), "Configuration baudrate = 19200 " )
308
+ require .Contains (t , string (stdout ), "Configuration bits = 8 " )
314
309
require .Contains (t , string (stdout ), "Configuration parity = none" )
315
310
require .Contains (t , string (stdout ), "Configuration stop_bits = 1" )
316
311
})
@@ -377,7 +372,7 @@ yun.serial.disableDTR=true
377
372
stdout , _ , err := cli .RunWithCustomInput (quitMonitor (), "monitor" , "-p" , "/dev/ttyARGS" , "-b" , "arduino:avr:uno" , "--raw" , "--profile" , "profile1" , sketchWithPortAndFQBN )
378
373
require .NoError (t , err )
379
374
require .Contains (t , string (stdout ), "Opened port: /dev/ttyARGS" )
380
- require .Contains (t , string (stdout ), "Configuration rts = off" )
375
+ require .Contains (t , string (stdout ), "Configuration rts = on" ) // This is taken from profile-downloaded platform that is not patched for test
381
376
require .Contains (t , string (stdout ), "Configuration dtr = on" )
382
377
})
383
378
})
0 commit comments