Skip to content
Snippets Groups Projects
Commit f14cde00 authored by Pieter Donker's avatar Pieter Donker
Browse files

Task #3805: Changed log dir.

parent b76f4a48
Branches
No related tags found
No related merge requests found
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# tests to do in given levels, level-0 = empty, test can be given as arguments # tests to do in given levels, level-0 = empty, test can be given as arguments
level-0-tests= level-0-tests=
level-1-tests=S1,N1,S3,N3,S5,N5,M 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 level-3-tests=S1,S3
# TBB versions # TBB versions
...@@ -30,5 +30,5 @@ hba-min-deviation=-24 ...@@ -30,5 +30,5 @@ hba-min-deviation=-24
hba-max-deviation=12 hba-max-deviation=12
# General settings # General settings
log-dir=/opt/checkhardware/log log-dir=/globalhome/log
#!/bin/bash #!/bin/bash
logdir="/opt/checkhardware/log/" logdir="/globalhome/log/"
host=`hostname -s` host=`hostname -s`
filenameFrom=$logdir$host"_StationTest.csv" filenameFrom=$logdir$host"_StationTest.csv"
......
#!/bin/bash #!/bin/bash
logdir="/opt/checkhardware/log/" logdir="/globalhome/log/"
host=`hostname -s` host=`hostname -s`
filenameFrom=$logdir$host"_StationTest.csv" filenameFrom=$logdir$host"_StationTest.csv"
......
...@@ -89,10 +89,10 @@ class cStationLogger(cLogger): ...@@ -89,10 +89,10 @@ class cStationLogger(cLogger):
def __init__(self, logdir): def __init__(self, logdir):
filename = "stationtest_" + getHostName() + '.log' filename = "stationtest_" + getHostName() + '.log'
cLogger.__init__(self, logdir, filename) cLogger.__init__(self, logdir, filename)
cLogger.info(self, "#StID >: %s" %(getHostName())) cLogger.info(self, "StID >: %s" %(getHostName()))
cLogger.info(self, "#Lgfl >: %s" %(logdir+filename)) cLogger.info(self, "Lgfl >: %s" %(os.path.join(logdir,filename)))
testdate = time.strftime("%a, %d %b %Y %H:%M:%S", time.localtime()) 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): def addLine(self, info):
cLogger.info(self, info) cLogger.info(self, info)
......
...@@ -12,11 +12,17 @@ sys.path.insert(0, libPath) ...@@ -12,11 +12,17 @@ sys.path.insert(0, libPath)
from general_lib import * 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) log = cStationLogger(logdir)
testfilename = '%s_StationTest.csv' %(getHostName()) testfilename = '%s_StationTest.csv' %(getHostName())
fullFilename = logdir + testfilename fullFilename = os.path.join(logdir, testfilename)
f = open(fullFilename, 'r') f = open(fullFilename, 'r')
testdata = f.readlines() testdata = f.readlines()
f.close() f.close()
......
...@@ -42,10 +42,15 @@ StID = args.get('s', getHostName()) ...@@ -42,10 +42,15 @@ StID = args.get('s', getHostName())
def main(): 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) testfilename = '%s_StationTest.csv' %(StID)
fullFilename = logdir + testfilename fullFilename = os.path.join(logdir, testfilename)
f = open(fullFilename, 'r') f = open(fullFilename, 'r')
data = f.readlines() data = f.readlines()
f.close() f.close()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment