]> begriffs open source - cmsis/blob - CMSIS/CoreValidation/Tests/buildutils/iarcmd.py
CoreValidation: Test projects for Cortex-M23/-M33 without extensions.
[cmsis] / CMSIS / CoreValidation / Tests / buildutils / iarcmd.py
1 #! python
2
3 from buildcmd import BuildCmd
4 from datetime import datetime
5 import mmap
6
7 class IarCmd(BuildCmd):
8
9   def __init__(self, project, config):
10     BuildCmd.__init__(self)
11     self._project = project
12     self._config = config
13     self._log = "iar_{0}.log".format(datetime.now().strftime("%Y%m%d%H%M%S"))
14     
15   def getCommand(self):
16     return "iarbuild.exe"
17     
18   def getArguments(self):
19     return [ self._project, "-build", self._config ]
20   
21   def isSuccess(self):
22     return self._result <= 1
23
24   def getLog(self):
25     try:
26       return open(self._log, "r")
27     except:
28       return None