mirror of
https://github.com/YunoHost/package_check.git
synced 2024-09-03 20:06:20 +02:00
handle multi worker
This commit is contained in:
parent
5d9a022a1f
commit
bf3ce384e5
2 changed files with 5 additions and 4 deletions
|
@ -14,10 +14,11 @@ DIST=${DIST:-buster}
|
||||||
# Yunohost version: stable, testing or unstable
|
# Yunohost version: stable, testing or unstable
|
||||||
YNH_BRANCH=${YNH_BRANCH:-stable}
|
YNH_BRANCH=${YNH_BRANCH:-stable}
|
||||||
|
|
||||||
|
WORKER_ID=${WORKER_ID:-0}
|
||||||
LXC_BASE="ynh-appci-$DIST-$ARCH-$YNH_BRANCH-base"
|
LXC_BASE="ynh-appci-$DIST-$ARCH-$YNH_BRANCH-base"
|
||||||
LXC_NAME="ynh-appci-$DIST-$ARCH-$YNH_BRANCH-test"
|
LXC_NAME="ynh-appci-$DIST-$ARCH-$YNH_BRANCH-test-${WORKER_ID}"
|
||||||
|
|
||||||
readonly lock_file="./pcheck.lock"
|
readonly lock_file="./pcheck-${WORKER_ID}.lock"
|
||||||
|
|
||||||
DEFAULT_PHP_VERSION="7.3"
|
DEFAULT_PHP_VERSION="7.3"
|
||||||
[[ "$DIST" == "bullseye" ]] && DEFAULT_PHP_VERSION="7.4"
|
[[ "$DIST" == "bullseye" ]] && DEFAULT_PHP_VERSION="7.4"
|
||||||
|
|
|
@ -4,7 +4,7 @@ source lib/lxc.sh
|
||||||
source lib/tests.sh
|
source lib/tests.sh
|
||||||
source lib/witness.sh
|
source lib/witness.sh
|
||||||
|
|
||||||
complete_log="./Complete.log"
|
readonly complete_log="./Complete-${LXC_NAME}.log"
|
||||||
|
|
||||||
# Purge some log files
|
# Purge some log files
|
||||||
rm -f "$complete_log" && touch "$complete_log"
|
rm -f "$complete_log" && touch "$complete_log"
|
||||||
|
@ -295,7 +295,7 @@ run_all_tests() {
|
||||||
# Print the final results of the tests
|
# Print the final results of the tests
|
||||||
log_title "Tests summary"
|
log_title "Tests summary"
|
||||||
|
|
||||||
python3 lib/analyze_test_results.py $TEST_CONTEXT 2>./results.json
|
python3 lib/analyze_test_results.py $TEST_CONTEXT 2> ./results-${LXC_NAME}.json
|
||||||
[[ -e "$TEST_CONTEXT/summary.png" ]] && cp "$TEST_CONTEXT/summary.png" ./summary.png || rm -f summary.png
|
[[ -e "$TEST_CONTEXT/summary.png" ]] && cp "$TEST_CONTEXT/summary.png" ./summary.png || rm -f summary.png
|
||||||
|
|
||||||
# Restore the started time for the timer
|
# Restore the started time for the timer
|
||||||
|
|
Loading…
Add table
Reference in a new issue