Skip to content
Snippets Groups Projects
Commit f230318f authored by Fabrice Le Goff's avatar Fabrice Le Goff
Browse files

fixing tbed test for CI

parent 07d56c19
No related branches found
No related tags found
No related merge requests found
Pipeline #6251658 passed
......@@ -70,7 +70,9 @@ if [ $? -ne 0 ]; then
fi
echo "Starting CastorScript with config file: $CS_CONFIG_FILE"
source $SOURCE_DIR/script_setup.sh
if ! [ -v TDAQ_LCG_RELEASE ]; then
source /cvmfs/atlas.cern.ch/repo/sw/tdaq/tools/cmake_tdaq/bin/cm_setup.sh tdaq-10-00-00
fi
python -u $SOURCE_DIR/Script/CastorScript.py $CS_CONFIG_FILE &>$TMP_DIR/logs/stdouterr &
echo "Watching files to transfer"
......@@ -81,31 +83,45 @@ else
fi
LISTING_OUTPUT=`eval $LISTING_COMMAND`
NL=`echo "$LISTING_OUTPUT" | wc -l`
for i in `seq 0 $NL`; do echo; done
for i in `seq 0 $NL`; do tput cuu1; done
if [ x$TERM != x ]; then
NL=`echo "$LISTING_OUTPUT" | wc -l`
for i in `seq 0 $NL`; do echo; done
for i in `seq 0 $NL`; do tput cuu1; done
fi
TIMEOUT=10
while [ "x$LISTING_OUTPUT" != x ]; do
echo "$LISTING_OUTPUT"
if [ $TIMEOUT -eq 0 ];then
echo "timeout"
exit 4
fi
if [ x$TERM != x ]; then
echo "$LISTING_OUTPUT"
fi
sleep 1
for i in `seq 0 $NL`; do tput cuu1; done
NCOLS=`tput cols`
for i in `seq 0 $NL`; do
for ((i=0; i<NCOLS; i++));do printf " "; done;
echo
done
for i in `seq 0 $((NL-1))`; do tput cuu1; done
if [ x$TERM != x ]; then
for i in `seq 0 $NL`; do tput cuu1; done
NCOLS=`tput cols`
for i in `seq 0 $NL`; do
for ((i=0; i<NCOLS; i++));do printf " "; done;
echo
done
for i in `seq 0 $((NL-1))`; do tput cuu1; done
fi
# Check that the CastorScript instance is still running
NB_RUNNING_PROCESSES=`ps -ef | grep "CastorScript.py $CS_CONFIG_FILE" | grep -v grep | wc -l`
if [ $NB_RUNNING_PROCESSES -ne 1 ]; then
echo "number of running CastorScript: $NB_RUNNING_PROCESSES, =!1 => exiting"
exit
echo "number of running CastorScript: $NB_RUNNING_PROCESSES =! 1 => exiting"
exit 3
fi
LISTING_OUTPUT=`eval $LISTING_COMMAND`
NL=`echo "$LISTING_OUTPUT" | wc -l`
((TIMEOUT-=1))
done
echo "Stopping CastorScript"
......@@ -116,7 +132,7 @@ echo "number of errors and warnings in the log files: $NB_ERR"
if [ $NB_ERR -eq 0 ]; then
echo "deleting tmp dir (including logs)"
#rm -rf $TMP_DIR
rm -rf $TMP_DIR
else
echo "Check logs: grep -e WARNING -e ERROR -r $TMP_DIR/logs"
echo "Don't forget to: rm -rf $TMP_DIR"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment