-
Notifications
You must be signed in to change notification settings - Fork 449
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
client: add app testing feature #5365
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
60f97b1
client: add '--app_test fname' option.
davidpanderson ec78ce8
Change --app_test so that the test job runs alongside
davidpanderson aa18db4
Oops! Forgot to add the key file
davidpanderson 13873bf
Add new file to Win solution
davidpanderson 8ea2aba
Add new file to Mac project file
davidpanderson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
// This file is part of BOINC. | ||
// http://boinc.berkeley.edu | ||
// Copyright (C) 2023 University of California | ||
// | ||
// 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. | ||
// | ||
// 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. | ||
// | ||
// You should have received a copy of the GNU Lesser General Public License | ||
// along with BOINC. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
// Set up data structures (project, app, app version, WU, result etc.) | ||
// so that the client runs the given executable. | ||
// Lets you debug client/app interactions with no server or fake XML files | ||
|
||
#include "project.h" | ||
#include "client_types.h" | ||
#include "result.h" | ||
#include "client_state.h" | ||
#include "log_flags.h" | ||
|
||
void CLIENT_STATE::app_test_init() { | ||
PROJECT *proj = new PROJECT; | ||
strcpy(proj->project_name, "test project"); | ||
strcpy(proj->master_url, "test_project_url"); | ||
strcpy(proj->_project_dir, "."); | ||
proj->app_test = true; | ||
projects.push_back(proj); | ||
|
||
APP *app = new APP; | ||
strcpy(app->name, "test app"); | ||
strcpy(app->user_friendly_name, "test app"); | ||
app->project = proj; | ||
apps.push_back(app); | ||
|
||
FILE_INFO *fip = new FILE_INFO; | ||
strcpy(fip->name, app_test_file.c_str()); | ||
fip->status = FILE_PRESENT; | ||
fip->executable = true; | ||
file_infos.push_back(fip); | ||
|
||
FILE_REF * fref = new FILE_REF; | ||
fref->file_info = fip; | ||
strcpy(fip->name, app_test_file.c_str()); | ||
fref->main_program = true; | ||
|
||
APP_VERSION *av = new APP_VERSION; | ||
strcpy(av->app_name, "test_av"); | ||
strcpy(av->api_version, "8.0"); | ||
av->app = app; | ||
av->project = proj; | ||
av->app_files.push_back(*fref); | ||
app_versions.push_back(av); | ||
|
||
WORKUNIT *wu = new WORKUNIT; | ||
strcpy(wu->name, "test_wu"); | ||
strcpy(wu->app_name, "test_app"); | ||
wu->project = proj; | ||
wu->app = app; | ||
wu->rsc_fpops_est = 1e9; | ||
wu->rsc_fpops_bound = 1e12; | ||
wu->rsc_memory_bound = 1e9; | ||
wu->rsc_disk_bound = 1e9; | ||
workunits.push_back(wu); | ||
|
||
RESULT *res = new RESULT; | ||
strcpy(res->name, "test_result"); | ||
strcpy(res->wu_name, "test_wu"); | ||
res->project = proj; | ||
res->avp = av; | ||
res->wup = wu; | ||
res->app = app; | ||
res->report_deadline = dtime()+86400; | ||
results.push_back(res); | ||
|
||
network_suspended = true; | ||
cc_config.skip_cpu_benchmarks = true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I assume, this was added for debugging, and now can be removed safely.