@@ -34,7 +34,7 @@ describe('PyocdConfigurationProvider', () => {
3434 expect ( gdbtargetConfig ?. target ?. serverParameters ) . not . toContain ( '--port' ) ;
3535 } ) ;
3636
37- it ( 'adds port to server parameters, gdbserver always gets added ' , async ( ) => {
37+ it ( 'always adds gdbserver, does not add port to server parameters ' , async ( ) => {
3838 const configProvider = new PyocdConfigurationProvider ( ) ;
3939 const config = gdbTargetConfiguration ( {
4040 target : targetConfigurationFactory ( { port : '4711' } ) ,
@@ -43,16 +43,16 @@ describe('PyocdConfigurationProvider', () => {
4343 expect ( debugConfig ) . toBeDefined ( ) ;
4444 const gdbtargetConfig = debugConfig as GDBTargetConfiguration ;
4545 expect ( gdbtargetConfig ?. target ?. serverParameters ) . toContain ( 'gdbserver' ) ;
46- expect ( gdbtargetConfig ?. target ?. serverParameters ) . toContain ( '--port' ) ;
47- expect ( gdbtargetConfig ?. target ?. serverParameters ) . toContain ( '4711 ' ) ;
46+ // GDB port expected to come through *.cbuild-run.yml file.
47+ expect ( gdbtargetConfig ?. target ?. serverParameters ) . not . toContain ( '--port ' ) ;
4848 } ) ;
4949
50- it ( 'does not overwrite port in server parameters' , async ( ) => {
50+ it ( 'keeps port from config in server parameters' , async ( ) => {
5151 const configProvider = new PyocdConfigurationProvider ( ) ;
5252 const config = gdbTargetConfiguration ( {
5353 target : targetConfigurationFactory ( {
5454 port : '4711' ,
55- serverParameters : [ '-port' , '10815' ] ,
55+ serverParameters : [ '-- port' , '10815' ] ,
5656 } ) ,
5757 } ) ;
5858 const debugConfig = await configProvider . resolveDebugConfigurationWithSubstitutedVariables ( undefined , config , undefined ) ;
0 commit comments