From 1ba2335d6748bf40f882e037b77cd15c4887e9d3 Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" Date: Thu, 4 Apr 2019 14:11:19 +0200 Subject: [PATCH] Added Python scripts --- .gitignore | 5 + buildFucntions.py | 163 +++++++++++++++++ buildSixTrack32Win7.sh | 42 ----- buildSixTrack64Linux.sh | 42 ----- buildSixTrack64Win7.sh | 42 ----- nightlyBuildSixTrack.py | 379 ++++++++++++++++++++++++++++++++++++++++ releaseTestLinux.sh | 42 ----- 7 files changed, 547 insertions(+), 168 deletions(-) create mode 100644 .gitignore create mode 100644 buildFucntions.py delete mode 100755 buildSixTrack32Win7.sh delete mode 100755 buildSixTrack64Linux.sh delete mode 100755 buildSixTrack64Win7.sh create mode 100755 nightlyBuildSixTrack.py delete mode 100755 releaseTestLinux.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3ec6476 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +__pycache__ +apiKey.dat +*.log +test*.py + diff --git a/buildFucntions.py b/buildFucntions.py new file mode 100644 index 0000000..9e781c9 --- /dev/null +++ b/buildFucntions.py @@ -0,0 +1,163 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -* +"""SixTrack Nightly Builds + + SixTrack Nightly Builds + ========================= + Loop through and build SixTrack with various compilers and flags + By: Veronica Berglyd Olsen + CERN (BE-ABP-HSS) + Geneva, Switzerland + +""" + +import logging +import requests +import subprocess +from os import path +from datetime import datetime +from hashlib import md5 + +logger = logging.getLogger("SixTrackTestBuild") + +# Set up logging +def setupLogging(dLog): + logFmt = logging.Formatter(fmt="[%(asctime)s] %(levelname)-8s %(message)s",datefmt="%Y-%m-%d %H:%M:%S") + + fHandle = logging.FileHandler(dLog+"/testBuildSixTrack-"+datetime.now().strftime("%Y-%m")+".log") + fHandle.setLevel(logging.DEBUG) + fHandle.setFormatter(logFmt) + logger.addHandler(fHandle) + + cHandle = logging.StreamHandler() + cHandle.setLevel(logging.DEBUG) + cHandle.setFormatter(logFmt) + logger.addHandler(cHandle) + + logger.setLevel(logging.DEBUG) + +# Wrapper function for system calls +def sysCall(callStr): + sysP = subprocess.Popen([callStr], stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) + stdOut, stdErr = sysP.communicate() + return stdOut.decode("utf-8"), stdErr.decode("utf-8"), sysP.returncode + +# Command line output wrapper +def logWrap(outTag, stdOut, stdErr, exCode): + outLns = stdOut.split("\n") + errLns = stdErr.split("\n") + for outLn in outLns: + if outLn.strip() == "": + continue + logger.debug("%s> %s" % (outTag, outLn)) + if exCode is not 0: + for errLn in errLns: + if errLn.strip() == "": + continue + logger.error("%s> %s" % (outTag, errLn)) + logger.error("%s> Exited with code %d" % (outTag, exCode)) + exit(1) + +def cmakeSixReturn(stdOut, stdErr): + outLns = stdOut.split("\n") + errLns = stdErr.split("\n") + bPath = "" + if len(outLns) > 1: + tmpData = outLns[-2].split() + if len(tmpData) > 0: + bPath = tmpData[-1] + return bPath + +def ctestReturn(stdOut, stdErr): + outLns = stdOut.split("\n") + tFailed = "" + if len(outLns) <= 2: + logger.debug("CTEST> %s" % outLns[-1]) + else: + atSum = False + atFail = False + for outLn in outLns: + outLn = outLn.strip() + if outLn == "": + atSum = True + continue + if not atSum: + continue + if not outLn == "": + logger.debug("CTEST> %s" % outLn.strip()) + if outLn.strip() == "The following tests FAILED:": + atFail = True + continue + if atFail: + splFail = outLn.split() + if len(splFail) == 4: + if splFail[3] == "(Failed)": + tFailed += splFail[2]+", " + if atFail: + tFailed = tFailed[:-2] + return tFailed + +def ctestResult(stdOut, stdErr): + outLns = stdOut.split("\n") + nTotal = 0 + nPass = 0 + nFail = 0 + tFail = [] + if len(outLns) <= 2: + logger.debug("CTEST> %s" % outLns[-1]) + else: + for outLn in outLns: + outBit = outLn.strip().replace("*"," ").split() + if len(outBit) < 6: + continue + if outBit[1] != "Test" or outBit[2][:1] != "#": + continue + nTotal += 1 + if outBit[5] == "Passed": + nPass += 1 + if outBit[5] == "Failed": + nFail += 1 + tFail.append(outBit[3]) + return nTotal, nPass, nFail, tFail + +def ctestCoverage(stdOut,stdErr): + outLns = stdOut.split("\n") + cLOC = 0 + nLOC = 0 + nTot = 0 + if len(outLns) < 3: + logger.error("CCOV> Cannot parse covergae output") + else: + cLoc = (outLns[0].split())[-1] + nLoc = (outLns[1].split())[-1] + nTot = (outLns[2].split())[-1] + return nTot, cLoc, nLoc + +def sendData(theData): + stUrl = "http://sixtrack.web.cern.ch/SixTrack/build_status.php" + try: + retVal = requests.post(stUrl, data=theData) + logger.debug(" * Sending data: %s" % retVal.text) + except: + logger.error(" * Failed to send data to SixTrack website") + +def genApiKey(keyFile): + try: + with open(keyFile,mode="r") as inFile: + keySalt = inFile.read().strip() + except: + logger.error(" * Could not find API key file") + return md5((datetime.now().strftime("%Y%m%d")+"-"+keySalt).encode("utf-8")).hexdigest() + +def getExecTime(tPath): + simTime = path.join(tPath,"sim_time.dat") + if not path.isfile(simTime): + return None + with open(simTime,mode="r") as tFile: + for tLine in tFile: + tName = tLine[:32].strip() + tVal = tLine[35:49].strip() + if tName == "Stamp_BeforeExit": + return tVal + return "Unknown" + diff --git a/buildSixTrack32Win7.sh b/buildSixTrack32Win7.sh deleted file mode 100755 index 99757fd..0000000 --- a/buildSixTrack32Win7.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash - -if [ -z "$1" ]; then - echo "Please specify a version number" - exit 1 -fi -VERSION=$1 -BINS=/h/Code/SixTrack/Releases/$VERSION -BUILD="-DCMAKE_Fortran_COMPILER=gfortran -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release" -mkdir -p $BINS - -rm -rf build_exec1 -mkdir -p build_exec1 -cd build_exec1 -eval cmake .. -G \"Unix Makefiles\" $BUILD -D64BIT=OFF -D32BIT=ON -make -j4 -cp SixTrack_$VERSION_* $BINS/SixTrack_$VERSION\_Win7_static_32bit_double.exe -cd .. - -rm -rf build_exec2 -mkdir -p build_exec2 -cd build_exec2 -eval cmake .. -G \"Unix Makefiles\" $BUILD -D64BIT=OFF -D32BIT=ON -DAVX=ON -make -j4 -cp SixTrack_$VERSION_* $BINS/SixTrack_$VERSION\_Win7_static_avx_32bit_double.exe -cd .. - -rm -rf build_exec3 -mkdir -p build_exec3 -cd build_exec3 -eval cmake .. -G \"Unix Makefiles\" $BUILD -D64BIT=OFF -D32BIT=ON -DBOINC=ON -DAPI=ON -DLIBARCHIVE=ON -DCR=ON -make -j4 -cp SixTrack_$VERSION_* $BINS/SixTrack_$VERSION\_boinc_Win7_static_32bit_double.exe -cd .. - -rm -rf build_exec4 -mkdir -p build_exec4 -cd build_exec4 -eval cmake .. -G \"Unix Makefiles\" $BUILD -D64BIT=OFF -D32BIT=ON -DBOINC=ON -DAPI=ON -DLIBARCHIVE=ON -DCR=ON -DAVX=ON -make -j4 -cp SixTrack_$VERSION_* $BINS/SixTrack_$VERSION\_boinc_Win7_static_avx_32bit_double.exe -cd .. diff --git a/buildSixTrack64Linux.sh b/buildSixTrack64Linux.sh deleted file mode 100755 index 035ab8d..0000000 --- a/buildSixTrack64Linux.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash - -if [ -z "$1" ]; then - echo "Please specify a version number" - exit 1 -fi -VERSION=$1 -BINS=/afs/cern.ch/user/v/volsen/SixTrack/Releases/$VERSION -BUILD="-DCMAKE_Fortran_COMPILER=gfortran -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release" -mkdir -p $BINS - -rm -rf build_exec1 -mkdir -p build_exec1 -cd build_exec1 -eval cmake .. $BUILD -make -j4 -cp SixTrack_$VERSION_* $BINS/SixTrack_$VERSION\_Linux_static_64bit_double -cd .. - -rm -rf build_exec2 -mkdir -p build_exec2 -cd build_exec2 -eval cmake .. $BUILD -DAVX=ON -make -j4 -cp SixTrack_$VERSION_* $BINS/SixTrack_$VERSION\_Linux_static_avx_64bit_double -cd .. - -rm -rf build_exec3 -mkdir -p build_exec3 -cd build_exec3 -eval cmake .. $BUILD -DBOINC=ON -DAPI=ON -DLIBARCHIVE=ON -DCR=ON -make -j4 -cp SixTrack_$VERSION_* $BINS/SixTrack_$VERSION\_boinc_Linux_static_64bit_double -cd .. - -rm -rf build_exec4 -mkdir -p build_exec4 -cd build_exec4 -eval cmake .. $BUILD -DBOINC=ON -DAPI=ON -DLIBARCHIVE=ON -DCR=ON -DAVX=ON -make -j4 -cp SixTrack_$VERSION_* $BINS/SixTrack_$VERSION\_boinc_Linux_static_avx_64bit_double -cd .. diff --git a/buildSixTrack64Win7.sh b/buildSixTrack64Win7.sh deleted file mode 100755 index 167abb9..0000000 --- a/buildSixTrack64Win7.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash - -if [ -z "$1" ]; then - echo "Please specify a version number" - exit 1 -fi -VERSION=$1 -BINS=/h/Code/SixTrack/Releases/$VERSION -BUILD="-DCMAKE_Fortran_COMPILER=gfortran -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release" -mkdir -p $BINS - -rm -rf build_exec1 -mkdir -p build_exec1 -cd build_exec1 -eval cmake .. -G \"Unix Makefiles\" $BUILD -make -j4 -cp SixTrack_$VERSION_* $BINS/SixTrack_$VERSION\_Win7_static_64bit_double.exe -cd .. - -rm -rf build_exec2 -mkdir -p build_exec2 -cd build_exec2 -eval cmake .. -G \"Unix Makefiles\" $BUILD -DAVX=ON -make -j4 -cp SixTrack_$VERSION_* $BINS/SixTrack_$VERSION\_Win7_static_avx_64bit_double.exe -cd .. - -rm -rf build_exec3 -mkdir -p build_exec3 -cd build_exec3 -eval cmake .. -G \"Unix Makefiles\" $BUILD -DBOINC=ON -DAPI=ON -DLIBARCHIVE=ON -DCR=ON -make -j4 -cp SixTrack_$VERSION_* $BINS/SixTrack_$VERSION\_boinc_Win7_static_64bit_double.exe -cd .. - -rm -rf build_exec4 -mkdir -p build_exec4 -cd build_exec4 -eval cmake .. -G \"Unix Makefiles\" $BUILD -DBOINC=ON -DAPI=ON -DLIBARCHIVE=ON -DCR=ON -DAVX=ON -make -j4 -cp SixTrack_$VERSION_* $BINS/SixTrack_$VERSION\_boinc_Win7_static_avx_64bit_double.exe -cd .. diff --git a/nightlyBuildSixTrack.py b/nightlyBuildSixTrack.py new file mode 100755 index 0000000..acffae1 --- /dev/null +++ b/nightlyBuildSixTrack.py @@ -0,0 +1,379 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -* +"""SixTrack Nightly Builds + + SixTrack Nightly Builds + ========================= + Loop through and build SixTrack with various compilers and flags + By: Veronica Berglyd Olsen + CERN (BE-ABP-HSS) + Geneva, Switzerland + +""" + +import sys +import time +import logging +from os import path, chdir, mkdir, listdir +from datetime import datetime +from buildFucntions import * + +logger = logging.getLogger("SixTrackTestBuild") + +## +# Settings +## + +dRoot = "/scratch/TestBuild" +dLog = "/scratch/TestBuild/Logs" +dSource = "/scratch/TestBuild/Source/SixTrack" +testTime = "/scratch/TestBuild/Timing" +keyFile = path.join(path.dirname(path.realpath(__file__)),"apiKey.dat") + +nBld = 8 +nTest = 10 +nCov = 14 + +theCompilers = { + "g" : {"exec" : "gfortran", "version": "--version"}, + "i" : {"exec" : "ifort", "version": "--version"}, + "n" : {"exec" : "nagfor", "version": "-V"} +} + +ctFF = "-L fast" +ctFM = "-L 'fast|medium'" +ctNS = "-E prob" + +theBuilds = { + # Label Compilers Options Tests (rel/dbg) + "Standard Single" : [["g","i","n"], "-64BITM -CRLIBM 32BITM", [None,None]], + "Standard Double" : [["g","i","n"], "", [ctNS,ctNS]], + "Standard Quad" : [["g","i","n"], "-64BITM -CRLIBM 128BITM", [None,None]], + "Round Up" : [["g","i","n"], "-ROUND_NEAR ROUND_UP", [None,None]], + "Round Down" : [["g","i","n"], "-ROUND_NEAR ROUND_DOWN", [None,None]], + "Round Zero" : [["g","i","n"], "-ROUND_NEAR ROUND_ZERO", [None,None]], + "No SingleTrackFile" : [["g","i","n"], "-STF", [ctFF,ctFF]], + "Checkpoint/Restart" : [["g","i","n"], "CR", [ctNS,ctFF]], + "libArchive Support" : [["g","i","n"], "LIBARCHIVE", [None,None]], + "BOINC Support" : [["g","i","n"], "CR BOINC LIBARCHIVE", [ctNS,ctFF]], + "Fortran I/O" : [["g","i","n"], "FIO", [ctFF,ctFF]], + "HDF5" : [["g"], "HDF5", [None,None]], + "Pythia" : [["g","i","n"], "PYTHIA", [None,None]], + "Beam-Gas" : [["g","i","n"], "BEAMGAS", [None,None]], + "Fluka Coupling" : [["g","i","n"], "FLUKA", [None,None]], + "Merlin Scattering" : [["g","i","n"], "MERLINSCATTER", [None,None]], + "DEBUG Flag" : [["g","i","n"], "DEBUG", [None,None]], +} + +# theBuilds = { +# "Standard Double" : [["g"], "", [ctFF,ctFF]], +# } + +setupLogging(dLog) + +logger.info("*"*80) +logger.info("* Starting New Test Build Session") +logger.info("*"*80) + +# Get compiler versions +cExecs = [] +for bComp in theCompilers.keys(): + cExecs.append(theCompilers[bComp]["exec"]) + stdOut, stdErr, exCode = sysCall("%s %s" % (theCompilers[bComp]["exec"], theCompilers[bComp]["version"])) + tmpLn = (stdOut+stdErr).split("\n") + theCompilers[bComp]["version"] = tmpLn[0] + if not exCode == 0: + logger.error("There is a problem with the %s compiler" % bComp) + logWrap("COMPILER",stdOut,stdErr,exCode) + +# Repository +chdir(dSource) +logger.info("Entering directory: %s" % dSource) +logger.info("Updating source ...") + +stdOut, stdErr, exCode = sysCall("git remote update") +logWrap("GIT",stdOut,stdErr,exCode) + +stdOut, stdErr, exCode = sysCall("git checkout master") +logWrap("GIT",stdOut,stdErr,exCode) + +stdOut, stdErr, exCode = sysCall("git pull") +logWrap("GIT",stdOut,stdErr,exCode) + +logger.info("Done!") + +# Meta Data + +stdOut, stdErr, exCode = sysCall("git log -n1 --pretty=format:%H") +gitHash = stdOut.strip() +prevHash = "None" +logger.info("Current git hash: %s" % gitHash) + +stdOut, stdErr, exCode = sysCall("git show -s --format=%%ci %s | tail -n1" % gitHash) +gitTime = (stdOut.strip())[:19] +logger.info("Commit date: %s" % gitTime) + +if path.isfile(path.join(dRoot,"prevHash.dat")): + with open(path.join(dRoot,"prevHash.dat"),mode="r") as hFile: + prevHash = hFile.read() +with open(path.join(dRoot,"prevHash.dat"),mode="w") as hFile: + hFile.write(gitHash) + +logger.info("Previous git hash: %s" % prevHash) +if gitHash == prevHash: + logger.info("No change to origin/master since last time. Exiting.") + exit(0) + +stdOut, stdErr, exCode = sysCall("uname -rsm") +runOS = stdOut.strip() +logger.info("Running on: %s" % runOS) + +tJobs = [] +for bBuild in theBuilds: + if theBuilds[bBuild][2][0] is not None or theBuilds[bBuild][2][1] is not None: + tJobs.append(bBuild) + +theMeta = { + "action" : "meta", + "apikey" : genApiKey(keyFile), + "runtime" : time.time(), + "hash" : gitHash, + "ctime" : gitTime, + "os" : runOS, + "complist" : ",".join(cExecs), + "buildlist" : ",".join(theBuilds.keys()), + "testlist" : ",".join(tJobs), + "endtime" : -1, + "coverage" : False, + "covloc" : 0, + "ncovloc" : 0, + "totloc" : 0, + "prevcov" : "", +} +sendData(theMeta) + +## +# Builds +## + +logger.info("Executing build queue ...") +bCount = 0 +cTests = [] +cCleanup = [] +theTypes = ["Release","Debug"] +for bComp in theCompilers.keys(): + for iType in range(2): + for bBuild in theBuilds.keys(): + + bldExec = theCompilers[bComp]["exec"] + bldType = theTypes[iType] + bldComp = theBuilds[bBuild][0] + bldOpts = theBuilds[bBuild][1] + testCmd = theBuilds[bBuild][2][iType] + bCount += 1 + + # Build Command + sysCmd = "./cmake_six %s %s %s" % (bldExec,bldType.lower(),bldOpts) + sysCmd = sysCmd.strip() + if testCmd is not None: + sysCmd += " BUILD_TESTING" + + logger.info("Build %03d: %s" % (bCount, sysCmd)) + + # Results Record + bStatus = { + "action" : "build", + "apikey" : "", + "timestamp" : time.time(), + "hash" : gitHash, + "compiler" : bldExec, + "type" : bldType, + "build" : False, + "flag" : bBuild, + "command" : sysCmd, + "buildno" : bCount, + "success" : False, + "path" : "", + "testcmd" : "", + "buildtime" : -1, + } + + # Check if Should Be Built + if bComp in bldComp: + + # Execute Build + tStart = time.time() + stdOut, stdErr, exCode = sysCall(sysCmd) + tEnd = time.time() - tStart + + # Parse Results + if exCode == 0: + logger.info(" * Build Successful!") + bPath = cmakeSixReturn(stdOut,stdErr) + logger.info(" * Executable in: %s" % bPath) + bStatus["success"] = True + bStatus["path"] = bPath + if testCmd is not None: + bStatus["testcmd"] = "ctest %s -j%d" % (testCmd,nTest) + logger.info(" * Adding executable to test queue") + cTests.append(bStatus) + else: + cCleanup.append(bPath) + else: + logger.warning(" * Build Failed!") + + bStatus["build"] = True + bStatus["buildtime"] = tEnd + + # Send Report + bStatus["apikey"] = genApiKey(keyFile) + sendData(bStatus) + +logger.info("Build queue done!") + +## +# Tests +## + +logger.info("Executing test queue ...") +tCount = 0 +for toRun in cTests: + tCount += 1 + chdir(path.join(dSource,toRun["path"])) + logger.info("Test %03d: %s" % (tCount, toRun["path"])) + logger.info(" * Command: %s" % (toRun["testcmd"])) + tStatus = toRun + tStatus["action"] = "test" + tStatus["testno"] = tCount + tStatus["timestamp"] = time.time() + + tStart = time.time() + stdOut, stdErr, exCode = sysCall(toRun["testcmd"]) + tEnd = time.time() - tStart + tStatus["testtime"] = tEnd + + chdir(dSource) + if exCode == 0: + logger.info(" * Tests Passed!") + tStatus["passtests"] = True + cCleanup.append(toRun["path"]) + else: + logger.warning(" * Tests Failed!") + tStatus["passtests"] = False + + nTotal, nPass, nFail, tFail = ctestResult(stdOut,stdErr) + for failName in tFail: + logger.warning(" * Failed: %s" % failName) + + tStatus["failed"] = ", ".join(tFail) + tStatus["ntotal"] = nTotal + tStatus["npass"] = nPass + tStatus["nfail"] = nFail + + # Send Report + tStatus["apikey"] = genApiKey(keyFile) + sendData(tStatus) + + # Log Timing + for tItem in listdir(path.join(toRun["path"],"test")): + tPath = path.join(toRun["path"],"test",tItem) + if path.isdir(tPath): + execTime = getExecTime(tPath) + if execTime is None: + continue + timPath = path.join(testTime,tItem+".dat") + if tItem in tFail: + tRes = "Failed" + else: + tRes = "Passed" + with open(timPath,mode="a") as outFile: + tStamp = datetime.fromtimestamp(tStatus["timestamp"]).strftime("%Y-%m-%d %H:%M:%S") + outFile.write("[%s] %40s %19s %14s %6s Build: %s\n" % ( + tStamp, + gitHash, + gitTime, + execTime, + tRes, + tStatus["command"][12:] + )) + +logger.info("Test queue done!") + +## +# Coverage +## + +logger.info("Beginning coverage ...") + +chdir(dSource) +sysCmd = "./cmake_six gfortran release BUILD_TESTING COVERAGE" +logger.info("Coverage Build: %s" % sysCmd) +tStart = time.time() +stdOut, stdErr, bexCode = sysCall(sysCmd) +tEnd = time.time() - tStart + +if bexCode == 0: + logger.info(" * Coverage Build Successful!") + bPath = cmakeSixReturn(stdOut,stdErr) + logger.info(" * Executable in: %s" % bPath) + + # Run Tests + chdir(path.join(dSource,bPath)) + sysCmd = "ctest -E prob -j%d" % nCov + logger.info("Coverage Test: %s" % sysCmd) + tStart = time.time() + stdOut, stdErr, texCode = sysCall(sysCmd) + tEnd = time.time() - tStart + + # Compute Coverage + sysCmd = "ctest -D NightlyCoverage | tail -n4" + logger.info("Calculating Coverage: %s" % sysCmd) + stdOut, stdErr, cexCode = sysCall(sysCmd) + nTot, cLoc, nLoc = ctestCoverage(stdOut,stdErr) + theMeta["coverage"] = True + theMeta["covloc"] = cLoc + theMeta["ncovloc"] = nLoc + theMeta["totloc"] = nTot + + if texCode == 0: + logger.info(" * Coverage Tests Completed!") + logger.info(" * Coverage is: %6.2f %%" % (100*int(cLoc)/int(nTot))) + cCleanup.append(bPath) + else: + logger.warning(" * Coverage Tests Failed!") + + if path.isfile(path.join(dRoot,"prevCoverage.dat")): + with open(path.join(dRoot,"prevCoverage.dat"),mode="r") as cFile: + theMeta["prevcov"] = cFile.read() + with open(path.join(dRoot,"prevCoverage.dat"),mode="w") as cFile: + cFile.write("%s;%s;%s;%s" % (gitHash,nTot,cLoc,nLoc)) + +else: + logger.warning(" * Coverage Build Failed!") + +chdir(dSource) +logger.info("Coverage done!") + +## +# Cleanup +## + +logger.info("Beginning cleanup ...") +for rPath in cCleanup: + stdOut, stdErr, exCode = sysCall("rm -r %s" % rPath) + if exCode == 0: + logger.info("Deleting: %s ... OK" % rPath) + else: + logger.info("Deleting: %s ... Failed" % rPath) +logger.info("Cleanup done!") + +## +# Finish +## + +theMeta["apikey"] = genApiKey(keyFile), +theMeta["endtime"] = time.time(), +sendData(theMeta) + +logger.info("All Done!") +logger.info("") diff --git a/releaseTestLinux.sh b/releaseTestLinux.sh deleted file mode 100755 index 2d342a9..0000000 --- a/releaseTestLinux.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash - -cd /home/vkbo/Temp -mkdir -pv SixTrackLinux -cd SixTrackLinux -if [ ! -d ".git" ]; then - git clone https://github.com/SixTrack/SixTrack.git . -fi - -rm *_test*.log -git fetch master -git pull - -rm -rf build_testStandard -mkdir -p build_testStandard -cd build_testStandard -cmake .. -DCMAKE_Fortran_COMPILER=gfortran -DBUILD_TESTING=ON | tee ../cmake_testStandard.log -make -j4 | tee ../make_testStandard.log -cd .. - -rm -rf build_testCR -mkdir -p build_testCR -cd build_testCR -cmake .. -DCMAKE_Fortran_COMPILER=gfortran -DBUILD_TESTING=ON -DCR=ON | tee ../cmake_testCR.log -make -j4 | tee ../make_testCR.log -cd .. - -cd build_testStandard -ctest -L fast -E elens -j4 | tee ../ctestFast_testStandard.log -cd .. - -cd build_testCR -ctest -L fast -E elens -j4 | tee ../ctestFast_testCR.log -cd .. - -cd build_testStandard -ctest -L medium -E elens -j4 | tee ../ctestMedium_testStandard.log -cd .. - -cd build_testCR -ctest -L medium -E elens -j4 | tee ../ctestMedium_testCR.log -cd ..