@@ -146,39 +146,6 @@ function performance_setup_normal() {
146146 echo " >>> stopsection <<<"
147147}
148148
149- # Returns (by nameref) an array with the command needed to init the Performance site.
150- function performance_initcmd() {
151- local -n cmd=$1
152- # We need to determine the init suite to use.
153- local initsuite=" "
154-
155-
156- # Build the complete init command.
157- cmd=(
158- php admin/cli/install_database.php \
159- --agree-license \
160- --fullname=" Moodle Performance Test" \
161- --shortname=" moodle" \
162- --adminuser=admin \
163- --adminpass=adminpass
164- )
165- }
166-
167- # Returns (by nameref) an array with the command needed to init the Performance site.
168- function performance_perftoolcmd() {
169- local -n cmd=$1
170- # We need to determine the init suite to use.
171- local initsuite=" "
172-
173- # Build the complete init command.
174- cmd=(
175- php public/local/performancetool/generate_test_data.php \
176- --size=" ${SITESIZE} " \
177- --planfilespath=" /shared" \
178- --quiet=" false"
179- )
180- }
181-
182149# Performance job type run.
183150function performance_run() {
184151
@@ -267,6 +234,33 @@ function performance_teardown() {
267234 cp -f " ${DATADIR} /rundata.json" " ${targetpath} "
268235}
269236
237+ # Returns the command to install the performance site.
238+ function performance_initcmd() {
239+ local -n cmd=$1
240+
241+ # Build the complete init command.
242+ cmd=(
243+ php admin/cli/install_database.php \
244+ --agree-license \
245+ --fullname=" Moodle Performance Test" \
246+ --shortname=" moodle" \
247+ --adminuser=admin \
248+ --adminpass=adminpass
249+ )
250+ }
251+
252+ # Returns the command to generate the required test data in the performance site.
253+ function performance_perftoolcmd() {
254+ local -n cmd=$1
255+
256+ # Build the complete init command.
257+ cmd=(
258+ php public/local/performancetool/generate_test_data.php \
259+ --size=" ${SITESIZE} " \
260+ --planfilespath=" /shared" \
261+ --quiet=" false"
262+ )
263+ }
270264
271265# Calculate the command to run for Performance main execution,
272266# returning it in the passed array parameter.
0 commit comments