Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

…lines 1–305 unchanged (305 lines)
306 _DB="mysql"
307 fi
308 if [ "$DB" == "pgsql" ] ; then
309 if [ ! -z "$USEDOCKER" ] ; then
310 echo "Fire up the postgres docker"
311 DOCKER_CONTAINER_ID=$(docker run -e POSTGRES_DB="$DATABASENAME" -e POSTGRES_USER="$DATABASEUSER" -e POSTGRES_PASSWORD=owncloud -d postgres)
312 DATABASEHOST=$(docker inspect --format="{{.NetworkSettings.IPAddress}}" "$DOCKER_CONTAINER_ID")
313
314 echo "Waiting for Postgres initialisation ..."
315
316 if ! apps/files_external/tests/env/wait-for-connection $DATABASEHOST 5432 60; then
317 echo "[ERROR] Waited 60 seconds for $DATABASEHOST, no response" >&2
318 exit 1
…lines 319–460 unchanged (142 lines)

After

…lines 1–305 unchanged (305 lines)
306 _DB="mysql"
307 fi
308 if [ "$DB" == "pgsql" ] ; then
309 if [ ! -z "$USEDOCKER" ] ; then
310 echo "Fire up the postgres docker"
311 DOCKER_CONTAINER_ID=$(docker run -e POSTGRES_DB="$DATABASENAME" -e POSTGRES_USER="$DATABASEUSER" -e POSTGRES_PASSWORD=owncloud -d postgres)
312 DATABASEHOST=$(docker inspect --format="{{ range .NetworkSettings.Networks }}{{ .IPAddress }}{{ end }}" "$DOCKER_CONTAINER_ID")
313
314 echo "Waiting for Postgres initialisation ..."
315
316 if ! apps/files_external/tests/env/wait-for-connection $DATABASEHOST 5432 60; then
317 echo "[ERROR] Waited 60 seconds for $DATABASEHOST, no response" >&2
318 exit 1
…lines 319–460 unchanged (142 lines)

Before

program
comment "#!/usr/bin/env bash"
comment "#"
comment "# SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextc"...
comment "# SPDX-FileCopyrightText: 2012-2016 ownCloud, Inc."
comment "# SPDX-License-Identifier: AGPL-3.0-only"
comment "#"
variable_assignment
variable_name "DATABASENAME"
= "="
word "oc_autotest"
variable_assignment
variable_name "DATABASEUSER"
= "="
word "oc_autotest"
variable_assignment
variable_name "DATABASEHOST"
= "="
word "localhost"
variable_assignment
variable_name "ADMINLOGIN"
= "="
word "admin"
variable_assignment
variable_name "BASEDIR"
= "="
simple_expansion
$ "$"
variable_name "PWD"
variable_assignment
variable_name "PRIMARY_STORAGE_CONFIGS"
= "="
string
" "\""
string_content "local swift"
" "\""
variable_assignment
variable_name "DBCONFIGS"
= "="
string
" "\""
string_content "sqlite mysql mariadb pgsql oci mysqlmb4"
" "\""
comment "# $PHP_EXE is run through 'which' and as such e.g. 'php' is "...
comment "# sufficient. Due to the behaviour of 'which', $PHP_EXE may "...
comment "# (absolute or not) to an executable, e.g. ./code/projects/p"...
if_statement
if "if"
test_command
[ "["
unary_expression
test_operator "-z"
string
" "\""
simple_expansion
$ "$"
variable_name "PHP_EXE"
" "\""
] "]"
; ";"
then "then"
variable_assignment
variable_name "PHP_EXE"
= "="
word "php"
fi "fi"
variable_assignment
variable_name "PHP"
= "="
command_substitution
$( "$("
command
command_name
word "which"
string
" "\""
simple_expansion
$ "$"
variable_name "PHP_EXE"
" "\""
) ")"
if_statement (+71 nodes collapsed)
command
command_name
word "set"
word "-e"
variable_assignment
variable_name "_XDEBUG_CONFIG"
= "="
simple_expansion
$ "$"
variable_name "XDEBUG_CONFIG"
unset_command
unset "unset"
variable_name "XDEBUG_CONFIG"
function_definition (+80 nodes collapsed)
if_statement (+46 nodes collapsed)
if_statement (+44 nodes collapsed)
comment "# PHPUnit might also be installed via a facade binary script"
if_statement (+49 nodes collapsed)
variable_assignment (+23 nodes collapsed)
variable_assignment (+27 nodes collapsed)
variable_assignment (+27 nodes collapsed)
if_statement (+93 nodes collapsed)
if_statement (+95 nodes collapsed)
if_statement (+104 nodes collapsed)
comment "# Back up existing (dev) config if one exists and backup not"...
if_statement (+26 nodes collapsed)
function_definition (+171 nodes collapsed)
comment "# restore config on exit"
command
command_name
word "trap"
word "cleanup_config"
word "EXIT"
comment "# use tmpfs for datadir - should speedup unit test execution"
if_statement (+29 nodes collapsed)
command
command_name
word "echo"
string
" "\""
string_content "Using database "
simple_expansion
$ "$"
variable_name "DATABASENAME"
" "\""
function_definition
function "function"
word "execute_tests"
compound_statement
{ "{"
variable_assignment
variable_name "DB"
= "="
simple_expansion
$ "$"
variable_name "1"
command
command_name
word "echo"
string
" "\""
string_content "Setup environment for "
simple_expansion
$ "$"
variable_name "DB"
string_content " testing on "
simple_expansion
$ "$"
variable_name "PRIMARY_STORAGE_CONFIG"
string_content " storage ..."
" "\""
comment "# back to root folder"
command
command_name
word "cd"
string
" "\""
simple_expansion
$ "$"
variable_name "BASEDIR"
" "\""
comment "# revert changes to tests/data"
command
command_name
word "git"
word "checkout"
word "tests/data"
comment "# reset data directory"
command
command_name
word "rm"
word "-rf"
string
" "\""
simple_expansion
$ "$"
variable_name "DATADIR"
" "\""
command
command_name
word "mkdir"
string
" "\""
simple_expansion
$ "$"
variable_name "DATADIR"
" "\""
if_statement (+28 nodes collapsed)
command
command_name
word "cp"
word "tests/preseed-config.php"
word "config/config.php"
if_statement (+49 nodes collapsed)
variable_assignment
variable_name "_DB"
= "="
simple_expansion
$ "$"
variable_name "DB"
comment "# drop database"
if_statement (+246 nodes collapsed)
if_statement (+272 nodes collapsed)
if_statement (+298 nodes collapsed)
if_statement
if "if"
test_command
[ "["
binary_expression
string
" "\""
simple_expansion
$ "$"
variable_name "DB"
" "\""
== "=="
string
" "\""
string_content "pgsql"
" "\""
] "]"
; ";"
then "then"
if_statement
if "if"
test_command
[ "["
unary_expression
! "!"
unary_expression
test_operator "-z"
string
" "\""
simple_expansion
$ "$"
variable_name "USEDOCKER"
" "\""
] "]"
; ";"
then "then"
command
command_name
word "echo"
string
" "\""
string_content "Fire up the postgres docker"
" "\""
variable_assignment (+32 nodes collapsed)
variable_assignment
variable_name "DATABASEHOST"
= "="
command_substitution
$( "$("
command
command_name
word "docker"
word "inspect"
concatenation
word "--format="
string
" "\""
string_content "{{.NetworkSettings.IPAddress}}"
" "\""
string
" "\""
simple_expansion
$ "$"
variable_name "DOCKER_CONTAINER_ID"
" "\""
) ")"
command
command_name
word "echo"
string
" "\""
string_content "Waiting for Postgres initialisation ..."
" "\""
if_statement (+34 nodes collapsed)
command
command_name
word "echo"
string
" "\""
string_content "Postgres is up."
" "\""
else_clause (+120 nodes collapsed)
fi "fi"
fi "fi"
if_statement (+124 nodes collapsed)
comment "# trigger installation"
command
command_name
word "echo"
string
" "\""
string_content "Installing ...."
" "\""
command (+61 nodes collapsed)
comment "#test execution"
command
command_name
word "echo"
string
" "\""
string_content "Testing with "
simple_expansion
$ "$"
variable_name "DB"
string_content " ..."
" "\""
command
command_name
word "cd"
word "tests"
command
command_name
word "rm"
word "-rf"
string
" "\""
string_content "coverage-html-"
simple_expansion
$ "$"
variable_name "DB"
" "\""
command
command_name
word "mkdir"
string
" "\""
string_content "coverage-html-"
simple_expansion
$ "$"
variable_name "DB"
" "\""
list (+33 nodes collapsed)
if_statement (+22 nodes collapsed)
variable_assignment
variable_name "GROUP"
= "="
raw_string "''"
if_statement (+24 nodes collapsed)
if_statement (+24 nodes collapsed)
if_statement (+24 nodes collapsed)
if_statement (+24 nodes collapsed)
if_statement (+24 nodes collapsed)
if_statement (+24 nodes collapsed)
variable_assignment
variable_name "COVER"
= "="
raw_string "''"
if_statement (+39 nodes collapsed)
command (+44 nodes collapsed)
command (+43 nodes collapsed)
variable_assignment
variable_name "RESULT"
= "="
simple_expansion
$ "$"
special_variable_name "?"
if_statement (+34 nodes collapsed)
if_statement (+46 nodes collapsed)
} "}"
comment "#"
comment "# start test execution"
comment "#"
if_statement (+134 nodes collapsed)
comment "#"
comment "# NOTES on mysql:"
comment "# - CREATE DATABASE oc_autotest;"
comment "# - CREATE USER 'oc_autotest'@'localhost' IDENTIFIED BY 'ow"...
comment "# - grant all on oc_autotest.* to 'oc_autotest'@'localhost'"...
comment "#"
comment "# - for parallel executor support with EXECUTOR_NUMBER=0:"
comment "# - CREATE DATABASE oc_autotest0;"
comment "# - CREATE USER 'oc_autotest0'@'localhost' IDENTIFIED BY 'o"...
comment "# - grant all on oc_autotest0.* to 'oc_autotest0'@'localhos"...
comment "#"
comment "# NOTES on pgsql:"
comment "# - su - postgres"
comment "# - createuser -P oc_autotest (enter password and enable su"...
comment "# - to enable dropdb I decided to add following line to pg_"...
comment "# (this is not the safest way but I don't care for the te"...
comment "# local\tall\tall\ttrust"
comment "#"
comment "# - for parallel executor support with EXECUTOR_NUMBER=0:"
comment "# - createuser -P oc_autotest0 (enter password and enable s"...
comment "#"
comment "# NOTES on oci:"
comment "# - it's a pure nightmare to install Oracle on a Linux-Syst"...
comment "# - DON'T TRY THIS AT HOME!"
comment "# - if you really need it: we feel sorry for you"
comment "#"

After

program
comment "#!/usr/bin/env bash"
comment "#"
comment "# SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextc"...
comment "# SPDX-FileCopyrightText: 2012-2016 ownCloud, Inc."
comment "# SPDX-License-Identifier: AGPL-3.0-only"
comment "#"
variable_assignment
variable_name "DATABASENAME"
= "="
word "oc_autotest"
variable_assignment
variable_name "DATABASEUSER"
= "="
word "oc_autotest"
variable_assignment
variable_name "DATABASEHOST"
= "="
word "localhost"
variable_assignment
variable_name "ADMINLOGIN"
= "="
word "admin"
variable_assignment
variable_name "BASEDIR"
= "="
simple_expansion
$ "$"
variable_name "PWD"
variable_assignment
variable_name "PRIMARY_STORAGE_CONFIGS"
= "="
string
" "\""
string_content "local swift"
" "\""
variable_assignment
variable_name "DBCONFIGS"
= "="
string
" "\""
string_content "sqlite mysql mariadb pgsql oci mysqlmb4"
" "\""
comment "# $PHP_EXE is run through 'which' and as such e.g. 'php' is "...
comment "# sufficient. Due to the behaviour of 'which', $PHP_EXE may "...
comment "# (absolute or not) to an executable, e.g. ./code/projects/p"...
if_statement
if "if"
test_command
[ "["
unary_expression
test_operator "-z"
string
" "\""
simple_expansion
$ "$"
variable_name "PHP_EXE"
" "\""
] "]"
; ";"
then "then"
variable_assignment
variable_name "PHP_EXE"
= "="
word "php"
fi "fi"
variable_assignment
variable_name "PHP"
= "="
command_substitution
$( "$("
command
command_name
word "which"
string
" "\""
simple_expansion
$ "$"
variable_name "PHP_EXE"
" "\""
) ")"
if_statement (+71 nodes collapsed)
command
command_name
word "set"
word "-e"
variable_assignment
variable_name "_XDEBUG_CONFIG"
= "="
simple_expansion
$ "$"
variable_name "XDEBUG_CONFIG"
unset_command
unset "unset"
variable_name "XDEBUG_CONFIG"
function_definition (+80 nodes collapsed)
if_statement (+46 nodes collapsed)
if_statement (+44 nodes collapsed)
comment "# PHPUnit might also be installed via a facade binary script"
if_statement (+49 nodes collapsed)
variable_assignment (+23 nodes collapsed)
variable_assignment (+27 nodes collapsed)
variable_assignment (+27 nodes collapsed)
if_statement (+93 nodes collapsed)
if_statement (+95 nodes collapsed)
if_statement (+104 nodes collapsed)
comment "# Back up existing (dev) config if one exists and backup not"...
if_statement (+26 nodes collapsed)
function_definition (+171 nodes collapsed)
comment "# restore config on exit"
command
command_name
word "trap"
word "cleanup_config"
word "EXIT"
comment "# use tmpfs for datadir - should speedup unit test execution"
if_statement (+29 nodes collapsed)
command
command_name
word "echo"
string
" "\""
string_content "Using database "
simple_expansion
$ "$"
variable_name "DATABASENAME"
" "\""
function_definition
function "function"
word "execute_tests"
compound_statement
{ "{"
variable_assignment
variable_name "DB"
= "="
simple_expansion
$ "$"
variable_name "1"
command
command_name
word "echo"
string
" "\""
string_content "Setup environment for "
simple_expansion
$ "$"
variable_name "DB"
string_content " testing on "
simple_expansion
$ "$"
variable_name "PRIMARY_STORAGE_CONFIG"
string_content " storage ..."
" "\""
comment "# back to root folder"
command
command_name
word "cd"
string
" "\""
simple_expansion
$ "$"
variable_name "BASEDIR"
" "\""
comment "# revert changes to tests/data"
command
command_name
word "git"
word "checkout"
word "tests/data"
comment "# reset data directory"
command
command_name
word "rm"
word "-rf"
string
" "\""
simple_expansion
$ "$"
variable_name "DATADIR"
" "\""
command
command_name
word "mkdir"
string
" "\""
simple_expansion
$ "$"
variable_name "DATADIR"
" "\""
if_statement (+28 nodes collapsed)
command
command_name
word "cp"
word "tests/preseed-config.php"
word "config/config.php"
if_statement (+49 nodes collapsed)
variable_assignment
variable_name "_DB"
= "="
simple_expansion
$ "$"
variable_name "DB"
comment "# drop database"
if_statement (+246 nodes collapsed)
if_statement (+272 nodes collapsed)
if_statement (+298 nodes collapsed)
if_statement
if "if"
test_command
[ "["
binary_expression
string
" "\""
simple_expansion
$ "$"
variable_name "DB"
" "\""
== "=="
string
" "\""
string_content "pgsql"
" "\""
] "]"
; ";"
then "then"
if_statement
if "if"
test_command
[ "["
unary_expression
! "!"
unary_expression
test_operator "-z"
string
" "\""
simple_expansion
$ "$"
variable_name "USEDOCKER"
" "\""
] "]"
; ";"
then "then"
command
command_name
word "echo"
string
" "\""
string_content "Fire up the postgres docker"
" "\""
variable_assignment (+32 nodes collapsed)
variable_assignment
variable_name "DATABASEHOST"
= "="
command_substitution
$( "$("
command
command_name
word "docker"
word "inspect"
concatenation
word "--format="
string
" "\""
string_content "{{ range .NetworkSettings.Networks }}{{ .IPAddress }}{{ end "...
" "\""
string
" "\""
simple_expansion
$ "$"
variable_name "DOCKER_CONTAINER_ID"
" "\""
) ")"
command
command_name
word "echo"
string
" "\""
string_content "Waiting for Postgres initialisation ..."
" "\""
if_statement (+34 nodes collapsed)
command
command_name
word "echo"
string
" "\""
string_content "Postgres is up."
" "\""
else_clause (+120 nodes collapsed)
fi "fi"
fi "fi"
if_statement (+124 nodes collapsed)
comment "# trigger installation"
command
command_name
word "echo"
string
" "\""
string_content "Installing ...."
" "\""
command (+61 nodes collapsed)
comment "#test execution"
command
command_name
word "echo"
string
" "\""
string_content "Testing with "
simple_expansion
$ "$"
variable_name "DB"
string_content " ..."
" "\""
command
command_name
word "cd"
word "tests"
command
command_name
word "rm"
word "-rf"
string
" "\""
string_content "coverage-html-"
simple_expansion
$ "$"
variable_name "DB"
" "\""
command
command_name
word "mkdir"
string
" "\""
string_content "coverage-html-"
simple_expansion
$ "$"
variable_name "DB"
" "\""
list (+33 nodes collapsed)
if_statement (+22 nodes collapsed)
variable_assignment
variable_name "GROUP"
= "="
raw_string "''"
if_statement (+24 nodes collapsed)
if_statement (+24 nodes collapsed)
if_statement (+24 nodes collapsed)
if_statement (+24 nodes collapsed)
if_statement (+24 nodes collapsed)
if_statement (+24 nodes collapsed)
variable_assignment
variable_name "COVER"
= "="
raw_string "''"
if_statement (+39 nodes collapsed)
command (+44 nodes collapsed)
command (+43 nodes collapsed)
variable_assignment
variable_name "RESULT"
= "="
simple_expansion
$ "$"
special_variable_name "?"
if_statement (+34 nodes collapsed)
if_statement (+46 nodes collapsed)
} "}"
comment "#"
comment "# start test execution"
comment "#"
if_statement (+134 nodes collapsed)
comment "#"
comment "# NOTES on mysql:"
comment "# - CREATE DATABASE oc_autotest;"
comment "# - CREATE USER 'oc_autotest'@'localhost' IDENTIFIED BY 'ow"...
comment "# - grant all on oc_autotest.* to 'oc_autotest'@'localhost'"...
comment "#"
comment "# - for parallel executor support with EXECUTOR_NUMBER=0:"
comment "# - CREATE DATABASE oc_autotest0;"
comment "# - CREATE USER 'oc_autotest0'@'localhost' IDENTIFIED BY 'o"...
comment "# - grant all on oc_autotest0.* to 'oc_autotest0'@'localhos"...
comment "#"
comment "# NOTES on pgsql:"
comment "# - su - postgres"
comment "# - createuser -P oc_autotest (enter password and enable su"...
comment "# - to enable dropdb I decided to add following line to pg_"...
comment "# (this is not the safest way but I don't care for the te"...
comment "# local\tall\tall\ttrust"
comment "#"
comment "# - for parallel executor support with EXECUTOR_NUMBER=0:"
comment "# - createuser -P oc_autotest0 (enter password and enable s"...
comment "#"
comment "# NOTES on oci:"
comment "# - it's a pure nightmare to install Oracle on a Linux-Syst"...
comment "# - DON'T TRY THIS AT HOME!"
comment "# - if you really need it: we feel sorry for you"
comment "#"