Compare commits

...

2 Commits
0.3.0 ... 0.4.0

Author SHA1 Message Date
2a58657df5 [DEV] add gcov property 2014-11-25 22:07:48 +01:00
288207e4e1 [DEBUG] package copy subDirectory 2014-10-22 21:23:56 +02:00
4 changed files with 32 additions and 8 deletions

View File

@@ -36,6 +36,7 @@ myLutinArg.add(lutinArg.ArgDefine("a", "arch", list=[["auto","Automatic choice"]
myLutinArg.add(lutinArg.ArgDefine("b", "bus", list=[["auto","Automatic choice"],["32","32 bits"],["64","64 bits"]], desc="Adressing size (Bus size)"))
myLutinArg.add(lutinArg.ArgDefine("r", "prj", desc="Use external project management (not build with lutin..."))
myLutinArg.add(lutinArg.ArgDefine("p", "package", desc="Disable the package generation (usefull when just compile for test on linux ...)"))
myLutinArg.add(lutinArg.ArgDefine("g", "gcov", desc="Enable code coverage intrusion in code"))
myLutinArg.add(lutinArg.ArgDefine("", "simulation", desc="simulater mode (availlable only for IOS)"))
myLutinArg.add(lutinArg.ArgDefine("", "list-target", desc="list all availlables targets ==> for auto completion"))
myLutinArg.add(lutinArg.ArgDefine("", "list-module", desc="list all availlables module ==> for auto completion"))
@@ -141,7 +142,8 @@ def Start():
"arch":"auto",
"generate-package":True,
"simulation":False,
"extern-build":False
"extern-build":False,
"gcov":False
}
# load the default target :
target = None
@@ -154,6 +156,8 @@ def Start():
config["generate-package"]=False
elif argument.get_option_nName() == "simulation":
config["simulation"]=True
elif argument.get_option_nName() == "gcov":
config["gcov"]=True
elif argument.get_option_nName() == "prj":
config["extern-build"]=True
elif argument.get_option_nName() == "bus":
@@ -179,7 +183,8 @@ def Start():
"arch":"auto",
"generate-package":True,
"simulation":False,
"extern-build":False
"extern-build":False,
"gcov":False
}
#remove previous target
target = None

View File

@@ -428,7 +428,7 @@ class Module:
##
def folders_to_staging(self, binaryName, target):
for source, destination in self.folders:
debug.verbose("Might copy folder : " + source + "==>" + destination)
debug.debug("Might copy folder : " + source + "==>" + destination)
lutinTools.copy_anything_target(target, self.originFolder + "/" + source, destination)
# call here to build the module
@@ -471,7 +471,9 @@ class Module:
or fileExt == "cxx" \
or fileExt == "CXX" \
or fileExt == "xx" \
or fileExt == "XX":
or fileExt == "XX" \
or fileExt == "CC" \
or fileExt == "cc":
resFile = self.compile_xx_to_o(file, packageName, target, self.subHeritageList)
listSubFileNeededTobuild.append(resFile)
elif fileExt == "mm" \

View File

@@ -89,6 +89,14 @@ class Target:
else:
self.global_flags_cc.append("-DNDEBUG")
self.global_flags_cc.append("-O3")
## To add code coverate on build result system
if self.config["gcov"] == True:
self.global_flags_cc.append("-fprofile-arcs")
self.global_flags_cc.append("-ftest-coverage")
self.global_flags_ld.append("-fprofile-arcs")
self.global_flags_ld.append("-ftest-coverage")
self.update_folder_tree()
self.folder_bin="/usr/bin"
self.folder_lib="/usr/lib"

View File

@@ -105,25 +105,34 @@ def copy_anything(src, dst):
tmpPath = os.path.dirname(os.path.realpath(src))
tmpRule = os.path.basename(src)
for root, dirnames, filenames in os.walk(tmpPath):
debug.verbose(" root='" + str(root) + "' dir='" + str(dirnames) + "' filenames=" + str(filenames))
tmpList = filenames
if len(tmpRule)>0:
tmpList = fnmatch.filter(filenames, tmpRule)
# Import the module :
for cycleFile in tmpList:
#for cycleFile in filenames:
#debug.info("Might copy : '" + tmpPath+cycleFile + "' ==> '" + dst + "'")
copy_file(tmpPath+"/"+cycleFile,dst+"/"+cycleFile)
debug.verbose("Might copy : '" + tmpPath+cycleFile + "' ==> '" + dst + "'")
copy_file(tmpPath+"/"+cycleFile, dst+"/"+cycleFile)
def copy_anything_target(target, src, dst):
tmpPath = os.path.dirname(os.path.realpath(src))
tmpRule = os.path.basename(src)
for root, dirnames, filenames in os.walk(tmpPath):
debug.verbose(" root='" + str(root) + "' dir='" + str(dirnames) + "' filenames=" + str(filenames))
tmpList = filenames
if len(tmpRule)>0:
tmpList = fnmatch.filter(filenames, tmpRule)
# Import the module :
for cycleFile in tmpList:
#for cycleFile in filenames:
#debug.info("Might copy : '" + tmpPath+cycleFile + "' ==> '" + dst + "'")
target.add_file_staging(tmpPath+"/"+cycleFile,dst+"/"+cycleFile)
newDst = dst
if len(newDst) != 0 and newDst[-1] != "/":
newDst += "/"
if root[len(src)-1:] != "":
newDst += root[len(src)-1:]
if len(newDst) != 0 and newDst[-1] != "/":
newDst += "/"
debug.verbose("Might copy : '" + root+"/"+cycleFile + "' ==> '" + newDst+cycleFile + "'" )
target.add_file_staging(root+"/"+cycleFile, newDst+cycleFile)