@@ -27,25 +27,25 @@ mkdir -p "$PWD/TestCode"
2727cd " $PWD /TestCode"
2828
2929if [[ -n " ${INSTALLATION_BRANCH} " ]]; then
30- # Use this for (e.g.) running backward-compatibility tests
31- echo " Using https://github.com/DIRACGrid/DIRAC.git@${INSTALLATION_BRANCH} for the tests"
32- git clone --single-branch --branch " $INSTALLATION_BRANCH " " https://github.com/DIRACGrid/DIRAC.git"
33- mkdir -p /home/dirac/ServerInstallDIR/user
34- cd /home/dirac/ServerInstallDIR/user
35- ln -s " ${HOME} /.globus/usercert.pem" client.pem
36- ln -s " ${HOME} /.globus/userkey.pem" client.key
30+ # Use this for (e.g.) running backward-compatibility tests
31+ echo " Using https://github.com/DIRACGrid/DIRAC.git@${INSTALLATION_BRANCH} for the tests"
32+ git clone --single-branch --branch " $INSTALLATION_BRANCH " " https://github.com/DIRACGrid/DIRAC.git"
33+ mkdir -p /home/dirac/ServerInstallDIR/user
34+ cd /home/dirac/ServerInstallDIR/user
35+ ln -s " ${HOME} /.globus/usercert.pem" client.pem
36+ ln -s " ${HOME} /.globus/userkey.pem" client.key
3737else
38- for repo_path in " ${TESTREPO[@]} " ; do
39- if [[ -d " ${repo_path} " ]]; then
40- cp -r " ${repo_path} " " $( basename " ${repo_path} " ) "
41- cd " $( basename " ${repo_path} " ) "
42- echo " Using local test repository in branch $( git branch | grep " \*" | sed -e " s/* //" ) "
43- cd -
44- else
45- git clone --single-branch --branch " $TESTBRANCH " " https://github.com/$repo_path /DIRAC.git"
46- echo " Using remote test repository ${repo_path} in branch ${TESTBRANCH} "
47- fi
48- done
38+ for repo_path in " ${TESTREPO[@]} " ; do
39+ if [[ -d " ${repo_path} " ]]; then
40+ cp -r " ${repo_path} " " $( basename " ${repo_path} " ) "
41+ cd " $( basename " ${repo_path} " ) "
42+ echo " Using local test repository in branch $( git branch | grep " \*" | sed -e " s/* //" ) "
43+ cd -
44+ else
45+ git clone --single-branch --branch " $TESTBRANCH " " https://github.com/$repo_path /DIRAC.git"
46+ echo " Using remote test repository ${repo_path} in branch ${TESTBRANCH} "
47+ fi
48+ done
4949fi
5050
5151cd ..
@@ -54,44 +54,39 @@ echo -e "*** $(date -u) **** Got the DIRAC tests ****\n"
5454
5555source " ${DIRAC_CI_SETUP_SCRIPT} "
5656
57- if [[ -n " ${INSTALLATION_BRANCH} " ]]; then
58- # shellcheck disable=SC2034
59- DIRACSETUP=$( < " ${INSTALL_CFG_FILE} " grep " Setup = " | cut -f5 -d " " )
60- fi
61-
6257echo -e " *** $( date -u) **** Client INSTALLATION START ****\n"
6358
6459installDIRAC
6560
6661if [[ -z " ${INSTALLATION_BRANCH} " ]]; then
67- echo ' Generate a pilot proxy, to be used by the pilot'
68- dirac-proxy-init -g pilot -C /ca/certs/pilot.pem -K /ca/certs/pilot.key " ${DEBUG} "
69- mv /tmp/x509up_u$UID /ca/certs/pilot_proxy
62+ echo ' Generate a pilot proxy, to be used by the pilot'
63+ dirac-proxy-init -g pilot -C /ca/certs/pilot.pem -K /ca/certs/pilot.key " ${DEBUG} "
64+ mv /tmp/x509up_u$UID /ca/certs/pilot_proxy
7065
71- echo -e " *** $( date -u) Getting a non privileged user\n" | & tee -a clientTestOutputs.txt
72- dirac-proxy-init " ${DEBUG} " | & tee -a clientTestOutputs.txt
66+ echo -e " *** $( date -u) Getting a non privileged user\n" | & tee -a clientTestOutputs.txt
67+ dirac-proxy-init " ${DEBUG} " | & tee -a clientTestOutputs.txt
7368
74- # -------------------------------------------------------------------------------#
75- echo -e " *** $( date -u) **** Submit a job ****\n"
69+ # -------------------------------------------------------------------------------#
70+ echo -e " *** $( date -u) **** Submit a job ****\n"
7671
77- echo -e ' [\n Arguments = "Hello World";\n Executable = "echo";\n Site = "DIRAC.Jenkins.ch";' > test.jdl
78- echo " JobName = \" ${GITHUB_JOB} _$( date +" %Y-%m-%d_%T" | sed ' s/://g' ) \" " >> test.jdl
79- echo " ]" >> test.jdl
80- dirac-wms-job-submit test.jdl " ${DEBUG} " | & tee -a clientTestOutputs.txt
72+ echo -e ' [\n Arguments = "Hello World";\n Executable = "echo";\n Site = "DIRAC.Jenkins.ch";' > test.jdl
73+ echo " JobName = \" ${GITHUB_JOB} _$( date +" %Y-%m-%d_%T" | sed ' s/://g' ) \" " >> test.jdl
74+ echo " ]" >> test.jdl
75+ dirac-wms-job-submit test.jdl " ${DEBUG} " | & tee -a clientTestOutputs.txt
8176
82- # -------------------------------------------------------------------------------#
83- echo -e " *** $( date -u) **** add a file ****\n"
77+ # -------------------------------------------------------------------------------#
78+ echo -e " *** $( date -u) **** add a file ****\n"
8479
85- echo " ${CLIENT_UPLOAD_BASE64} " > b64_lfn
86- base64 b64_lfn --decode > " ${CLIENT_UPLOAD_FILE} "
87- dirac-dms-add-file " ${CLIENT_UPLOAD_LFN} " " ${CLIENT_UPLOAD_FILE} " S3-DIRECT
88- echo $?
80+ echo " ${CLIENT_UPLOAD_BASE64} " > b64_lfn
81+ base64 b64_lfn --decode > " ${CLIENT_UPLOAD_FILE} "
82+ dirac-dms-add-file " ${CLIENT_UPLOAD_LFN} " " ${CLIENT_UPLOAD_FILE} " S3-DIRECT
83+ echo $?
8984
90- # -------------------------------------------------------------------------------#
91- echo -e " *** $( date -u) **** Submit a job with an input ****\n"
85+ # -------------------------------------------------------------------------------#
86+ echo -e " *** $( date -u) **** Submit a job with an input ****\n"
9287
93- echo -e ' [\n Arguments = "Hello World";\n Executable = "echo";\n Site = "DIRAC.Jenkins.ch";\n InputData = "/vo/test_lfn.txt";' > test_dl.jdl
94- echo " JobName = \" ${GITHUB_JOB} _$( date +" %Y-%m-%d_%T" | sed ' s/://g' ) \" " >> test_dl.jdl
95- echo " ]" >> test_dl.jdl
96- dirac-wms-job-submit test_dl.jdl " ${DEBUG} " | & tee -a clientTestOutputs.txt
88+ echo -e ' [\n Arguments = "Hello World";\n Executable = "echo";\n Site = "DIRAC.Jenkins.ch";\n InputData = "/vo/test_lfn.txt";' > test_dl.jdl
89+ echo " JobName = \" ${GITHUB_JOB} _$( date +" %Y-%m-%d_%T" | sed ' s/://g' ) \" " >> test_dl.jdl
90+ echo " ]" >> test_dl.jdl
91+ dirac-wms-job-submit test_dl.jdl " ${DEBUG} " | & tee -a clientTestOutputs.txt
9792fi
0 commit comments