@@ -106,13 +106,12 @@ func testAllDebugInformation(t *testing.T, env *integrationtest.Environment, cli
106106 require .NoError (t , err )
107107
108108 // Build sketch
109- fqbn := "my:samd:my"
110- _ , _ , err = cli .Run ("compile" , "-b" , fqbn , sketchPath .String (), "--format" , "json" )
109+ _ , _ , err = cli .Run ("compile" , "-b" , "my:samd:my" , sketchPath .String (), "--format" , "json" )
111110 require .NoError (t , err )
112111
113112 {
114113 // Starts debugger
115- jsonDebugOut , _ , err := cli .Run ("debug" , "-b" , fqbn , "-P" , "atmel_ice" , sketchPath .String (), "--info" , "--format" , "json" )
114+ jsonDebugOut , _ , err := cli .Run ("debug" , "-b" , "my:samd:my" , "-P" , "atmel_ice" , sketchPath .String (), "--info" , "--format" , "json" )
116115 require .NoError (t , err )
117116 debugOut := requirejson .Parse (t , jsonDebugOut )
118117 debugOut .MustContain (`
@@ -154,7 +153,7 @@ func testAllDebugInformation(t *testing.T, env *integrationtest.Environment, cli
154153
155154 // Starts debugger with another programmer
156155 {
157- jsonDebugOut , _ , err := cli .Run ("debug" , "-b" , fqbn , "-P" , "my_cold_ice" , sketchPath .String (), "--info" , "--format" , "json" )
156+ jsonDebugOut , _ , err := cli .Run ("debug" , "-b" , "my:samd:my" , "-P" , "my_cold_ice" , sketchPath .String (), "--info" , "--format" , "json" )
158157 require .NoError (t , err )
159158 debugOut := requirejson .Parse (t , jsonDebugOut )
160159 debugOut .MustContain (`
@@ -192,5 +191,29 @@ func testAllDebugInformation(t *testing.T, env *integrationtest.Environment, cli
192191 ]
193192 }
194193 }` )
194+
195+ {
196+ // Starts debugger with an old-style openocd script definition
197+ jsonDebugOut , _ , err := cli .Run ("debug" , "-b" , "my:samd:my2" , "-P" , "atmel_ice" , sketchPath .String (), "--info" , "--format" , "json" )
198+ require .NoError (t , err )
199+ debugOut := requirejson .Parse (t , jsonDebugOut )
200+ debugOut .MustContain (`
201+ {
202+ "toolchain": "gcc",
203+ "toolchain_path": "gcc-path",
204+ "toolchain_prefix": "gcc-prefix",
205+ "server": "openocd",
206+ "server_path": "openocd-path",
207+ "server_configuration": {
208+ "path": "openocd-path",
209+ "scripts_dir": "openocd-scripts-dir",
210+ "scripts": [
211+ "single-script"
212+ ]
213+ },
214+ "svd_file": "svd-file"
215+ }` )
216+ }
217+
195218 }
196219}
0 commit comments