Bug 39740: (QA follow-up) Rename test_system/TEST_SYSTEM
See comment30 and comment36. Result of two sed's: git grep -l test_system | xargs sed -i -e "s/test_system/debug_mode/g" git grep -l TEST_SYSTEM | xargs sed -i -e "s/TEST_SYSTEM/DEBUG_MODE/g" The next patch will take care of the debugger options in the plack and z3950 responder scripts. Test plan: Read the patch. (Testing in next patch.) git grep -i test_system Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
c0c99f63cd
commit
0b0eb6bc14
|
|
@ -401,20 +401,20 @@ is_git_install()
|
|||
fi
|
||||
}
|
||||
|
||||
is_test_system()
|
||||
is_debug_mode()
|
||||
{
|
||||
local instancename=$1 test_system
|
||||
local instancename=$1 debug_mode
|
||||
|
||||
# env var TEST_SYSTEM overrules koha-conf entry
|
||||
if [ -n "$TEST_SYSTEM" ]; then
|
||||
if [ "$TEST_SYSTEM" != "0" ]; then return 0; else return 1; fi
|
||||
# env var DEBUG_MODE overrules koha-conf entry
|
||||
if [ -n "$DEBUG_MODE" ]; then
|
||||
if [ "$DEBUG_MODE" != "0" ]; then return 0; else return 1; fi
|
||||
fi
|
||||
|
||||
# now check koha-conf
|
||||
if [ "$instancename" != "" ] && is_instance $instancename; then
|
||||
test_system=$(run_safe_xmlstarlet $instancename test_system)
|
||||
debug_mode=$(run_safe_xmlstarlet $instancename debug_mode)
|
||||
fi
|
||||
if [ -n "$test_system" ] && [ "test_system" != "0" ]; then
|
||||
if [ -n "$debug_mode" ] && [ "debug_mode" != "0" ]; then
|
||||
return 0; # true
|
||||
else
|
||||
return 1
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ start_plack()
|
|||
|
||||
instance_user="${instancename}-koha"
|
||||
|
||||
if is_test_system ${instancename} || [ -n "$development_environment" ]; then
|
||||
if is_debug_mode ${instancename} || [ -n "$development_environment" ]; then
|
||||
environment="development"
|
||||
else
|
||||
environment="deployment"
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ start_z3950()
|
|||
logging="-l /var/log/koha/${instancename}/z3950.log"
|
||||
|
||||
Z3950RESPONDER="/usr/bin/perl $KOHA_HOME/$KOHA_BINDIR/z3950_responder.pl"
|
||||
if [ "$debug_mode" = "yes" ] && is_test_system $instancename; then
|
||||
if [ "$debug_mode" = "yes" ] && is_debug_mode $instancename; then
|
||||
environment="development"
|
||||
daemonize=""
|
||||
logging="" # remote debugger takes care
|
||||
|
|
@ -298,7 +298,7 @@ if [ $# -gt 0 ]; then
|
|||
PERL5LIB=$PERL5LIB:$KOHA_HOME/installer:$KOHA_HOME/lib/installer
|
||||
# If debug mode is enabled, add the debugger lib path
|
||||
# to PERL5LIB if appropriate
|
||||
if [ "$debug_mode" = "yes" ] && is_test_system $name; then
|
||||
if [ "$debug_mode" = "yes" ] && is_debug_mode $name; then
|
||||
if [ "$debugger_path" != "" ]; then
|
||||
PERL5LIB="${debugger_path}":$PERL5LIB
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -411,9 +411,9 @@ __END_SRU_PUBLICSERVER__
|
|||
|
||||
<!-- flags for development purposes
|
||||
git_install is used to adjust some paths specific to git installations (fka dev_install)
|
||||
test_system is used to differentiate production from test systems (see for example koha-plack) -->
|
||||
debug_mode is used to differentiate production from test systems (see for example koha-plack) -->
|
||||
<git_install>0</git_install>
|
||||
<test_system>0</test_system>
|
||||
<debug_mode>0</debug_mode>
|
||||
|
||||
<!-- strict_sql_modes should not be used in a production environment
|
||||
developers use it to catch bugs related to strict SQL modes -->
|
||||
|
|
|
|||
|
|
@ -230,9 +230,9 @@
|
|||
|
||||
<!-- flags for development purposes
|
||||
git_install is used to adjust some paths specific to git installations (fka dev_install)
|
||||
test_system is used to differentiate production from test systems (see for example koha-plack) -->
|
||||
debug_mode is used to differentiate production from test systems (see for example koha-plack) -->
|
||||
<git_install>0</git_install>
|
||||
<test_system>0</test_system>
|
||||
<debug_mode>0</debug_mode>
|
||||
|
||||
<!-- strict_sql_modes should not be used in a production environment
|
||||
developers use it to catch bugs related to strict SQL modes -->
|
||||
|
|
|
|||
Loading…
Reference in New Issue