diff --git a/continuousintegration/orchestration/tests/client_ar.sh b/continuousintegration/orchestration/tests/client_ar.sh index 3b2771bebffadce5b3d7cc078be7501b442db119..15c17171bfe2f4ffde4fa4fb00d890a1c9c96650 100644 --- a/continuousintegration/orchestration/tests/client_ar.sh +++ b/continuousintegration/orchestration/tests/client_ar.sh @@ -50,14 +50,16 @@ echo "Creating test dir in eos: ${EOS_DIR}" # XrdSecPROTOCOL=sss eos -r 0 0 root://${EOSINSTANCE} rm -Fr ${EOS_DIR} eos root://${EOSINSTANCE} mkdir -p ${EOS_DIR} +echo -n "Copying files to ${EOS_DIR} using ${NB_PROCS} processes..." for ((i=0;i<${NB_FILES};i++)); do - TEST_FILE_NAME=${TEST_FILE_NAME_BASE}$(printf %.4d $i) - xrdcp --silent /tmp/testfile root://${EOSINSTANCE}/${EOS_DIR}/${TEST_FILE_NAME} -done + echo ${TEST_FILE_NAME_BASE}$(printf %.4d $i) +done | xargs --max-procs=${NB_PROCS} -iTEST_FILE_NAME xrdcp --silent /tmp/testfile root://${EOSINSTANCE}/${EOS_DIR}/TEST_FILE_NAME +echo Done. -eos root://${EOSINSTANCE} ls ${EOS_DIR} | egrep "${TEST_FILE_NAME_BASE}[0-9]+" | sed -e 's/$/ copied/' > ${STATUS_FILE=} +eos root://${EOSINSTANCE} ls ${EOS_DIR} | egrep "${TEST_FILE_NAME_BASE}[0-9]+" | sed -e 's/$/ copied/' > ${STATUS_FILE=} +echo "Waiting for files to be on tape:" SECONDS_PASSED=0 WAIT_FOR_ARCHIVED_FILE_TIMEOUT=60 while test 0 != $(grep -c copied$ ${STATUS_FILE}); do diff --git a/continuousintegration/orchestration/tests/client_helper.sh b/continuousintegration/orchestration/tests/client_helper.sh index b98455e63fe6abdfca1862d59c82f6c870b8612f..a7d50e7d043d93cffdabfe9ebd0b88a8ac379fe9 100644 --- a/continuousintegration/orchestration/tests/client_helper.sh +++ b/continuousintegration/orchestration/tests/client_helper.sh @@ -1,3 +1,15 @@ + +### +# Helper functions for tests running on client pod. +# +# to use in your tests symply source this file: +# . /root/client_helper.sh on the client pod +# +# admin_kinit: kinit for CTAADMIN_USER +# admin_klist: klist for CTAADMIN_USER +# admin_kdestroy: kdestroy for CTAADMIN_USER +# admin_cta: runs a cta command as CTAADMIN_USER + CTAADMIN_USER="ctaadmin2" USER="user1"