#!/bin/sh . target_type TOP_DIR=/home/robocop/robTester/svnRobTester LOG_DIR=/home/robocop/robTester/AliTRDrobLogFiles/${BASENAME_DATE} FING_DIR=/home/robocop/robTester/svnRobTester/Fingerprints #Transfer scanned image from robtestdb.trd.net robnumber=`echo $BASENAME | awk '{print substr($0,4,10)}'` scp trd@robtestdb:~/ScannerProject/outputs/*/scan_$robnumber.jpg $LOG_DIR/ # Analysing the log files cp $TOP_DIR/pasa_adc/Charge_inj $LOG_DIR/Charge_inj cp $LOG_DIR/trapTests/hammingOff/report_ni_01.log $LOG_DIR/report_ni_01.log cp $LOG_DIR/trapTests/hammingOff/report_ni_02.log $LOG_DIR/report_ni_02.log cp $LOG_DIR/trapTests/hammingOn/report_ni_01.log $LOG_DIR/report_ni_03.log cp $LOG_DIR/trapTests/hammingOn/report_ni_02.log $LOG_DIR/report_ni_04.log cp $LOG_DIR/scsnAnalogTests/report_pasa_01.log $LOG_DIR/report_pasa_01.log cp $LOG_DIR/scsnAnalogTests/report_pasa_02.log $LOG_DIR/report_pasa_02.log cp $LOG_DIR/scsnAnalogTests/report_pasa_03.log $LOG_DIR/report_pasa_03.log cp $TOP_DIR/report_quick.log $LOG_DIR/report_quick.log #QUICK_ERR="OK"; CHINJ_ERR="OK"; SCSN_ERR="OK"; PASA_ERR="OK"; ORI_ERR="OK"; NI_ERR="OK"; TRAP_ERR="OK"; cd $LOG_DIR grep -e "Stress_test: 200 us" db_summary.log > stress_200 grep -e "Stress_test: 150 us" db_summary.log > stress_150 grep -e "Stress_test: 140 us" db_summary.log > stress_140 grep -e "Stress_test: 120 us" db_summary.log > stress_120 grep -e "Stress_test: 100 us" db_summary.log > stress_100 grep -e "Stress_test: 50 us" db_summary.log > stress_50 if [ -s ./stress_200 ] ; then STRESS_ERR="stress-test crashed at 200 us"; fi if [ -s ./stress_150 ] ; then STRESS_ERR="stress-test crashed at 150 us"; fi if [ -s ./stress_140 ] ; then STRESS_ERR="stress-test crashed at 140 us"; fi if [ -s ./stress_120 ] ; then STRESS_ERR="stress-test crashed at 120 us"; fi if [ -s ./stress_100 ] ; then STRESS_ERR="stress-test crashed at 100 us"; fi if [ -s ./stress_50 ] ; then STRESS_ERR="stress-test crashed at 50 us"; fi rm stress_* if [ -s ./report_quick.log ] ; then SCSN_ERR="ERROR"; else SCSN_ERR="OK"; fi if [ -s ./Charge_inj/report_charge_inj.log ] ; then CHINJ_ERR="ERROR"; else CHINJ_ERR="OK"; fi if [ -s report_ni_01.log ] || [ -s report_ni_02.log ] || [ -s report_ni_03.log ] || [ -s report_ni_04.log ] ; then NI_ERR="ERROR"; else NI_ERR="OK"; fi grep -h -E "^(wrong|PRE|IMM|DBK|DMM|DDD|DIV|CJP|CST|PG|GIO|IRQ|LUT|EBF|FLA|FLD|FPA|FGA|FGM|FDD|FTA|FTL|FTS|FP0|FP1|FP2|FP3|FP4|FP5|FP6|FP7)" trapIntErrors1 > run1 grep -h -E "^(wrong|PRE|IMM|DBK|DMM|DDD|DIV|CJP|CST|PG|GIO|IRQ|LUT|EBF|FLA|FLD|FPA|FGA|FGM|FDD|FTA|FTL|FTS|FP0|FP1|FP2|FP3|FP4|FP5|FP6|FP7)" trapIntErrors2 > run2 grep -h -E "^(wrong|PRE|IMM|DBK|DMM|DDD|DIV|CJP|CST|PG|GIO|IRQ|LUT|EBF|FLA|FLD|FPA|FGA|FGM|FDD|FTA|FTL|FTS|FP0|FP1|FP2|FP3|FP4|FP5|FP6|FP7)" trapIntErrors3 > run3 grep -h -E "^(wrong|PRE|IMM|DBK|DMM|DDD|DIV|CJP|CST|PG|GIO|IRQ|LUT|EBF|FLA|FLD|FPA|FGA|FGM|FDD|FTA|FTL|FTS|FP0|FP1|FP2|FP3|FP4|FP5|FP6|FP7)" trapIntErrors4 > run4 if [ -s run1 ] || [ -s run2 ] || [ -s run3 ] || [ -s run4 ] ; then TRAP_ERR="ERROR"; else TRAP_ERR="OK" fi if [ -s report_pasa_01.log ] || [ -s report_pasa_02.log ]|| [ -s report_pasa_03.log ]; then PASA_ERR="ERROR"; else PASA_ERR="OK" fi if [ "$CHINJ_ERR" == "ERROR" ] || [ "$SCSN_ERR" == "ERROR" ] || [ "$TRAP_ERR" == "ERROR" ] || [ "$PASA_ERR" == "ERROR" ] || [ "$NI_ERR" == "ERROR" ] ; then RESULT=2; else RESULT=1; fi # Write some files for PVSS "lightshow" echo "OK" > SCSN_ERR echo "OK" > PASA_ERR echo "OK" > TRAP_ERR echo "OK" > NI_ERR if [ "$TRAP_ERR" == "ERROR" ] ; then echo "ERROR" > TRAP_ERR else echo "OK" > TRAP_ERR fi if [ "$NI_ERR" == "ERROR" ] ; then echo "ERROR" > NI_ERR else echo "OK" > NI_ERR fi if [ "$PASA_ERR" == "ERROR" ] ; then echo "ERROR" > PASA_ERR else echo "OK" > PASA_ERR fi if [ "$SCSN_ERR" == "ERROR" ] ; then echo "ERROR" > SCSN_ERR else echo "OK" > SCSN_ERR fi #Quick ORI test cd $TOP_DIR/ROB_ORI make init make pre > report_ori grep -e "*** EOF after tracklets" report_ori > $LOG_DIR/report_ori.log cd $LOG_DIR if [ -s ./report_ori.log ] ; then ORI_ERR="ERROR"; else ORI_ERR="OK"; fi # Write file for the production database #rm $TOP_DIR/db_summary.log #echo "Quick_Scsn: $QUICK_ERR" > $TOP_DIR/db_summary.log # Perform on-line current measurement cd $TOP_DIR make reset cd $LOG_DIR currentmeter 1 > 3V3A_res currentmeter 2 > 1V8A_res currentmeter 3 > 3V3D_res currentmeter 4 > 1V8D_res cd $TOP_DIR make reset cd pasa_adc make init cd $LOG_DIR currentmeter 1 > 3V3A_ini currentmeter 2 > 1V8A_ini currentmeter 3 > 3V3D_ini currentmeter 4 > 1V8D_ini cd $TOP_DIR make reset cd $LOG_DIR # Add some useful info find . -name '3V3A_res' -exec perl -pi -e "s/^/ 3V3 PASA: /g" '{}' ';' find . -name '1V8A_res' -exec perl -pi -e "s/^/ 1V8 ADC: /g" '{}' ';' find . -name '3V3D_res' -exec perl -pi -e "s/^/ 3V3 TRAP: /g" '{}' ';' find . -name '1V8D_res' -exec perl -pi -e "s/^/ 1V8 TRAP: /g" '{}' ';' find . -name '3V3A_ini' -exec perl -pi -e "s/^/ 3V3 PASA: /g" '{}' ';' find . -name '1V8A_ini' -exec perl -pi -e "s/^/ 1V8 ADC: /g" '{}' ';' find . -name '3V3D_ini' -exec perl -pi -e "s/^/ 3V3 TRAP: /g" '{}' ';' find . -name '1V8D_ini' -exec perl -pi -e "s/^/ 1V8 TRAP: /g" '{}' ';' # Write summary report date1=`/bin/date '+%Y-%m-%d %H:%M:%S'` if [ -a ${BASENAME}_summary.log ] ; then rm ${BASENAME}_summary.log fi echo "Name: $BASENAME" > ${BASENAME}_summary.log # date +'%Y-%m-%d %H:%M:%S' >> ${BASENAME}_summary.log echo "Date: ${date1}" >> ${BASENAME}_summary.log echo "Tester: $PERSON" >> ${BASENAME}_summary.log echo "# Good = 1, Bad = 2, ToBeRepaired = 3, HasProblems = 4" >> ${BASENAME}_summary.log echo "Result: $RESULT" >> ${BASENAME}_summary.log echo "CHINJ: $CHINJ_ERR" >> ${BASENAME}_summary.log echo "SCSN: $SCSN_ERR" >> ${BASENAME}_summary.log echo "TRAP: $TRAP_ERR" >> ${BASENAME}_summary.log echo "PASA: $PASA_ERR" >> ${BASENAME}_summary.log echo "NI: $NI_ERR" >> ${BASENAME}_summary.log echo "ORI: $ORI_ERR" >> ${BASENAME}_summary.log echo "" >> ${BASENAME}_summary.log echo "Comment: $STRESS_ERR" >> ${BASENAME}_summary.log echo "" >> ${BASENAME}_summary.log echo "=================================================================" >> ${BASENAME}_summary.log echo " ON-LINE CURRRENT MEASUREMENTS " >> ${BASENAME}_summary.log echo "=================================================================" >> ${BASENAME}_summary.log echo " RESET VALUES [A]:" >> ${BASENAME}_summary.log cat 3V3A_res >> ${BASENAME}_summary.log cat 1V8A_res >> ${BASENAME}_summary.log cat 3V3D_res >> ${BASENAME}_summary.log cat 1V8D_res >> ${BASENAME}_summary.log echo " INITIALIZATION VALUES [A]:" >> ${BASENAME}_summary.log cat 3V3A_ini >> ${BASENAME}_summary.log cat 1V8A_ini >> ${BASENAME}_summary.log cat 3V3D_ini >> ${BASENAME}_summary.log cat 1V8D_ini >> ${BASENAME}_summary.log # echo " 3V3 PASA 1V8 ADC 3V3 TRAP 1V8 TRAP" >> ${BASENAME}_summary.log # echo " current1 current2 current3 current4" >> ${BASENAME}_summary.log # echo "Reset: 1.35 0.165 0.041 0.627" >> ${BASENAME}_summary.log # echo "Init: 1.325 1.076 0.385 0.728" >> ${BASENAME}_summary.log echo "=================================================================" >> ${BASENAME}_summary.log echo " ALL MCM LASER IDS ON THIS ROB " >> ${BASENAME}_summary.log echo "=================================================================" >> ${BASENAME}_summary.log cat chipIds >> ${BASENAME}_summary.log echo "=================================================================" >> ${BASENAME}_summary.log echo " E R R O R S U M M A R Y " >> ${BASENAME}_summary.log echo "=================================================================" >> ${BASENAME}_summary.log echo "" >> ${BASENAME}_summary.log echo "***************** CHARGE INJECTION PRE-TEST ******************" >> ${BASENAME}_summary.log echo "Good: 0 / Error: 1" >> ${BASENAME}_summary.log cat ./Charge_inj/report_charge_inj_log.log >> ${BASENAME}_summary.log echo "" >> ${BASENAME}_summary.log echo "" >> ${BASENAME}_summary.log echo "***************** PASA TEST *********************************" >> ${BASENAME}_summary.log echo "Good: 0" >> ${BASENAME}_summary.log echo "Wrong area: 1" >> ${BASENAME}_summary.log echo "Wrong baseline: 2" >> ${BASENAME}_summary.log echo "Phase shift: 3" >> ${BASENAME}_summary.log echo "" >> ${BASENAME}_summary.log cat ./scsnAnalogTests/report_pasa_log.log >> ${BASENAME}_summary.log echo "" >> ${BASENAME}_summary.log echo "***************** R U N -1- (hamming off) ******************" >> ${BASENAME}_summary.log cat trapIntErrors1 >> ${BASENAME}_summary.log echo "***************** R U N -2- (hamming off) ******************" >> ${BASENAME}_summary.log cat trapIntErrors2 >> ${BASENAME}_summary.log echo "***************** R U N -3- (hamming on) ******************" >> ${BASENAME}_summary.log cat trapIntErrors3 >> ${BASENAME}_summary.log echo "***************** R U N -4- (hamming on) ******************" >> ${BASENAME}_summary.log cat trapIntErrors4 >> ${BASENAME}_summary.log close ${BASENAME}_summary.log # Add something missing... (obsolete) #find . -name '*summary.log' -exec perl -pi -e "s/^2006/Date: 2006/g" '{}' ';' # Delete all useless file rm report_qu* rm report_ori* rm trapIntErrors* rm *_res rm *_ini rm report_ni* rm run* rm report_pa* rm chipIds # Get Fingerprints echo "************ GET FINGERPRINTS ********************" #cd $FING_DIR/accumulate_stat #cp $LOG_DIR/scsnAnalogTests/${BASENAME}_base_accu.txt . #cp $LOG_DIR/${BASENAME}_summary.log . #./robread ${BASENAME}_summary.log #./base_anal2 ID.csv > fingerprint.log #mv fingerprint.log $LOG_DIR/${BASENAME}_fingerprint.log #rm ID.csv #rm ${BASENAME}_base_accu.txt #rm ${BASENAME}_summary.log #rm C_* #cd $TOP_DIR #./SCRIPTS_2/runFingerprints echo "**************************************************" # Creating PDF detailed report date2=`/bin/date '+%Y-%m-%d %H:%M:%S'` WRK_DIR=/home/robocop/robTester/svnRobTester/SCRIPTS_2/getPDF cd $WRK_DIR if [ -a $WRK_DIR/${BASENAME}_report.tex ] ; then rm $WRK_DIR/${BASENAME}_report.tex fi cat headerReport.tex > ${BASENAME}_report.tex echo "ROB:} \verb|${BASENAME}| \newline" >> ${BASENAME}_report.tex echo "\textcolor{myred}{" >> ${BASENAME}_report.tex echo "Date: ${date2} \newline" >> ${BASENAME}_report.tex echo "Operator: ${PERSON} \newline" >> ${BASENAME}_report.tex echo "}" >> ${BASENAME}_report.tex echo "\vspace{-2ex}" >> ${BASENAME}_report.tex echo "\begin{flushright}" >> ${BASENAME}_report.tex echo "\begin{minipage}{90mm}" >> ${BASENAME}_report.tex echo " \textcolor{myblue}{This report contains detailed log files from all test runs" >> ${BASENAME}_report.tex echo " including bridge test summary and ORI test report (for ROBs types 3A/3B)." >> ${BASENAME}_report.tex echo " Plots of baseline, noise, PASA test pulses and temperature sensors" >> ${BASENAME}_report.tex echo " are included as well.}" >> ${BASENAME}_report.tex echo "\end{minipage}" >> ${BASENAME}_report.tex echo "\end{flushright}" >> ${BASENAME}_report.tex echo "\textcolor{myred}{\Large Charge Injection Pre-test}\newline" >> ${BASENAME}_report.tex echo "\begin{figure}[h]" >> ${BASENAME}_report.tex echo " \centering" >> ${BASENAME}_report.tex if [ -s $LOG_DIR/scsnAnalogTests/${BASENAME}_baseline.png ] ; then echo " \includegraphics[width=8.5cm,angle=0]{$LOG_DIR/Charge_inj/${BASENAME}_all.png}" >> ${BASENAME}_report.tex else echo " \includegraphics[width=8.5cm,angle=0]{$WRK_DIR/nullPic.png}" >> ${BASENAME}_report.tex fi echo "\end{figure}" >> ${BASENAME}_report.tex echo "\begin{footnotesize}" >> ${BASENAME}_report.tex echo "\begin{verbatim}" >> ${BASENAME}_report.tex echo "Good: 0 / Error: 1">> ${BASENAME}_report.tex echo " ">> ${BASENAME}_report.tex cat $LOG_DIR/Charge_inj/report_charge_inj_log.log >> ${BASENAME}_report.tex echo "\end{verbatim}" >> ${BASENAME}_report.tex echo "\end{footnotesize}" >> ${BASENAME}_report.tex echo "\vspace{2ex}" >> ${BASENAME}_report.tex echo "\newpage" >> ${BASENAME}_report.tex echo "\textcolor{myred}{\Large Baseline}\newline" >> ${BASENAME}_report.tex echo "\begin{figure}[h]" >> ${BASENAME}_report.tex echo " \centering" >> ${BASENAME}_report.tex if [ -s $LOG_DIR/scsnAnalogTests/${BASENAME}_base_accu.png ] ; then echo " \includegraphics[width=8.5cm,angle=0]{$LOG_DIR/scsnAnalogTests/${BASENAME}_base_accu.png}" >> ${BASENAME}_report.tex else echo " \includegraphics[width=8.5cm,angle=0]{$WRK_DIR/nullPic.png}" >> ${BASENAME}_report.tex fi echo "\end{figure}" >> ${BASENAME}_report.tex echo "\begin{figure}[h]" >> ${BASENAME}_report.tex echo " \centering" >> ${BASENAME}_report.tex if [ -s $LOG_DIR/scsnAnalogTests/${BASENAME}_baseline.png ] ; then echo " \includegraphics[width=8.5cm,angle=0]{$LOG_DIR/scsnAnalogTests/${BASENAME}_baseline.png}" >> ${BASENAME}_report.tex else echo " \includegraphics[width=8.5cm,angle=0]{$WRK_DIR/nullPic.png}" >> ${BASENAME}_report.tex fi echo "\end{figure}" >> ${BASENAME}_report.tex echo "\newpage" >> ${BASENAME}_report.tex echo "\textcolor{myred}{\Large PASA test pulse (all channels)}\newline" >> ${BASENAME}_report.tex echo "\textcolor{myblue}{Note: some MCMs have one or two floating channels (channels connected to the neighbouring ROB), namely, MCMs 0, 3, 4, 7, 8, 11, 12, 15.}" >> ${BASENAME}_report.tex echo "\vspace{1cm}" >> ${BASENAME}_report.tex echo "\begin{figure}[h]" >> ${BASENAME}_report.tex echo " \centering" >> ${BASENAME}_report.tex if [ -s $LOG_DIR/scsnAnalogTests/${BASENAME}_m00.png ] ; then echo " \includegraphics[width=8.5cm,angle=0]{$LOG_DIR/scsnAnalogTests/${BASENAME}_m00.png}" >> ${BASENAME}_report.tex else echo " \includegraphics[width=8.5cm,angle=0]{$WRK_DIR/nullPic.png}" >> ${BASENAME}_report.tex fi echo "\end{figure}" >> ${BASENAME}_report.tex echo "\begin{figure}[h]" >> ${BASENAME}_report.tex echo " \centering" >> ${BASENAME}_report.tex if [ -s $LOG_DIR/scsnAnalogTests/${BASENAME}_m01.png ] ; then echo " \includegraphics[width=8.5cm,angle=0]{$LOG_DIR/scsnAnalogTests/${BASENAME}_m01.png}" >> ${BASENAME}_report.tex else echo " \includegraphics[width=8.5cm,angle=0]{$WRK_DIR/nullPic.png}" >> ${BASENAME}_report.tex fi echo "\end{figure}" >> ${BASENAME}_report.tex echo "\newpage" >> ${BASENAME}_report.tex echo "\textcolor{myred}{\Large PASA test pulse (all channels)}\newline" >> ${BASENAME}_report.tex echo "\vspace*{1cm}" >> ${BASENAME}_report.tex echo "\begin{figure}[h]" >> ${BASENAME}_report.tex echo " \centering" >> ${BASENAME}_report.tex if [ -s $LOG_DIR/scsnAnalogTests/${BASENAME}_m02.png ] ; then echo " \includegraphics[width=8.5cm,angle=0]{$LOG_DIR/scsnAnalogTests/${BASENAME}_m02.png}" >> ${BASENAME}_report.tex else echo " \includegraphics[width=8.5cm,angle=0]{$WRK_DIR/nullPic.png}" >> ${BASENAME}_report.tex fi echo "\end{figure}" >> ${BASENAME}_report.tex echo "\begin{figure}[h]" >> ${BASENAME}_report.tex echo " \centering" >> ${BASENAME}_report.tex if [ -s $LOG_DIR/scsnAnalogTests/${BASENAME}_m03.png ] ; then echo " \includegraphics[width=8.5cm,angle=0]{$LOG_DIR/scsnAnalogTests/${BASENAME}_m03.png}" >> ${BASENAME}_report.tex else echo " \includegraphics[width=8.5cm,angle=0]{$WRK_DIR/nullPic.png}" >> ${BASENAME}_report.tex fi echo "\end{figure}" >> ${BASENAME}_report.tex echo "\newpage" >> ${BASENAME}_report.tex echo "\vspace*{1.4cm}" >> ${BASENAME}_report.tex echo "\begin{figure}[h]" >> ${BASENAME}_report.tex echo " \centering" >> ${BASENAME}_report.tex if [ -s $LOG_DIR/scsnAnalogTests/${BASENAME}_m04.png ] ; then echo " \includegraphics[width=8.5cm,angle=0]{$LOG_DIR/scsnAnalogTests/${BASENAME}_m04.png}" >> ${BASENAME}_report.tex else echo " \includegraphics[width=8.5cm,angle=0]{$WRK_DIR/nullPic.png}" >> ${BASENAME}_report.tex fi echo "\end{figure}" >> ${BASENAME}_report.tex echo "\begin{figure}[h]" >> ${BASENAME}_report.tex echo " \centering" >> ${BASENAME}_report.tex if [ -s $LOG_DIR/scsnAnalogTests/${BASENAME}_m05.png ] ; then echo " \includegraphics[width=8.5cm,angle=0]{$LOG_DIR/scsnAnalogTests/${BASENAME}_m05.png}" >> ${BASENAME}_report.tex else echo " \includegraphics[width=8.5cm,angle=0]{$WRK_DIR/nullPic.png}" >> ${BASENAME}_report.tex fi echo "\end{figure}" >> ${BASENAME}_report.tex echo "\newpage" >> ${BASENAME}_report.tex echo "\textcolor{myred}{\Large PASA test pulse (all channels)}\newline" >> ${BASENAME}_report.tex echo "\vspace*{1cm}" >> ${BASENAME}_report.tex echo "\begin{figure}[h]" >> ${BASENAME}_report.tex echo " \centering" >> ${BASENAME}_report.tex if [ -s $LOG_DIR/scsnAnalogTests/${BASENAME}_m06.png ] ; then echo " \includegraphics[width=8.5cm,angle=0]{$LOG_DIR/scsnAnalogTests/${BASENAME}_m06.png}" >> ${BASENAME}_report.tex else echo " \includegraphics[width=8.5cm,angle=0]{$WRK_DIR/nullPic.png}" >> ${BASENAME}_report.tex fi echo "\end{figure}" >> ${BASENAME}_report.tex echo "\begin{figure}[h]" >> ${BASENAME}_report.tex echo " \centering" >> ${BASENAME}_report.tex if [ -s $LOG_DIR/scsnAnalogTests/${BASENAME}_m07.png ] ; then echo " \includegraphics[width=8.5cm,angle=0]{$LOG_DIR/scsnAnalogTests/${BASENAME}_m07.png}" >> ${BASENAME}_report.tex else echo " \includegraphics[width=8.5cm,angle=0]{$WRK_DIR/nullPic.png}" >> ${BASENAME}_report.tex fi echo "\end{figure}" >> ${BASENAME}_report.tex echo "\newpage" >> ${BASENAME}_report.tex echo "\vspace*{1.4cm}" >> ${BASENAME}_report.tex echo "\begin{figure}[h]" >> ${BASENAME}_report.tex echo " \centering" >> ${BASENAME}_report.tex if [ -s $LOG_DIR/scsnAnalogTests/${BASENAME}_m08.png ] ; then echo " \includegraphics[width=8.5cm,angle=0]{$LOG_DIR/scsnAnalogTests/${BASENAME}_m08.png}" >> ${BASENAME}_report.tex else echo " \includegraphics[width=8.5cm,angle=0]{$WRK_DIR/nullPic.png}" >> ${BASENAME}_report.tex fi echo "\end{figure}" >> ${BASENAME}_report.tex echo "\begin{figure}[h]" >> ${BASENAME}_report.tex echo " \centering" >> ${BASENAME}_report.tex if [ -s $LOG_DIR/scsnAnalogTests/${BASENAME}_m09.png ] ; then echo " \includegraphics[width=8.5cm,angle=0]{$LOG_DIR/scsnAnalogTests/${BASENAME}_m09.png}" >> ${BASENAME}_report.tex else echo " \includegraphics[width=8.5cm,angle=0]{$WRK_DIR/nullPic.png}" >> ${BASENAME}_report.tex fi echo "\end{figure}" >> ${BASENAME}_report.tex echo "\newpage" >> ${BASENAME}_report.tex echo "\textcolor{myred}{\Large PASA test pulse (all channels)}\newline" >> ${BASENAME}_report.tex echo "\vspace*{1cm}" >> ${BASENAME}_report.tex echo "\begin{figure}[h]" >> ${BASENAME}_report.tex echo " \centering" >> ${BASENAME}_report.tex if [ -s $LOG_DIR/scsnAnalogTests/${BASENAME}_m10.png ] ; then echo " \includegraphics[width=8.5cm,angle=0]{$LOG_DIR/scsnAnalogTests/${BASENAME}_m10.png}" >> ${BASENAME}_report.tex else echo " \includegraphics[width=8.5cm,angle=0]{$WRK_DIR/nullPic.png}" >> ${BASENAME}_report.tex fi echo "\end{figure}" >> ${BASENAME}_report.tex echo "\begin{figure}[h]" >> ${BASENAME}_report.tex echo " \centering" >> ${BASENAME}_report.tex if [ -s $LOG_DIR/scsnAnalogTests/${BASENAME}_m11.png ] ; then echo " \includegraphics[width=8.5cm,angle=0]{$LOG_DIR/scsnAnalogTests/${BASENAME}_m11.png}" >> ${BASENAME}_report.tex else echo " \includegraphics[width=8.5cm,angle=0]{$WRK_DIR/nullPic.png}" >> ${BASENAME}_report.tex fi echo "\end{figure}" >> ${BASENAME}_report.tex echo "\newpage" >> ${BASENAME}_report.tex echo "\vspace*{1.4cm}" >> ${BASENAME}_report.tex echo "\begin{figure}[h]" >> ${BASENAME}_report.tex echo " \centering" >> ${BASENAME}_report.tex if [ -s $LOG_DIR/scsnAnalogTests/${BASENAME}_m12.png ] ; then echo " \includegraphics[width=8.5cm,angle=0]{$LOG_DIR/scsnAnalogTests/${BASENAME}_m12.png}" >> ${BASENAME}_report.tex else echo " \includegraphics[width=8.5cm,angle=0]{$WRK_DIR/nullPic.png}" >> ${BASENAME}_report.tex fi echo "\end{figure}" >> ${BASENAME}_report.tex echo "\begin{figure}[h]" >> ${BASENAME}_report.tex echo " \centering" >> ${BASENAME}_report.tex if [ -s $LOG_DIR/scsnAnalogTests/${BASENAME}_m13.png ] ; then echo " \includegraphics[width=8.5cm,angle=0]{$LOG_DIR/scsnAnalogTests/${BASENAME}_m13.png}" >> ${BASENAME}_report.tex else echo " \includegraphics[width=8.5cm,angle=0]{$WRK_DIR/nullPic.png}" >> ${BASENAME}_report.tex fi echo "\end{figure}" >> ${BASENAME}_report.tex echo "\newpage" >> ${BASENAME}_report.tex echo "\textcolor{myred}{\Large PASA test pulse (all channels)}\newline" >> ${BASENAME}_report.tex echo "\vspace*{1cm}" >> ${BASENAME}_report.tex echo "\begin{figure}[h]" >> ${BASENAME}_report.tex echo " \centering" >> ${BASENAME}_report.tex if [ -s $LOG_DIR/scsnAnalogTests/${BASENAME}_m14.png ] ; then echo " \includegraphics[width=8.5cm,angle=0]{$LOG_DIR/scsnAnalogTests/${BASENAME}_m14.png}" >> ${BASENAME}_report.tex else echo " \includegraphics[width=8.5cm,angle=0]{$WRK_DIR/nullPic.png}" >> ${BASENAME}_report.tex fi echo "\end{figure}" >> ${BASENAME}_report.tex echo "\begin{figure}[h]" >> ${BASENAME}_report.tex echo " \centering" >> ${BASENAME}_report.tex if [ -s $LOG_DIR/scsnAnalogTests/${BASENAME}_m15.png ] ; then echo " \includegraphics[width=8.5cm,angle=0]{$LOG_DIR/scsnAnalogTests/${BASENAME}_m15.png}" >> ${BASENAME}_report.tex else echo " \includegraphics[width=8.5cm,angle=0]{$WRK_DIR/nullPic.png}" >> ${BASENAME}_report.tex fi echo "\end{figure}" >> ${BASENAME}_report.tex echo "\begin{footnotesize}" >> ${BASENAME}_report.tex echo "\begin{verbatim}" >> ${BASENAME}_report.tex echo "Good:0 / Wrong area: 1 / Wrong Baseline: 2 / Phase shift: 3">> ${BASENAME}_report.tex echo " ">> ${BASENAME}_report.tex cat $LOG_DIR/scsnAnalogTests/report_pasa_log.log >> ${BASENAME}_report.tex echo "\end{verbatim}" >> ${BASENAME}_report.tex echo "\end{footnotesize}" >> ${BASENAME}_report.tex echo "\vspace{2ex}" >> ${BASENAME}_report.tex echo "\newpage" >> ${BASENAME}_report.tex echo "\textcolor{myred}{\Large Noise (rms) measurement}\newline" >> ${BASENAME}_report.tex echo "\vspace*{1cm}" >> ${BASENAME}_report.tex echo "\begin{figure}[h]" >> ${BASENAME}_report.tex echo " \centering" >> ${BASENAME}_report.tex if [ -s $LOG_DIR/scsnAnalogTests/${BASENAME}_rms-x-adc.png ] ; then echo " \includegraphics[width=8.5cm,angle=0]{$LOG_DIR/scsnAnalogTests/${BASENAME}_rms-x-adc.png}" >> ${BASENAME}_report.tex else echo " \includegraphics[width=8.5cm,angle=0]{$WRK_DIR/nullPic.png}" >> ${BASENAME}_report.tex fi echo "\end{figure}" >> ${BASENAME}_report.tex echo "\begin{figure}[h]" >> ${BASENAME}_report.tex echo " \centering" >> ${BASENAME}_report.tex if [ -s $LOG_DIR/scsnAnalogTests/${BASENAME}_rms-x-mcm.png ] ; then echo " \includegraphics[width=8.5cm,angle=0]{$LOG_DIR/scsnAnalogTests/${BASENAME}_rms-x-mcm.png}" >> ${BASENAME}_report.tex else echo " \includegraphics[width=8.5cm,angle=0]{$WRK_DIR/nullPic.png}" >> ${BASENAME}_report.tex fi echo "\end{figure}" >> ${BASENAME}_report.tex echo "\newpage" >> ${BASENAME}_report.tex echo "\textcolor{myred}{\Large Temperature sensors}\newline" >> ${BASENAME}_report.tex echo "\begin{figure}[h]" >> ${BASENAME}_report.tex echo " \centering" >> ${BASENAME}_report.tex if [ -s $LOG_DIR/scsnAnalogTests/${BASENAME}_tempSensors.png ] ; then echo " \includegraphics[width=8.5cm,angle=0]{$LOG_DIR/scsnAnalogTests/${BASENAME}_tempSensors.png}" >> ${BASENAME}_report.tex else echo " \includegraphics[width=8.5cm,angle=0]{$WRK_DIR/nullPic.png}" >> ${BASENAME}_report.tex fi echo "\end{figure}" >> ${BASENAME}_report.tex echo "" >> ${BASENAME}_report.tex echo "\textcolor{myred}{\Large Bridge test summary}\newline" >> ${BASENAME}_report.tex echo "\textcolor{myblue}{Note: For ROBs types 3A/3B, 21 slaves should be succesfully bridged. For" >> ${BASENAME}_report.tex echo " other types (1A, 1B, 2B, 4A, 4B), 18 slaves are expected.}" >> ${BASENAME}_report.tex echo "\begin{footnotesize}" >> ${BASENAME}_report.tex echo "\begin{verbatim}" >> ${BASENAME}_report.tex grep test $LOG_DIR/scsnTest.log >> ${BASENAME}_report.tex echo "\end{verbatim}" >> ${BASENAME}_report.tex echo "\end{footnotesize}" >> ${BASENAME}_report.tex echo "\vspace{2ex}" >> ${BASENAME}_report.tex echo "\textcolor{myred}{\Large QDA test summary (all MCMs)}\newline" >> ${BASENAME}_report.tex echo "\begin{tiny}" >> ${BASENAME}_report.tex echo "\begin{verbatim}" >> ${BASENAME}_report.tex cat $LOG_DIR/dms/dms_all >> ${BASENAME}_report.tex echo "\end{verbatim}" >> ${BASENAME}_report.tex echo "\end{tiny}" >> ${BASENAME}_report.tex echo "\vspace{2ex}" >> ${BASENAME}_report.tex if [ "$ROBTYPE" == "3A" ] || [ "$ROBTYPE" == "3B" ] ; then echo "\textcolor{myred}{\Large ORI test report}\newline" >> ${BASENAME}_report.tex echo "\begin{footnotesize}" >> ${BASENAME}_report.tex echo "\begin{verbatim}" >> ${BASENAME}_report.tex cat $LOG_DIR/ORIreport.log >> ${BASENAME}_report.tex echo "\end{verbatim}" >> ${BASENAME}_report.tex echo "\end{footnotesize}" >> ${BASENAME}_report.tex echo "\vspace{2ex}" >> ${BASENAME}_report.tex fi echo "\textcolor{myred}{\Large TRAP internal test report. Run \textbf{$\triangleleft$ 1 $\triangleright$} with hamming off}\newline" >> ${BASENAME}_report.tex echo "\begin{footnotesize}" >> ${BASENAME}_report.tex echo "\begin{verbatim}" >> ${BASENAME}_report.tex cat $LOG_DIR/trapTests/hammingOff/trapTests_01.log >> ${BASENAME}_report.tex echo "\end{verbatim}" >> ${BASENAME}_report.tex echo "\end{footnotesize}" >> ${BASENAME}_report.tex echo "\vspace{2ex}" >> ${BASENAME}_report.tex echo "\textcolor{myred}{\Large TRAP internal test report. Run \textbf{$\triangleleft$ 2 $\triangleright$} with hamming off}\newline" >> ${BASENAME}_report.tex echo "\begin{footnotesize}" >> ${BASENAME}_report.tex echo "\begin{verbatim}" >> ${BASENAME}_report.tex cat $LOG_DIR/trapTests/hammingOff/trapTests_02.log >> ${BASENAME}_report.tex echo "\end{verbatim}" >> ${BASENAME}_report.tex echo "\end{footnotesize}" >> ${BASENAME}_report.tex echo "\vspace{2ex}" >> ${BASENAME}_report.tex echo "\textcolor{myred}{\Large TRAP internal test report. Run \textbf{$\triangleleft$ 3 $\triangleright$} with hamming on}\newline" >> ${BASENAME}_report.tex echo "\begin{footnotesize}" >> ${BASENAME}_report.tex echo "\begin{verbatim}" >> ${BASENAME}_report.tex cat $LOG_DIR/trapTests/hammingOn/trapTests_01.log >> ${BASENAME}_report.tex echo "\end{verbatim}" >> ${BASENAME}_report.tex echo "\end{footnotesize}" >> ${BASENAME}_report.tex echo "\vspace{2ex}" >> ${BASENAME}_report.tex echo "\textcolor{myred}{\Large TRAP internal test report. Run \textbf{$\triangleleft$ 4 $\triangleright$} with hamming on}\newline" >> ${BASENAME}_report.tex echo "\begin{footnotesize}" >> ${BASENAME}_report.tex echo "\begin{verbatim}" >> ${BASENAME}_report.tex cat $LOG_DIR/trapTests/hammingOn/trapTests_02.log >> ${BASENAME}_report.tex echo "\end{verbatim}" >> ${BASENAME}_report.tex echo "\end{footnotesize}" >> ${BASENAME}_report.tex echo "\vspace{2ex}" >> ${BASENAME}_report.tex echo "\textcolor{myred}{\Large EOF}" >> ${BASENAME}_report.tex echo "\end{sans}" >> ${BASENAME}_report.tex echo "\end{document}" >> ${BASENAME}_report.tex sleep 1 # Running pdflatex pdflatex ${BASENAME}_report.tex mv ${BASENAME}_report.pdf $LOG_DIR # Clean up rm -rf ${BASENAME}_report.tex ${BASENAME}_report.dvi ${BASENAME}_report.aux ${BASENAME}_report.log ${BASENAME}_report.out # Packaging all cd $LOG_DIR if [ "$ROBTYPE" == "3A" ] || [ "$ROBTYPE" == "3B" ] ; then tar -czf ${BASENAME}_all.tgz ${BASENAME}_summary.log ORIreport.log scsnTest.log dms/* Charge_inj/* scsnAnalogTests/* trapTests/* rm -r ORIreport.log scsnTest.log trapTests/ dms/ scsnAnalogTests/ Charge_inj/ Charge_inj_diagn/ else tar -czf ${BASENAME}_all.tgz ${BASENAME}_summary.log scsnTest.log dms/* Charge_inj/* scsnAnalogTests/* trapTests/* rm -r scsnTest.log trapTests/ dms/ scsnAnalogTests/ Charge_inj/ Charge_inj_diagn/ fi cd $TOP_DIR