Skip to content

Commit 2d6fad1

Browse files
committed
Merge branch 'main' into improvement/updating-disassemble-request-implementation
2 parents 83f2822 + 9272451 commit 2d6fad1

File tree

6 files changed

+35
-38
lines changed

6 files changed

+35
-38
lines changed

.github/workflows/build-pr.yml

+10-10
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ jobs:
88
name: Build & Test on Ubuntu
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v3
12-
- uses: actions/setup-node@v3
11+
- uses: actions/checkout@v4
12+
- uses: actions/setup-node@v4
1313
with:
14-
node-version: '14'
14+
node-version: '20'
1515
- name: Install GCC & GDB & other build essentials
1616
run: |
1717
sudo apt-get update
@@ -29,13 +29,13 @@ jobs:
2929
- name: Test
3030
run: yarn test-ci
3131
- name: Log file artifacts
32-
uses: actions/upload-artifact@v3
32+
uses: actions/upload-artifact@v4
3333
if: success() || failure()
3434
with:
3535
name: test-logs-ubuntu
3636
path: test-logs/
3737
- name: Upload Test Report
38-
uses: actions/upload-artifact@v3
38+
uses: actions/upload-artifact@v4
3939
if: success() || failure()
4040
with:
4141
name: test-results-ubuntu
@@ -49,10 +49,10 @@ jobs:
4949
name: Build & Test on Windows
5050
runs-on: windows-latest
5151
steps:
52-
- uses: actions/checkout@v3
53-
- uses: actions/setup-node@v3
52+
- uses: actions/checkout@v4
53+
- uses: actions/setup-node@v4
5454
with:
55-
node-version: '14'
55+
node-version: '20'
5656
- name: Install GCC & GDB & other build essentials
5757
run: |
5858
choco install mingw
@@ -70,13 +70,13 @@ jobs:
7070
- name: Test
7171
run: yarn test-ci
7272
- name: Log file artifacts
73-
uses: actions/upload-artifact@v3
73+
uses: actions/upload-artifact@v4
7474
if: success() || failure()
7575
with:
7676
name: test-logs-windows
7777
path: test-logs/
7878
- name: Upload Test Report
79-
uses: actions/upload-artifact@v3
79+
uses: actions/upload-artifact@v4
8080
if: success() || failure()
8181
with:
8282
name: test-results-windows

.github/workflows/build-push.yml

+10-11
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ jobs:
99
name: Build & Test on Ubuntu
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v3
13-
- uses: actions/setup-node@v3
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-node@v4
1414
with:
15-
node-version: '14'
15+
node-version: '20'
1616
- name: Install GCC & GDB & other build essentials
1717
run: |
1818
sudo apt-get update
@@ -30,13 +30,13 @@ jobs:
3030
- name: Test
3131
run: yarn test-ci
3232
- name: Log file artifacts
33-
uses: actions/upload-artifact@v3
33+
uses: actions/upload-artifact@v4
3434
if: success() || failure()
3535
with:
3636
name: test-logs-ubuntu
3737
path: test-logs/
3838
- name: Publish Test Report
39-
uses: mikepenz/action-junit-report@v3
39+
uses: mikepenz/action-junit-report@v5
4040
if: success() || failure()
4141
with:
4242
commit: ${{github.event.workflow_run.head_sha}}
@@ -50,10 +50,10 @@ jobs:
5050
name: Build & Test on Windows
5151
runs-on: windows-latest
5252
steps:
53-
- uses: actions/checkout@v3
54-
- uses: actions/setup-node@v3
53+
- uses: actions/checkout@v4
54+
- uses: actions/setup-node@v4
5555
with:
56-
node-version: '14'
56+
node-version: '20'
5757
- name: Install GCC & GDB & other build essentials
5858
run: |
5959
choco install mingw
@@ -71,14 +71,13 @@ jobs:
7171
- name: Test
7272
run: yarn test-ci
7373
- name: Log file artifacts
74-
uses: actions/upload-artifact@v3
74+
uses: actions/upload-artifact@v4
7575
if: success() || failure()
7676
with:
7777
name: test-logs-windows
7878
path: test-logs/
7979
- name: Publish Test Report
80-
uses: mikepenz/action-junit-report@v3
81-
if: success() || failure()
80+
uses: mikepenz/action-junit-report@v5
8281
with:
8382
commit: ${{github.event.workflow_run.head_sha}}
8483
report_paths: 'test-reports/*.xml'

.github/workflows/report.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,21 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Download Test Report
19-
uses: dawidd6/action-download-artifact@v2
19+
uses: dawidd6/action-download-artifact@v7
2020
with:
2121
name: test-results-ubuntu
2222
path: ubuntu
2323
workflow: ${{ github.event.workflow.id }}
2424
run_id: ${{ github.event.workflow_run.id }}
2525
- name: Download Test Report
26-
uses: dawidd6/action-download-artifact@v2
26+
uses: dawidd6/action-download-artifact@v7
2727
with:
2828
name: test-results-windows
2929
path: windows
3030
workflow: ${{ github.event.workflow.id }}
3131
run_id: ${{ github.event.workflow_run.id }}
3232
- name: Publish Test Report
33-
uses: mikepenz/action-junit-report@v3
33+
uses: mikepenz/action-junit-report@v5
3434
with:
3535
commit: ${{github.event.workflow_run.head_sha}}
3636
report_paths: '**/*.xml'

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cdt-gdb-adapter",
3-
"version": "1.0.2-next",
3+
"version": "1.0.3-next",
44
"description": "gdb adapter implementing the debug adapter protocol",
55
"main": "dist/index.js",
66
"browser": "dist/browser/web.js",

src/integration-tests/attachRemote.spec.ts

+10-11
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import { expect } from 'chai';
2626
describe('attach remote', function () {
2727
let dc: CdtDebugClient;
2828
let gdbserver: cp.ChildProcess;
29-
let port: number;
29+
let port: string;
3030
const emptyProgram = path.join(testProgramsDir, 'empty');
3131
const emptySrc = path.join(testProgramsDir, 'empty.c');
3232

@@ -39,19 +39,18 @@ describe('attach remote', function () {
3939
cwd: testProgramsDir,
4040
}
4141
);
42-
port = await new Promise<number>((resolve, reject) => {
42+
port = await new Promise<string>((resolve, reject) => {
43+
const regex = new RegExp(/Listening on port ([0-9]+)\r?\n/);
4344
let accumulatedStderr = '';
4445
if (gdbserver.stderr) {
4546
gdbserver.stderr.on('data', (data) => {
46-
const line = String(data);
47-
accumulatedStderr += line;
48-
const LISTENING_ON_PORT = 'Listening on port ';
49-
const index = accumulatedStderr.indexOf(LISTENING_ON_PORT);
50-
if (index >= 0) {
51-
const portStr = accumulatedStderr
52-
.substr(index + LISTENING_ON_PORT.length, 6)
53-
.trim();
54-
resolve(parseInt(portStr, 10));
47+
if (!port) {
48+
const line = String(data);
49+
accumulatedStderr += line;
50+
const m = regex.exec(accumulatedStderr);
51+
if (m !== null) {
52+
resolve(m[1]);
53+
}
5554
}
5655
});
5756
} else {

src/integration-tests/launchRemote.spec.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ describe('launch remote', function () {
140140
});
141141

142142
it('can show user error on debug console if UART fails to open - Socket', async function () {
143-
const output = await dc.getDebugConsoleOutput(
143+
await dc.getDebugConsoleOutput(
144144
fillDefaults(this.test, {
145145
program: emptyProgram,
146146
openGdbConsole: false,
@@ -155,6 +155,5 @@ describe('launch remote', function () {
155155
'error on socket connection',
156156
true
157157
);
158-
expect(output.body.output).contains('0');
159158
});
160159
});

0 commit comments

Comments
 (0)