Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
arduino-cli
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Operations
Operations
Metrics
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
arduino-cli
Commits
95cfd654
Unverified
Commit
95cfd654
authored
Feb 19, 2024
by
Cristian Maglie
Committed by
GitHub
Feb 19, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow optional programmer in debug (#2540)
parent
01de174c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
18 deletions
+8
-18
commands/debug/debug_info.go
commands/debug/debug_info.go
+8
-9
commands/debug/debug_test.go
commands/debug/debug_test.go
+0
-6
internal/integrationtest/debug/debug_test.go
internal/integrationtest/debug/debug_test.go
+0
-3
No files found.
commands/debug/debug_info.go
View file @
95cfd654
...
...
@@ -169,9 +169,7 @@ func getDebugProperties(req *rpc.GetDebugConfigRequest, pme *packagemanager.Expl
}
}
if
req
.
GetProgrammer
()
==
""
{
return
nil
,
&
arduino
.
MissingProgrammerError
{}
}
if
req
.
GetProgrammer
()
!=
""
{
if
p
,
ok
:=
platformRelease
.
Programmers
[
req
.
GetProgrammer
()];
ok
{
toolProperties
.
Merge
(
p
.
Properties
)
}
else
if
refP
,
ok
:=
referencedPlatformRelease
.
Programmers
[
req
.
GetProgrammer
()];
ok
{
...
...
@@ -179,6 +177,7 @@ func getDebugProperties(req *rpc.GetDebugConfigRequest, pme *packagemanager.Expl
}
else
{
return
nil
,
&
arduino
.
ProgrammerNotFoundError
{
Programmer
:
req
.
GetProgrammer
()}
}
}
var
importPath
*
paths
.
Path
if
importDir
:=
req
.
GetImportDir
();
importDir
!=
""
{
...
...
commands/debug/debug_test.go
View file @
95cfd654
...
...
@@ -65,12 +65,6 @@ func TestGetCommandLine(t *testing.T) {
pme
,
release
:=
pm
.
NewExplorer
()
defer
release
()
{
// Check programmer required
_
,
err
:=
getCommandLine
(
req
,
pme
)
require
.
Error
(
t
,
err
)
}
{
// Check programmer not found
req
.
Programmer
=
"not-existent"
...
...
internal/integrationtest/debug/debug_test.go
View file @
95cfd654
...
...
@@ -336,9 +336,6 @@ func testAllDebugInformation(t *testing.T, env *integrationtest.Environment, cli
}
func
testDebugCheck
(
t
*
testing
.
T
,
env
*
integrationtest
.
Environment
,
cli
*
integrationtest
.
ArduinoCLI
)
{
_
,
_
,
err
:=
cli
.
Run
(
"debug"
,
"check"
,
"-b"
,
"arduino:samd:mkr1000"
)
require
.
Error
(
t
,
err
)
out
,
_
,
err
:=
cli
.
Run
(
"debug"
,
"check"
,
"-b"
,
"arduino:samd:mkr1000"
,
"-P"
,
"atmel_ice"
)
require
.
NoError
(
t
,
err
)
require
.
Contains
(
t
,
string
(
out
),
"The given board/programmer configuration supports debugging."
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment