Improve PhySim build to be shorter
This commit is contained in:
+10
-16
@@ -100,21 +100,16 @@ class PhySim:
|
|||||||
mySSH.command('rm ' + self.__workSpacePath+self.__runLogFile, '\$', 5)
|
mySSH.command('rm ' + self.__workSpacePath+self.__runLogFile, '\$', 5)
|
||||||
mySSH.close()
|
mySSH.close()
|
||||||
#check build result from local compile log file
|
#check build result from local compile log file
|
||||||
buildStatus=False
|
|
||||||
with open(self.__buildLogFile) as f:
|
with open(self.__buildLogFile) as f:
|
||||||
#nr_prachsim is the last compile step
|
if 'BUILD SHOULD BE SUCCESSFUL' in f.read():
|
||||||
if 'nr_prachsim compiled' in f.read():
|
HTML.CreateHtmlTestRow(self.buildargs, 'OK', CONST.ALL_PROCESSES_OK, 'PhySim')
|
||||||
buildStatus=True
|
self.exitStatus=0
|
||||||
#update HTML based on build status
|
return HTML
|
||||||
if buildStatus:
|
logging.error('\u001B[1m Building Physical Simulators Failed\u001B[0m')
|
||||||
HTML.CreateHtmlTestRow(self.buildargs, 'OK', CONST.ALL_PROCESSES_OK, 'LDPC')
|
HTML.CreateHtmlTestRow(self.buildargs, 'KO', CONST.ALL_PROCESSES_OK, 'LDPC')
|
||||||
self.exitStatus=0
|
HTML.CreateHtmlTabFooter(False)
|
||||||
else:
|
#exitStatus=1 will do a sys.exit in main
|
||||||
logging.error('\u001B[1m Building Physical Simulators Failed\u001B[0m')
|
self.exitStatus = 1
|
||||||
HTML.CreateHtmlTestRow(self.buildargs, 'KO', CONST.ALL_PROCESSES_OK, 'LDPC')
|
|
||||||
HTML.CreateHtmlTabFooter(False)
|
|
||||||
#exitStatus=1 will do a sys.exit in main
|
|
||||||
self.exitStatus=1
|
|
||||||
return HTML
|
return HTML
|
||||||
|
|
||||||
|
|
||||||
@@ -163,8 +158,7 @@ class PhySim:
|
|||||||
mySSH.command('source oaienv', '\$', 5)
|
mySSH.command('source oaienv', '\$', 5)
|
||||||
mySSH.command('cd cmake_targets', '\$', 5)
|
mySSH.command('cd cmake_targets', '\$', 5)
|
||||||
mySSH.command('mkdir -p log', '\$', 5)
|
mySSH.command('mkdir -p log', '\$', 5)
|
||||||
mySSH.command('chmod 777 log', '\$', 5)
|
mySSH.command(f'./build_oai {self.buildargs} 2>&1 | tee {self.__buildLogFile}', '\$', 1500)
|
||||||
mySSH.command('stdbuf -o0 ./build_oai ' + self.buildargs + ' 2>&1 | stdbuf -o0 tee ' + self.__buildLogFile, 'Bypassing the Tests|build have failed', 1500)
|
|
||||||
|
|
||||||
mySSH.close()
|
mySSH.close()
|
||||||
#check build status and update HTML object
|
#check build status and update HTML object
|
||||||
|
|||||||
Reference in New Issue
Block a user