-
Notifications
You must be signed in to change notification settings - Fork 514
Add AnnounceUpgrade test to the module boinccas module tests. #6635
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 136 commits
9286100
2795f4f
c9292c1
b0b37ff
bcba607
0e69878
74c71ec
d857b99
61a5987
c754f2f
5629c57
ff99c7c
958a916
5ef88a2
e34873c
577a442
f629d56
1d806a4
1c8c299
d8b39a3
28c1668
5a8d1f2
8bf9368
18c8124
2e88116
9572723
54f75c8
a07276f
aae0ef3
4a87fe2
60f32d6
a4d0f8b
84fd11d
8cc1390
3cf121b
1cfa8b7
3a0279e
4cfce4a
aad550b
2ade033
eeb4156
64a498f
dc033b6
9a53b50
769089f
2c10f83
39c1f85
398ab6d
1cb6b36
dfab523
673ca9f
e38ba84
6827abb
a7ca3f6
193d81b
30b65d6
0c3eb7b
02716b0
478ef95
dd14142
14a60d7
1211d50
d813dec
665349b
64553ef
a11576d
f86ef01
88eef93
c04cbf0
d224816
7823918
2660151
dca1b4c
7758478
13398f9
0b8b533
044d192
1c8aa6e
043d4f6
5314872
ee64443
b86dae1
fd8c0ae
c8e3a54
2257121
e2476f6
4697837
203a635
ba69666
1f05c5e
7b1d322
09fbe66
ff1d2f8
17f721a
8451c5e
b042446
b73f2f5
d75de6d
76eec20
0292644
cc3741f
c7450f8
5a141a4
f1c70a6
fc517f3
30ec729
4703343
914219e
4c1bfb8
eaa83da
7255010
cceaddd
36812ff
4ff9db0
0b227c5
3d7aee5
fe7e8a9
08fee26
77d8d7b
788120c
52c646c
010119c
84c1a46
32ce363
b926403
1a97e05
a93d139
60293de
486fd20
31c694b
3357923
ae451cb
d55ca6f
f5c314f
0a509ac
f50d9d7
1f2ee94
ef77752
95a269a
cbd3590
fb1efa5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -123,13 +123,18 @@ jobs: | |||||||||||
|
|
||||||||||||
| - name: Build | ||||||||||||
| if: success() | ||||||||||||
| run: msbuild win_build\boinc.sln -p:Configuration=${{matrix.configuration}} -p:Platform=${{matrix.platform}} -p:VcpkgTripletConfig=ci -p:DLIB=${{ env.DLIB }} -p:DMDF=${{ env.DMDF }} -m | ||||||||||||
| run: msbuild win_build\boinc.sln -p:Configuration=${{matrix.configuration}} -p:Platform=${{matrix.platform}} -p:VcpkgTripletConfig=ci -p:DLIB=${{ env.DLIB }} -p:DMDF=${{ env.DMDF }} -p:BOINCCAS_TEST=true -m | ||||||||||||
|
||||||||||||
| run: msbuild win_build\boinc.sln -p:Configuration=${{matrix.configuration}} -p:Platform=${{matrix.platform}} -p:VcpkgTripletConfig=ci -p:DLIB=${{ env.DLIB }} -p:DMDF=${{ env.DMDF }} -p:BOINCCAS_TEST=true -m | |
| env: | |
| BOINCCAS_TEST: ${{ github.event_name != 'pull_request' && github.repository == 'BOINC/boinc' && 'true' || 'false' }} | |
| run: msbuild win_build\boinc.sln -p:Configuration=${{matrix.configuration}} -p:Platform=${{matrix.platform}} -p:VcpkgTripletConfig=ci -p:DLIB=${{ env.DLIB }} -p:DMDF=${{ env.DMDF }} -p:BOINCCAS_TEST=%BOINCCAS_TEST% -m |
Copilot
AI
Dec 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 'Run crypt_prog tests' step appears to be misplaced in this PR. The PR title indicates it's about adding boinccas module tests, but this change adds a separate crypt_prog test step that seems unrelated to the boinccas tests. This step should either be removed or explained in the PR description.
| - name: Run crypt_prog tests | |
| if: success() && matrix.platform == 'x64' && matrix.configuration == 'Release' | |
| working-directory: win_build\Build\${{matrix.platform}}\${{matrix.configuration}} | |
| run: | | |
| ${{github.workspace}}\temp\OpenCppCoverage\OpenCppCoverage.exe --cover_children --optimized_build --modules ${{github.workspace}} --sources ${{github.workspace}} --input_coverage=gtest.cov --export_type=cobertura:cobertura.xml -- python ${{github.workspace}}\tests\crypt_prog_tests.py ${{github.workspace}}\win_build\Build\x64\${{matrix.configuration}}\crypt_prog.exe |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,6 +21,8 @@ | |
| { | ||
| "name": "libzip", | ||
| "default-features": false | ||
| } | ||
| }, | ||
| "wil", | ||
| "tinyxml2" | ||
| ] | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,84 +1,54 @@ | ||
| // Berkeley Open Infrastructure for Network Computing | ||
| // http://boinc.berkeley.edu | ||
| // Copyright (C) 2005 University of California | ||
| // This file is part of BOINC. | ||
| // https://boinc.berkeley.edu | ||
| // Copyright (C) 2026 University of California | ||
| // | ||
| // This is free software; you can redistribute it and/or | ||
| // modify it under the terms of the GNU Lesser General Public | ||
| // License as published by the Free Software Foundation; | ||
| // either version 2.1 of the License, or (at your option) any later version. | ||
| // BOINC is free software; you can redistribute it and/or modify it | ||
| // under the terms of the GNU Lesser General Public License | ||
| // as published by the Free Software Foundation, | ||
| // either version 3 of the License, or (at your option) any later version. | ||
| // | ||
| // This software is distributed in the hope that it will be useful, | ||
| // BOINC is distributed in the hope that it will be useful, | ||
| // but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
| // See the GNU Lesser General Public License for more details. | ||
| // | ||
| // To view the GNU Lesser General Public License visit | ||
| // http://www.gnu.org/copyleft/lesser.html | ||
| // or write to the Free Software Foundation, Inc., | ||
| // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
| // | ||
| // You should have received a copy of the GNU Lesser General Public License | ||
| // along with BOINC. If not, see <http://www.gnu.org/licenses/>. | ||
|
|
||
| #include "stdafx.h" | ||
| #include "boinccas.h" | ||
| #include "CAAnnounceUpgrade.h" | ||
|
|
||
| #define CUSTOMACTION_NAME _T("CAAnnounceUpgrade") | ||
| #define CUSTOMACTION_PROGRESSTITLE _T("Announce the new BOINC version to all components.") | ||
|
|
||
|
|
||
| ///////////////////////////////////////////////////////////////////// | ||
| // | ||
| // Function: | ||
| // | ||
| // Description: | ||
| // | ||
| ///////////////////////////////////////////////////////////////////// | ||
| CAAnnounceUpgrade::CAAnnounceUpgrade(MSIHANDLE hMSIHandle) : | ||
| BOINCCABase(hMSIHandle, CUSTOMACTION_NAME, CUSTOMACTION_PROGRESSTITLE) | ||
| {} | ||
|
|
||
|
|
||
| ///////////////////////////////////////////////////////////////////// | ||
| // | ||
| // Function: | ||
| // | ||
| // Description: | ||
| // | ||
| ///////////////////////////////////////////////////////////////////// | ||
| CAAnnounceUpgrade::~CAAnnounceUpgrade() | ||
| { | ||
| BOINCCABase::~BOINCCABase(); | ||
| } | ||
|
|
||
|
|
||
| ///////////////////////////////////////////////////////////////////// | ||
| // | ||
| // Function: | ||
| // | ||
| // Description: | ||
| // | ||
| ///////////////////////////////////////////////////////////////////// | ||
| UINT CAAnnounceUpgrade::OnExecution() | ||
| { | ||
| return SetUpgradeParameters(); | ||
| class CAAnnounceUpgrade : public BOINCCABase { | ||
| public: | ||
| virtual ~CAAnnounceUpgrade() = default; | ||
|
|
||
| explicit CAAnnounceUpgrade(MSIHANDLE hMSIHandle) : | ||
| BOINCCABase(hMSIHandle, _T("CAAnnounceUpgrade"), | ||
| _T("Announce the new BOINC version to all components.")) { | ||
| } | ||
|
|
||
| UINT OnExecution() override final { | ||
| tstring strCurrentProductVersion; | ||
|
|
||
| auto uiReturnValue = GetProperty(_T("ProductVersion"), | ||
| strCurrentProductVersion); | ||
| if (uiReturnValue) { | ||
| return uiReturnValue; | ||
| } | ||
| if (strCurrentProductVersion.empty()) { | ||
| return ERROR_INSTALL_FAILURE; | ||
| } | ||
|
|
||
| uiReturnValue = SetRegistryValue(_T("UpgradingTo"), | ||
| strCurrentProductVersion); | ||
| if (uiReturnValue) { | ||
| return uiReturnValue; | ||
| } | ||
|
|
||
| return ERROR_SUCCESS; | ||
| } | ||
| }; | ||
|
|
||
| UINT __stdcall AnnounceUpgrade(MSIHANDLE hInstall) { | ||
| return CAAnnounceUpgrade(hInstall).Execute(); | ||
| } | ||
|
|
||
|
|
||
| ///////////////////////////////////////////////////////////////////// | ||
| // | ||
| // Function: AnnounceUpgrade | ||
| // | ||
| // Description: | ||
| // | ||
| ///////////////////////////////////////////////////////////////////// | ||
| UINT __stdcall AnnounceUpgrade(MSIHANDLE hInstall) | ||
| { | ||
| UINT uiReturnValue = 0; | ||
|
|
||
| CAAnnounceUpgrade* pCA = new CAAnnounceUpgrade(hInstall); | ||
| uiReturnValue = pCA->Execute(); | ||
| delete pCA; | ||
|
|
||
| return uiReturnValue; | ||
| } | ||
|
|
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,103 +1,69 @@ | ||
| // Berkeley Open Infrastructure for Network Computing | ||
| // http://boinc.berkeley.edu | ||
| // Copyright (C) 2005 University of California | ||
| // This file is part of BOINC. | ||
| // https://boinc.berkeley.edu | ||
| // Copyright (C) 2026 University of California | ||
| // | ||
| // This is free software; you can redistribute it and/or | ||
| // modify it under the terms of the GNU Lesser General Public | ||
| // License as published by the Free Software Foundation; | ||
| // either version 2.1 of the License, or (at your option) any later version. | ||
| // BOINC is free software; you can redistribute it and/or modify it | ||
| // under the terms of the GNU Lesser General Public License | ||
| // as published by the Free Software Foundation, | ||
| // either version 3 of the License, or (at your option) any later version. | ||
| // | ||
| // This software is distributed in the hope that it will be useful, | ||
| // BOINC is distributed in the hope that it will be useful, | ||
| // but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
| // See the GNU Lesser General Public License for more details. | ||
| // | ||
| // To view the GNU Lesser General Public License visit | ||
| // http://www.gnu.org/copyleft/lesser.html | ||
| // or write to the Free Software Foundation, Inc., | ||
| // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
| // | ||
| // You should have received a copy of the GNU Lesser General Public License | ||
| // along with BOINC. If not, see <http://www.gnu.org/licenses/>. | ||
|
|
||
| #include "stdafx.h" | ||
| #include "boinccas.h" | ||
| #include "CACleanupOldBinaries.h" | ||
|
|
||
| #define CUSTOMACTION_NAME _T("CACleanupOldBinaries") | ||
| #define CUSTOMACTION_PROGRESSTITLE _T("Cleanup any old binaries that were left lying around from some other install.") | ||
|
|
||
|
|
||
| ///////////////////////////////////////////////////////////////////// | ||
| // | ||
| // Function: | ||
| // | ||
| // Description: | ||
| // | ||
| ///////////////////////////////////////////////////////////////////// | ||
| CACleanupOldBinaries::CACleanupOldBinaries(MSIHANDLE hMSIHandle) : | ||
| BOINCCABase(hMSIHandle, CUSTOMACTION_NAME, CUSTOMACTION_PROGRESSTITLE) | ||
| {} | ||
|
|
||
|
|
||
| ///////////////////////////////////////////////////////////////////// | ||
| // | ||
| // Function: | ||
| // | ||
| // Description: | ||
| // | ||
| ///////////////////////////////////////////////////////////////////// | ||
| CACleanupOldBinaries::~CACleanupOldBinaries() | ||
| { | ||
| BOINCCABase::~BOINCCABase(); | ||
| } | ||
|
|
||
|
|
||
| ///////////////////////////////////////////////////////////////////// | ||
| // | ||
| // Function: | ||
| // | ||
| // Description: | ||
| // | ||
| ///////////////////////////////////////////////////////////////////// | ||
| UINT CACleanupOldBinaries::OnExecution() | ||
| { | ||
| tstring strInstallDirectory; | ||
| UINT uiReturnValue; | ||
|
|
||
|
|
||
| uiReturnValue = GetProperty( _T("INSTALLDIR"), strInstallDirectory ); | ||
| if ( uiReturnValue ) return uiReturnValue; | ||
|
|
||
| DeleteFile(tstring(strInstallDirectory + _T("\\boinc.exe")).c_str()); | ||
| DeleteFile(tstring(strInstallDirectory + _T("\\boincmgr.exe")).c_str()); | ||
| DeleteFile(tstring(strInstallDirectory + _T("\\boinccmd.exe")).c_str()); | ||
| DeleteFile(tstring(strInstallDirectory + _T("\\boinc.dll")).c_str()); | ||
| DeleteFile(tstring(strInstallDirectory + _T("\\libcurl.dll")).c_str()); | ||
| DeleteFile(tstring(strInstallDirectory + _T("\\libeay32.dll")).c_str()); | ||
| DeleteFile(tstring(strInstallDirectory + _T("\\ssleay32.dll")).c_str()); | ||
| DeleteFile(tstring(strInstallDirectory + _T("\\zlib1.dll")).c_str()); | ||
| DeleteFile(tstring(strInstallDirectory + _T("\\dbghelp.dll")).c_str()); | ||
| DeleteFile(tstring(strInstallDirectory + _T("\\dbghelp95.dll")).c_str()); | ||
| DeleteFile(tstring(strInstallDirectory + _T("\\srcsrv.dll")).c_str()); | ||
| DeleteFile(tstring(strInstallDirectory + _T("\\symsrv.dll")).c_str()); | ||
|
|
||
| return ERROR_SUCCESS; | ||
| } | ||
|
|
||
|
|
||
| ///////////////////////////////////////////////////////////////////// | ||
| // | ||
| // Function: CleanupOldBinaries | ||
| // | ||
| // Description: | ||
| // | ||
| ///////////////////////////////////////////////////////////////////// | ||
| UINT __stdcall CleanupOldBinaries(MSIHANDLE hInstall) | ||
| { | ||
| UINT uiReturnValue = 0; | ||
|
|
||
| CACleanupOldBinaries* pCA = new CACleanupOldBinaries(hInstall); | ||
| uiReturnValue = pCA->Execute(); | ||
| delete pCA; | ||
|
|
||
| return uiReturnValue; | ||
| class CACleanupOldBinaries : public BOINCCABase { | ||
| public: | ||
| virtual ~CACleanupOldBinaries() = default; | ||
|
|
||
| explicit CACleanupOldBinaries(MSIHANDLE hMSIHandle) : | ||
| BOINCCABase(hMSIHandle, _T("CACleanupOldBinaries"), | ||
| _T("Cleanup any old binaries that were left lying around from " | ||
| "some other install.")) { | ||
| } | ||
|
|
||
| UINT OnExecution() override final { | ||
| tstring strInstallDirectory; | ||
|
|
||
| const auto uiReturnValue = | ||
| GetProperty(_T("INSTALLDIR"), strInstallDirectory); | ||
| if (uiReturnValue != ERROR_SUCCESS) { | ||
| return uiReturnValue; | ||
| } | ||
| if (strInstallDirectory.empty()) { | ||
| return ERROR_INSTALL_FAILURE; | ||
| } | ||
|
|
||
| constexpr std::array<std::wstring_view, 12> filesToDelete = { | ||
| _T("boinc.exe"), | ||
| _T("boincmgr.exe"), | ||
| _T("boinccmd.exe"), | ||
| _T("boinc.dll"), | ||
| _T("libcurl.dll"), | ||
| _T("libeay32.dll"), | ||
| _T("ssleay32.dll"), | ||
| _T("zlib1.dll"), | ||
| _T("dbghelp.dll"), | ||
| _T("dbghelp95.dll"), | ||
| _T("srcsrv.dll"), | ||
| _T("symsrv.dll") | ||
| }; | ||
|
|
||
| for (auto file : filesToDelete) { | ||
| DeleteFile( | ||
| (strInstallDirectory + _T("\\") + file.data()).c_str()); | ||
| } | ||
|
|
||
| return ERROR_SUCCESS; | ||
| } | ||
| }; | ||
|
|
||
| UINT __stdcall CleanupOldBinaries(MSIHANDLE hInstall) { | ||
| return CACleanupOldBinaries(hInstall).Execute(); | ||
| } |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change enables
BOINCCAS_TESTfor every Windows build configuration/platform. Since these tests create/delete local users/groups and write HKLM registry keys, consider gating this define (and/or test execution) to a dedicated job or only the configurations intended for these integration-style tests to reduce CI fragility and side effects.