@@ -38,6 +38,12 @@ func TestDebug(t *testing.T) {
38
38
_ , _ , err = cli .Run ("core" , "install" , "arduino:samd" )
39
39
require .NoError (t , err )
40
40
41
+ // Install custom core
42
+ customHw , err := paths .New ("testdata" , "hardware" ).Abs ()
43
+ require .NoError (t , err )
44
+ err = customHw .CopyDirTo (cli .SketchbookDir ().Join ("hardware" ))
45
+ require .NoError (t , err )
46
+
41
47
integrationtest.CLISubtests {
42
48
{"Start" , testDebuggerStarts },
43
49
{"WithPdeSketchStarts" , testDebuggerWithPdeSketchStarts },
@@ -102,12 +108,6 @@ func testAllDebugInformation(t *testing.T, env *integrationtest.Environment, cli
102
108
_ , _ , err := cli .Run ("sketch" , "new" , sketchPath .String ())
103
109
require .NoError (t , err )
104
110
105
- // Install custom core
106
- customHw , err := paths .New ("testdata" , "hardware" ).Abs ()
107
- require .NoError (t , err )
108
- err = customHw .CopyDirTo (cli .SketchbookDir ().Join ("hardware" ))
109
- require .NoError (t , err )
110
-
111
111
// Build sketch
112
112
_ , _ , err = cli .Run ("compile" , "-b" , "my:samd:my" , sketchPath .String (), "--format" , "json" )
113
113
require .NoError (t , err )
@@ -354,4 +354,25 @@ func testDebugCheck(t *testing.T, env *integrationtest.Environment, cli *integra
354
354
out , _ , err = cli .Run ("debug" , "check" , "-b" , "arduino:avr:uno" , "-P" , "atmel_ice" , "--format" , "json" )
355
355
require .NoError (t , err )
356
356
requirejson .Query (t , out , `.debugging_supported` , `false` )
357
+
358
+ // Test minimum FQBN compute
359
+ out , _ , err = cli .Run ("debug" , "check" , "-b" , "my:samd:my5" , "-P" , "atmel_ice" , "--format" , "json" )
360
+ require .NoError (t , err )
361
+ requirejson .Contains (t , out , `{ "debugging_supported" : false }` )
362
+
363
+ out , _ , err = cli .Run ("debug" , "check" , "-b" , "my:samd:my5:dbg=on" , "-P" , "atmel_ice" , "--format" , "json" )
364
+ require .NoError (t , err )
365
+ requirejson .Contains (t , out , `{ "debugging_supported" : true, "debug_fqbn" : "my:samd:my5:dbg=on" }` )
366
+
367
+ out , _ , err = cli .Run ("debug" , "check" , "-b" , "my:samd:my5:dbg=on,cpu=150m" , "-P" , "atmel_ice" , "--format" , "json" )
368
+ require .NoError (t , err )
369
+ requirejson .Contains (t , out , `{ "debugging_supported" : true, "debug_fqbn" : "my:samd:my5:dbg=on" }` )
370
+
371
+ out , _ , err = cli .Run ("debug" , "check" , "-b" , "my:samd:my6" , "-P" , "atmel_ice" , "--format" , "json" )
372
+ require .NoError (t , err )
373
+ requirejson .Contains (t , out , `{ "debugging_supported" : true, "debug_fqbn" : "my:samd:my6" }` )
374
+
375
+ out , _ , err = cli .Run ("debug" , "check" , "-b" , "my:samd:my6:dbg=on" , "-P" , "atmel_ice" , "--format" , "json" )
376
+ require .NoError (t , err )
377
+ requirejson .Contains (t , out , `{ "debugging_supported" : true, "debug_fqbn" : "my:samd:my6" }` )
357
378
}
0 commit comments