tweak

David Anderson 2024-08-29 13:47:37 -07:00
parent 1570de7f74
commit 7fcf1b9b1b
2 changed files with 4 additions and 8 deletions

@ -44,7 +44,7 @@ This will exercise the interaction with the client.
There are two ways to do this. There are two ways to do this.
Both of them require describing your app's Both of them require describing your app's
input and output files, and its other attributes. input and output files, and its other attributes.
In the first way you describe these in C++; In the first way, you describe these in C++;
in the second, you use XML. in the second, you use XML.
### Using C++ ### Using C++
@ -53,12 +53,12 @@ In the BOINC source tree, open
[client/app_test.cpp](https://github.com/BOINC/boinc/blob/master/client/app_test.cpp) and read the instructions there. [client/app_test.cpp](https://github.com/BOINC/boinc/blob/master/client/app_test.cpp) and read the instructions there.
In summary: In summary:
* Edit ```app_test.cpp``` to specify your app's files and attributes. * Edit ```app_test.cpp``` to specify your app's name, files and attributes.
* Build the BOINC client. * Build the BOINC client.
* Create a test directory, with a subdirectory ```slots/app_test```. * Create a test directory, with a subdirectory ```slots/app_test```.
* Put your application's executable in the test directory. * Put your application's executable in the test directory.
* Put the job's input files in the test directory (with logical names). * Put the job's input files in the test directory (with physical names).
* Run ```boinc --app_test foo``` where ```foo``` is the name of the executable. * Run the BOINC client in the test directory
The client will run the job. The client will run the job.
When it's done, the output files (physical names) will be in the test When it's done, the output files (physical names) will be in the test

@ -43,8 +43,6 @@ The control script 'main' must
* Resolve input and output link files as needed, * Resolve input and output link files as needed,
and connect the resulting paths to worker executables. and connect the resulting paths to worker executables.
* Execute the worker executable(s). * Execute the worker executable(s).
* Create a file ```boinc_job_done``` if the job completes successfully.
* Create a file ```boinc_job_fail``` if the job fails.
Typically 'main' is a bash or perl script, Typically 'main' is a bash or perl script,
since those are the languages present in stock WSL distros. since those are the languages present in stock WSL distros.
@ -69,7 +67,6 @@ resolve () {
sed 's/<soft_link>//; s/<\/soft_link>//' $1 | tr -d '\r\n' sed 's/<soft_link>//; s/<\/soft_link>//' $1 | tr -d '\r\n'
} }
$(resolve worker) --nsecs 60 $(resolve in) $(resolve out) $(resolve worker) --nsecs 60 $(resolve in) $(resolve out)
touch boinc_job_done
``` ```
If instead the work reads from stdin and writes to stdout, If instead the work reads from stdin and writes to stdout,
the command might be the command might be
@ -89,6 +86,5 @@ if [ ! -f prog2_done ]; then
prog2; touch prog2_done prog2; touch prog2_done
fi fi
... ...
touch boinc_job_done
``` ```
This prevents rerunning steps that have already been completed. This prevents rerunning steps that have already been completed.