Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/buildmgr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -731,3 +731,4 @@ jobs:
with:
name: Event File buildmgr
path: ${{ github.event_path }}

54 changes: 5 additions & 49 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,59 +8,15 @@ on:

jobs:
buildmgr:
if: github.repository == 'Open-CMSIS-Pack/devtools'
uses: Open-CMSIS-Pack/devtools/.github/workflows/buildmgr.yml@main
if: github.repository == 'brondani/devtools'
uses: brondani/devtools/.github/workflows/buildmgr.yml@main
secrets: inherit
packchk:
needs: [buildmgr]
uses: Open-CMSIS-Pack/devtools/.github/workflows/packchk.yml@main
uses: brondani/devtools/.github/workflows/packchk.yml@main
secrets: inherit
packgen:
needs: [packchk]
uses: Open-CMSIS-Pack/devtools/.github/workflows/packgen.yml@main
uses: brondani/devtools/.github/workflows/packgen.yml@main
secrets: inherit
projmgr:
needs: [packgen]
uses: Open-CMSIS-Pack/devtools/.github/workflows/projmgr.yml@main
uses: brondani/devtools/.github/workflows/projmgr.yml@main
secrets: inherit
svdconv:
needs: [projmgr]
uses: Open-CMSIS-Pack/devtools/.github/workflows/svdconv.yml@main
secrets: inherit
test_libs:
needs: [svdconv]
uses: Open-CMSIS-Pack/devtools/.github/workflows/test_libs.yml@main
coverage:
runs-on: ubuntu-22.04
needs: [ buildmgr, packchk, packgen, projmgr, svdconv, test_libs ]
steps:
- name: Harden Runner
if: ${{ !github.event.repository.private }}
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
with:
egress-policy: audit

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install \
lcov

- name: Download coverage report
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
pattern: coverage-report-*
path: coverage/
merge-multiple: true

- name: Consolidate coverage data
run: |
lcov --rc lcov_branch_coverage=1 --add-tracefile coverage_packchk.info -a coverage_packgen.info -a coverage_projmgr.info -a coverage_buildmgr.info -a coverage_svdconv.info -o merged_coverage.info
working-directory: coverage/

- name: Archive merged coverage report
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: merged-coverage-report
path: ./coverage/merged_coverage.info
if-no-files-found: error
1 change: 1 addition & 0 deletions .github/workflows/packchk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -372,3 +372,4 @@ jobs:
with:
name: Event File packchk
path: ${{ github.event_path }}

1 change: 1 addition & 0 deletions .github/workflows/packgen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -331,3 +331,4 @@ jobs:
with:
name: Event File packgen
path: ${{ github.event_path }}

6 changes: 3 additions & 3 deletions tools/projmgr/test/src/ProjMgrUnitTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4119,7 +4119,7 @@
}

TEST_F(ProjMgrUnitTests, OutputDirsAbsolutePath) {
StdStreamRedirect streamRedirect;
//StdStreamRedirect streamRedirect;

Check notice

Code scanning / CodeQL

Commented-out code Note test

This comment appears to contain commented-out code.

Copilot Autofix

AI 8 months ago

The best way to fix the problem is to remove the commented-out line entirely. This will eliminate the distraction and potential confusion caused by the presence of commented-out code. If the line is needed later, it can be retrieved from the version control system.

Suggested changeset 1
tools/projmgr/test/src/ProjMgrUnitTests.cpp

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/tools/projmgr/test/src/ProjMgrUnitTests.cpp b/tools/projmgr/test/src/ProjMgrUnitTests.cpp
--- a/tools/projmgr/test/src/ProjMgrUnitTests.cpp
+++ b/tools/projmgr/test/src/ProjMgrUnitTests.cpp
@@ -4121,3 +4121,2 @@
 TEST_F(ProjMgrUnitTests, OutputDirsAbsolutePath) {
-  //StdStreamRedirect streamRedirect;
   char* argv[5];
EOF
@@ -4121,3 +4121,2 @@
TEST_F(ProjMgrUnitTests, OutputDirsAbsolutePath) {
//StdStreamRedirect streamRedirect;
char* argv[5];
Copilot is powered by AI and may make mistakes. Always verify output.
char* argv[5];
const string& csolution = testinput_folder + "/TestSolution/outdirs-absolute.csolution.yml";
argv[1] = (char*)"convert";
Expand All @@ -4128,8 +4128,8 @@
argv[4] = (char*)"--cbuildgen";
EXPECT_EQ(CrossPlatformUtils::GetHostType() == "win" ? 1 : 0, RunProjMgr(5, argv, m_envp));

auto errStr = streamRedirect.GetErrorString();
EXPECT_TRUE(regex_search(errStr, regex("warning csolution: absolute path .* is not portable, use relative path instead")));
//auto errStr = streamRedirect.GetErrorString();
//EXPECT_TRUE(regex_search(errStr, regex("warning csolution: absolute path .* is not portable, use relative path instead")));
Comment on lines +4131 to +4132

Check notice

Code scanning / CodeQL

Commented-out code Note test

This comment appears to contain commented-out code.

Copilot Autofix

AI 8 months ago

To fix the issue, we need to either remove the commented-out code or reinstate it. Since the commented-out code appears to be part of a test case, it is likely intended to verify specific behavior. Therefore, the best approach is to reinstate the code and ensure it is functional. If the code is no longer needed, it should be removed entirely. In this case, we will reinstate the code to maintain the integrity of the test.


Suggested changeset 1
tools/projmgr/test/src/ProjMgrUnitTests.cpp

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/tools/projmgr/test/src/ProjMgrUnitTests.cpp b/tools/projmgr/test/src/ProjMgrUnitTests.cpp
--- a/tools/projmgr/test/src/ProjMgrUnitTests.cpp
+++ b/tools/projmgr/test/src/ProjMgrUnitTests.cpp
@@ -4130,4 +4130,4 @@
 
-  //auto errStr = streamRedirect.GetErrorString();
-  //EXPECT_TRUE(regex_search(errStr, regex("warning csolution: absolute path .* is not portable, use relative path instead")));
+  auto errStr = streamRedirect.GetErrorString();
+  EXPECT_TRUE(regex_search(errStr, regex("warning csolution: absolute path .* is not portable, use relative path instead")));
 }
EOF
@@ -4130,4 +4130,4 @@

//auto errStr = streamRedirect.GetErrorString();
//EXPECT_TRUE(regex_search(errStr, regex("warning csolution: absolute path .* is not portable, use relative path instead")));
auto errStr = streamRedirect.GetErrorString();
EXPECT_TRUE(regex_search(errStr, regex("warning csolution: absolute path .* is not portable, use relative path instead")));
}
Copilot is powered by AI and may make mistakes. Always verify output.
}

TEST_F(ProjMgrUnitTests, ProjectSetup) {
Expand Down
Loading