diff --git a/LCU/checkhardware/checkHardware.conf b/LCU/checkhardware/checkHardware.conf index c4c97a922460984b1db38193fa1f36ef5c147b85..0c53a7c501770f7a304e3178e5a09550fadb5cbb 100644 --- a/LCU/checkhardware/checkHardware.conf +++ b/LCU/checkhardware/checkHardware.conf @@ -3,7 +3,7 @@ # tests to do in given levels, level-0 = empty, test can be given as arguments level-0-tests= level-1-tests=S1,N1,S3,N3,S5,N5,M -level-2-tests=RV,TV,TM,S1,S3,S5,N1,N3,N5,M +level-2-tests=RV,TV,TM,S1,S3,S5,N1,N3,N5,NE,M level-3-tests=S1,S3 # TBB versions @@ -30,5 +30,5 @@ hba-min-deviation=-24 hba-max-deviation=12 # General settings -log-dir=/opt/checkhardware/log +log-dir=/globalhome/log diff --git a/LCU/checkhardware/doFullStationTest.sh b/LCU/checkhardware/doFullStationTest.sh index c998f148a2baf3e46b8e35d44ffd598675909bb8..2d6275405c45e31e5ed56c40a4361bd2c0503f3b 100755 --- a/LCU/checkhardware/doFullStationTest.sh +++ b/LCU/checkhardware/doFullStationTest.sh @@ -1,6 +1,6 @@ #!/bin/bash -logdir="/opt/checkhardware/log/" +logdir="/globalhome/log/" host=`hostname -s` filenameFrom=$logdir$host"_StationTest.csv" diff --git a/LCU/checkhardware/doShortStationTest.sh b/LCU/checkhardware/doShortStationTest.sh index 5639338de0420a5a6f22b3676fd244959785b5f9..75cf1d29af752683308a81261e349b282cb255e6 100755 --- a/LCU/checkhardware/doShortStationTest.sh +++ b/LCU/checkhardware/doShortStationTest.sh @@ -1,6 +1,6 @@ #!/bin/bash -logdir="/opt/checkhardware/log/" +logdir="/globalhome/log/" host=`hostname -s` filenameFrom=$logdir$host"_StationTest.csv" diff --git a/LCU/checkhardware/lib/general_lib.py b/LCU/checkhardware/lib/general_lib.py index cdaa97a26a759d9de060321a5df83717b8dfa6e2..e4079296aaad44fe0fa6232d96f851411e1b4e2e 100644 --- a/LCU/checkhardware/lib/general_lib.py +++ b/LCU/checkhardware/lib/general_lib.py @@ -89,10 +89,10 @@ class cStationLogger(cLogger): def __init__(self, logdir): filename = "stationtest_" + getHostName() + '.log' cLogger.__init__(self, logdir, filename) - cLogger.info(self, "#StID >: %s" %(getHostName())) - cLogger.info(self, "#Lgfl >: %s" %(logdir+filename)) + cLogger.info(self, "StID >: %s" %(getHostName())) + cLogger.info(self, "Lgfl >: %s" %(os.path.join(logdir,filename))) testdate = time.strftime("%a, %d %b %Y %H:%M:%S", time.localtime()) - cLogger.info(self, "#Time >: %s" %(testdate)) + cLogger.info(self, "Time >: %s" %(testdate)) def addLine(self, info): cLogger.info(self, info) diff --git a/LCU/checkhardware/makeStationLogFile.py b/LCU/checkhardware/makeStationLogFile.py index 29eb61dcb6407632b46a5df10940b88f75014343..0158d80120212ef9156816ffca563d8628ddeb3d 100755 --- a/LCU/checkhardware/makeStationLogFile.py +++ b/LCU/checkhardware/makeStationLogFile.py @@ -12,11 +12,17 @@ sys.path.insert(0, libPath) from general_lib import * -logdir = '/opt/checkhardware/log/' +f = open("checkHardware.conf", 'r') +data = f.readlines() +f.close() +for line in data: + if line.find('log-dir') != -1: + key, logdir = line.strip().split('=') + log = cStationLogger(logdir) testfilename = '%s_StationTest.csv' %(getHostName()) -fullFilename = logdir + testfilename +fullFilename = os.path.join(logdir, testfilename) f = open(fullFilename, 'r') testdata = f.readlines() f.close() diff --git a/LCU/checkhardware/showTestResult.py b/LCU/checkhardware/showTestResult.py index 2ef3b41ad216084f5f6bda61bc1eff38b7dc13ee..8681604ca83b95c4932ee3a7ba601b721f5d38d5 100755 --- a/LCU/checkhardware/showTestResult.py +++ b/LCU/checkhardware/showTestResult.py @@ -42,10 +42,15 @@ StID = args.get('s', getHostName()) def main(): - logdir = '/opt/checkhardware/log/' + f = open("checkHardware.conf", 'r') + data = f.readlines() + f.close() + for line in data: + if line.find('log-dir') != -1: + key, logdir = line.strip().split('=') testfilename = '%s_StationTest.csv' %(StID) - fullFilename = logdir + testfilename + fullFilename = os.path.join(logdir, testfilename) f = open(fullFilename, 'r') data = f.readlines() f.close()