mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-29 11:55:40 +02:00
DSF-GDB tests in GitHub Actions
- Fix the running so that the correct gdb is used. - Only run DSF tests if dsf directories have been modified - Default to using gdb,gdbserver on the PATH when running tests - Remove double reporting of test results
This commit is contained in:
parent
9a22ad7097
commit
56ee2c3bb1
6 changed files with 25 additions and 13 deletions
16
.github/workflows/build-test.yml
vendored
16
.github/workflows/build-test.yml
vendored
|
@ -15,12 +15,27 @@ jobs:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
- uses: dorny/paths-filter@v2
|
||||||
|
id: filter
|
||||||
|
with:
|
||||||
|
filters: |
|
||||||
|
dsf:
|
||||||
|
- 'dsf-gdb/**'
|
||||||
|
- 'dsf/**'
|
||||||
|
- 'debug/**'
|
||||||
|
- 'jtag/**'
|
||||||
- name: Set up JDK 17
|
- name: Set up JDK 17
|
||||||
uses: actions/setup-java@v3
|
uses: actions/setup-java@v3
|
||||||
with:
|
with:
|
||||||
java-version: '17'
|
java-version: '17'
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
cache: maven
|
cache: maven
|
||||||
|
- name: Install GCC & GDB & other build essentials
|
||||||
|
run: |
|
||||||
|
sudo apt-get -y install build-essential gcc g++ gdb gdbserver
|
||||||
|
gdb --version
|
||||||
|
gcc --version
|
||||||
|
gdbserver --version
|
||||||
- name: Build and Test
|
- name: Build and Test
|
||||||
run: |
|
run: |
|
||||||
export DISPLAY=:99
|
export DISPLAY=:99
|
||||||
|
@ -31,6 +46,7 @@ jobs:
|
||||||
-DexcludedGroups=flakyTest,slowTest \
|
-DexcludedGroups=flakyTest,slowTest \
|
||||||
-P baseline-compare-and-replace \
|
-P baseline-compare-and-replace \
|
||||||
-Ddsf.gdb.tests.timeout.multiplier=50 \
|
-Ddsf.gdb.tests.timeout.multiplier=50 \
|
||||||
|
-Ddsf-gdb.skip.tests=$(test ${{ steps.filter.outputs.dsf }} == 'false' && echo 'true' || echo 'false') \
|
||||||
-Dindexer.timeout=300
|
-Dindexer.timeout=300
|
||||||
- name: Upload Logs
|
- name: Upload Logs
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
|
|
8
.github/workflows/report.yml
vendored
8
.github/workflows/report.yml
vendored
|
@ -26,11 +26,3 @@ jobs:
|
||||||
with:
|
with:
|
||||||
commit: ${{ github.event.workflow_run.head_sha }}
|
commit: ${{ github.event.workflow_run.head_sha }}
|
||||||
junit_files: "test-results/**/*.xml"
|
junit_files: "test-results/**/*.xml"
|
||||||
- name: Publish Test Report in GitHub Actions UI
|
|
||||||
uses: mikepenz/action-junit-report@v3
|
|
||||||
with:
|
|
||||||
commit: ${{github.event.workflow_run.head_sha}}
|
|
||||||
report_paths: 'test-results/**/*.xml'
|
|
||||||
fail_on_failure: true
|
|
||||||
require_tests: true
|
|
||||||
check_name: Test Results
|
|
||||||
|
|
|
@ -116,6 +116,9 @@ uncommited changes use `-Djgit.dirtyWorkingTree-cdtDefault=warning`
|
||||||
|
|
||||||
For running CDT's DSF-GDB tests, this specifies the path to the location of gdb.
|
For running CDT's DSF-GDB tests, this specifies the path to the location of gdb.
|
||||||
|
|
||||||
|
The default, defined in the root pom.xml, it is blank, which uses gdb from the `PATH`.
|
||||||
|
See BaseTestCase for more info.
|
||||||
|
|
||||||
#### cdt.tests.dsf.gdb.versions
|
#### cdt.tests.dsf.gdb.versions
|
||||||
|
|
||||||
For running CDT's DSF-GDB tests, this specifies the executable names of the gdbs to run, comma-separated.
|
For running CDT's DSF-GDB tests, this specifies the executable names of the gdbs to run, comma-separated.
|
||||||
|
@ -126,7 +129,8 @@ There are a few special values that can be specified (see BaseParametrizedTestCa
|
||||||
- supported: run all versions listed in ITestConstants.ALL_SUPPORTED_VERSIONS
|
- supported: run all versions listed in ITestConstants.ALL_SUPPORTED_VERSIONS
|
||||||
- unsupported: run all versions listed in ITestConstants.ALL_UNSUPPORTED_VERSIONS
|
- unsupported: run all versions listed in ITestConstants.ALL_UNSUPPORTED_VERSIONS
|
||||||
|
|
||||||
The default, defined in the root pom.xml, should be the most recent released version of gdb.
|
The default, defined in the root pom.xml, it is blank, which uses `gdb` and `gdbserver`.
|
||||||
|
See BaseParametrizedTestCase for more info.
|
||||||
|
|
||||||
To build all gdb versions for testing CDT see [download-build-gdb.sh](https://github.com/eclipse-cdt/cdt-infra/blob/master/docker/scripts/download-build-gdb.sh)
|
To build all gdb versions for testing CDT see [download-build-gdb.sh](https://github.com/eclipse-cdt/cdt-infra/blob/master/docker/scripts/download-build-gdb.sh)
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ public abstract class BaseParametrizedTestCase extends BaseTestCase {
|
||||||
return Collections.singletonList(globalVersion);
|
return Collections.singletonList(globalVersion);
|
||||||
}
|
}
|
||||||
String gdbVersions = System.getProperty("cdt.tests.dsf.gdb.versions");
|
String gdbVersions = System.getProperty("cdt.tests.dsf.gdb.versions");
|
||||||
if (gdbVersions == null) {
|
if (gdbVersions == null || gdbVersions.isBlank()) {
|
||||||
// this has to be put in maven using -Dcdt.tests.dsf.gdb.versions or
|
// this has to be put in maven using -Dcdt.tests.dsf.gdb.versions or
|
||||||
// in junit config if you run locally
|
// in junit config if you run locally
|
||||||
// like this -Dcdt.tests.dsf.gdb.versions=gdb.7.7,gdbserver.7.7
|
// like this -Dcdt.tests.dsf.gdb.versions=gdb.7.7,gdbserver.7.7
|
||||||
|
|
|
@ -743,7 +743,7 @@ public class BaseTestCase {
|
||||||
String fileExtension = isWindows ? ".exe" : "";
|
String fileExtension = isWindows ? ".exe" : "";
|
||||||
String versionPostfix = (!version.equals(DEFAULT_VERSION_STRING)) ? "." + version : "";
|
String versionPostfix = (!version.equals(DEFAULT_VERSION_STRING)) ? "." + version : "";
|
||||||
String debugName = main + versionPostfix + fileExtension;
|
String debugName = main + versionPostfix + fileExtension;
|
||||||
if (gdbPath != null) {
|
if (gdbPath != null && !gdbPath.isBlank()) {
|
||||||
debugName = gdbPath + "/" + debugName;
|
debugName = gdbPath + "/" + debugName;
|
||||||
}
|
}
|
||||||
return debugName;
|
return debugName;
|
||||||
|
|
4
pom.xml
4
pom.xml
|
@ -73,8 +73,8 @@
|
||||||
-DskipTests will override anything else as normal maven
|
-DskipTests will override anything else as normal maven
|
||||||
users expect. -->
|
users expect. -->
|
||||||
<skipTests>${cdt-other.skip.tests}</skipTests>
|
<skipTests>${cdt-other.skip.tests}</skipTests>
|
||||||
<dsf.gdb.tests.gdbPath>/shared/common/gdb/gdb-all/bin</dsf.gdb.tests.gdbPath>
|
<dsf.gdb.tests.gdbPath></dsf.gdb.tests.gdbPath>
|
||||||
<cdt.tests.dsf.gdb.versions>gdb.10,gdbserver.10</cdt.tests.dsf.gdb.versions>
|
<cdt.tests.dsf.gdb.versions></cdt.tests.dsf.gdb.versions>
|
||||||
<maven.build.timestamp.format>yyyyMMdd-HHmm</maven.build.timestamp.format>
|
<maven.build.timestamp.format>yyyyMMdd-HHmm</maven.build.timestamp.format>
|
||||||
<buildTimestamp>${maven.build.timestamp}</buildTimestamp>
|
<buildTimestamp>${maven.build.timestamp}</buildTimestamp>
|
||||||
<buildId>${buildTimestamp}</buildId>
|
<buildId>${buildTimestamp}</buildId>
|
||||||
|
|
Loading…
Add table
Reference in a new issue