Bugzilla – Attachment 184187 Details for
Bug 39740
[Follow-up of 36932] Split dev_install into git_install and debug_mode
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39740: Add is_test_system to koha-functions, incorporate in koha-plack
Bug-39740-Add-istestsystem-to-koha-functions-incor.patch (text/plain), 2.34 KB, created by
Marcel de Rooy
on 2025-07-17 08:38:17 UTC
(
hide
)
Description:
Bug 39740: Add is_test_system to koha-functions, incorporate in koha-plack
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2025-07-17 08:38:17 UTC
Size:
2.34 KB
patch
obsolete
>From dca0b9c33d55aa22891364806d09f0c8af55ef0c Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Wed, 16 Jul 2025 16:59:07 +0200 >Subject: [PATCH] Bug 39740: Add is_test_system to koha-functions, incorporate > in koha-plack >Content-Type: text/plain; charset=utf-8 > >Result of is_test_system will be determined by looking at KTD_HOME and >TEST_SYSTEM in the environment. >If is_test_system returns true or the flag --development (introduced on >bug 36932) is set when calling koha-plack, koha-plack allows dumping a >stack trace. > >Test plan: >Copy koha-plack to /usr/sbin, and koha-functions.sh to /usr/share/koha/bin. >Source bin/koha-functions.sh ('. bin/koha-functions.sh') >Play with values of KTD_HOME and TEST_SYSTEM and look at results of: > if is_test_system; then echo 'Test system'; fi >Add a die in e.g. opac/opac-main.pl causing a 500. Do you see a stack >trace and is that expected? It will be in KTD, otherwise you need to >make sure that TEST_SYSTEM=1 is exported in your environment. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > debian/scripts/koha-functions.sh | 8 ++++++++ > debian/scripts/koha-plack | 6 +++++- > 2 files changed, 13 insertions(+), 1 deletion(-) > >diff --git a/debian/scripts/koha-functions.sh b/debian/scripts/koha-functions.sh >index 90ccf1611e..0322163327 100755 >--- a/debian/scripts/koha-functions.sh >+++ b/debian/scripts/koha-functions.sh >@@ -386,6 +386,14 @@ adjust_paths_dev_install() > fi > } > >+is_test_system() >+{ >+ if [ -n "$KTD_HOME" ]; then return 0; #true >+ elif [ -n "$TEST_SYSTEM" ]; then return 0; >+ else return 1; # false >+ fi >+} >+ > get_instances() > { > find -L /etc/koha/sites -mindepth 1 -maxdepth 1\ >diff --git a/debian/scripts/koha-plack b/debian/scripts/koha-plack >index eb3282c0f5..8b58fc077b 100755 >--- a/debian/scripts/koha-plack >+++ b/debian/scripts/koha-plack >@@ -92,7 +92,11 @@ start_plack() > > instance_user="${instancename}-koha" > >- if [ -z "$development_environment" ]; then environment="deployment"; else environment="development"; fi >+ if is_test_system || [ -n "$development_environment" ]; then >+ environment="development" >+ else >+ environment="deployment" >+ fi > daemonize="--daemonize" > logging="--access-log /var/log/koha/${instancename}/plack.log \ > --error-log /var/log/koha/${instancename}/plack-error.log" >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 39740
:
184187
|
184432
|
184798
|
184799
|
184800
|
184801
|
184802
|
184803
|
184804
|
184873
|
184874
|
184920
|
184989
|
184990
|
184991
|
184992
|
184993
|
184994
|
184995
|
184996
|
184997
|
184998