cppcheck/tools/test/start_donate_cpu_server_test_local.sh
Sebastian 4ac1500c9f
Donate CPU: Add scripts under /test for testing (#1624)
Indirectly the scripts (at first the server test script) also document what needs to be done to setup a (local) server.
The productive client script can be used by everyone who wants to support daca@home, not only for testing. But i still think it is good to have it under /test to not lose too much clarity / lucidity in the /tools directory.
2019-01-26 11:40:02 +01:00

32 lines
839 B
Bash

#!/bin/sh
# Script for setting up everything that is needed and then running donate-cpu-server.py as
# a local server for testing.
# To start a real server instead of a local one simply remove the "--test" parameter.
# You can move this script to another location but then you have to set this path accordingly.
cppcheck_tools_path=..
# Paths that should not be changed:
dacaathome_path=~/daca@home
donatedresults_path=${dacaathome_path}/donated-results
if [ ! -d "${dacaathome_path}" ]
then
mkdir "${dacaathome_path}"
fi
if [ ! -d "${donatedresults_path}" ]
then
mkdir "${donatedresults_path}"
fi
if [ ! -f "${dacaathome_path}/packages.txt" ]
then
python "${cppcheck_tools_path}/daca2-getpackages.py" > "${dacaathome_path}/packages.txt"
fi
while :
do
python "${cppcheck_tools_path}/donate-cpu-server.py" --test
done