Skip to content
Snippets Groups Projects
Commit 1740730387e0 authored by Vincent Hatakeyama's avatar Vincent Hatakeyama
Browse files

:ambulance: Force workers at 0 when running tests

Odoo only output a warning message but it wrecks the CI
parent a7d923940593
No related branches found
No related tags found
1 merge request!138🚑 Force workers at 0 when running tests
......@@ -46,7 +46,7 @@
# colorize also remove database name and thread number
alias colorize="sed -e 's/^\(\w*-..-.. ..:..:..,\w*\) \w*/\o033[2m\1\o033[22m/' -e 's/ INFO \w* \(odoo\.\(tests\.runner\|modules\.module\): \)\(.*\)/ \o033[32m\o033[7mINFO\o033[0m \1\o033[34m\3\o033[0m/' -e 's/ ERROR \w* \(odoo\.\(tests\.runner\|modules.module\): \)\(.*\)/ \o033[31m\o033[7mERROR\o033[0m \1\o033[34m\3\o033[0m/' -e 's/ \(INFO\) \(\w*\|?\) \([a-zA-Z0-9._-]*\):\(.*\)/ \o033[32m\o033[7m\1\o033[0m \3:\o033[32m\4\o033[39m/' -e 's/ \(DEBUG\) \w* \([a-zA-Z0-9._-]*\):\(.*\)/ \o033[33m\o033[7m\1\o033[0m \2:\o033[33m\3\o033[39m/' -e 's/ \(WARNING\) \w* \([a-zA-Z0-9._-]*\):\(.*\)/ \o033[33m\o033[7m\1\o033[0m \2:\o033[33m\3\o033[0m/' -e 's/ \(ERROR\) \w* \([a-zA-Z0-9._-]*\):\(.*\)/ \o033[31m\o033[7m\1\o033[0m \2:\o033[31m\3\o033[0m/' -e 's/ FAILED/ \o033[41m\o033[97m\o033[1mFAILED\o033[0m/' -e 's/ FAIL\(.*\)/ \o033[41m\o033[97m\o033[1mFAIL\o033[49m\o033[31m\1\o033[0m/' -e 's/ \(CRITICAL\) \w* \([a-zA-Z0-9._-]*\):\(.*\)/ \o033[33m\o033[7m\1\o033[0m \2:\o033[33m\3\o033[39m/' -e 's/ \(TEST\) \w* \(.*\) \(ERROR\)\(.*\)/ \o033[34m\o033[7m\1\o033[27m \2\o033[0m \o033[41m\o033[97m\o033[1m\3\o033[49m\o033[0m/' -e 's/ \(TEST\) \w* \(.*\) \(OK\)/ \o033[34m\o033[7m\1\o033[27m \2\o033[0m \o033[32m\o033[7m\3\o033[27m\o033[39m/' -e 's/ \(TEST\) \w* \([a-zA-Z0-9._-]*\):\(.*\)/ \o033[34m\o033[7m\1\o033[0m \2:\o033[34m\3\o033[0m/'"
# Catch both stdout & stderr here as Odoo 10 uses stderr, unlike previous Odoo versions.
$here/start $update -d $dbname $db_user_param --test-enable $loglevel --max-cron=0 --stop-after-init $* 2>&1 | tee $logfile | colorize
$here/start $update -d $dbname $db_user_param --test-enable $loglevel --max-cron=0 --workers=0 --stop-after-init $* 2>&1 | tee $logfile | colorize
start_status=$pipestatus[1]
# Odoo 15 detection
if [ $(grep -P 'odoo\.tests\.runner: ([[:digit:]]+) failed, [[:digit:]]+ error\(s\) of [[:digit:]]+ tests when loading database' $logfile --count) -gt 0 ];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment