aboutsummaryrefslogtreecommitdiffstats
path: root/anteater/src
AgeCommit message (Collapse)AuthorFilesLines
2017-08-04Implements Rationale Fieldlhinds3-42/+52
This change Implements a descriptive field to explain the rationale behind a block. In time this will be part of a sphinx auto build documentation system, which extracts the `desc` field and places it into a template. The user will then be provided with a url. JIRA: RELENG-276 Change-Id: I82b4eb02fe502928726846cc08388a7a4f0ea2f6 Signed-off-by: lhinds <lhinds@redhat.com>
2017-07-26Implements file except handler for patchsetslhinds1-2/+6
Simple try / except handler in the event that an edge case occurs and a patchset is not present. Change-Id: Ica5df2f5b37fff98c52f79bd2a8e47ba46890e80 Signed-off-by: lhinds <lhinds@redhat.com>
2017-07-11Fix for CCL 4.0 Licenses.lhinds2-6/+6
A follow up patch should move the patterns list into yaml Change-Id: Id814d6fc09631d5037f6825f32daca8d74edc118 Signed-off-by: lhinds <lhinds@redhat.com>
2017-07-03Merge "move logging to runtime init"Luke Hinds3-6/+6
2017-07-01move logging to runtime initRoss Brattain3-6/+6
There are many ways to init logging, but doing import-time logic can cause problems. For yardstick we are doing this type of run-time init in the main program startup. This allows for some flexibiliy since we just set the root loggers. Every other logger is standard, not subclassed Change-Id: I7004a147f03a7104f373141caf9206d8e49a5d4c Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-07-01switch logging to proper usageRoss Brattain3-56/+34
The logging methods do string interpolation themselves The first arg to logging.debug() is formally defined to be a message format string. From the reference: https://docs.python.org/2/library/logging.html#logging.Logger.debug Logger.debug(msg, *args, **kwargs) Logs a message with level DEBUG on this logger. The msg is the message format string, and the args are the arguments which are merged into msg using the string formatting operator. (Note that this means that you can use keywords in the format string, together with a single dictionary argument.) There are two keyword arguments in kwargs which are inspected: exc_info which, if it does not evaluate as false, causes exception information to be added to the logging message. If an exception tuple (in the format returned by sys.exc_info()) is provided, it is used; otherwise, sys.exc_info() is called to get the exception information The reason logging does string interpolation it self is to implement deferred interpolation. String interpolation involves evaluating arguments, so it can introduce significant computation. The logging module tries to be smart about deferring interpolation until the last possible moment. The logging methods check isEnabledFor for the log level and won't interpolate if the level is not enabled. https://github.com/python/cpython/blob/2.7/Lib/logging/__init__.py#L1178 def warning(self, msg, *args, **kwargs): if self.isEnabledFor(WARNING): self._log(WARNING, msg, args, **kwargs) logging actually waits to interpolate the string in LogRecord.getMessage() https://github.com/python/cpython/blob/2.7/Lib/logging/__init__.py#L328 if self.args: msg = msg % self.args Change-Id: I0090dcbc408200b6f2471748eae0c5a763da2e37 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-06-28add Python3 support with sixRoss Brattain4-8/+12
switch to relative imports for package file use absolute imports in main this requires renaming anteater.py to main.py to avoid absolute import name conflict update setup.py to indicate python 3.4 support Change-Id: I0fcaf8a9825557962dc98a6a4eef490051fbbfb0 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-06-27Fixes UnboundLocalError issue.lhinds2-3/+7
If no hash exists in the project exception file, then `return binary_hash` is Nonetype which throws an Unbound variable error. This change adds some dummy text to allow try / except statements to deal with missing entries in project exception files. JIRA: RELENG-264 Change-Id: I98fb4b01a2930b350794326d4cf735c8e014e00a Signed-off-by: lhinds <lhinds@redhat.com>
2017-06-25Implements sha256 exception functionalitylhinds3-37/+56
This patch adds functionality for file checksum verfications for binary files. The master_list.yaml binaries yaml directive now only contains simple exceptions (for common artefacts that are gitignored) Each project_exception file now has a filename and a sha256 hash. If a binary file is not found, or the hash is mismatched, it will output the hash for the user to include in an exception patch. This functionality has been added to complete project scans and patchset scans JIRA: RELENG-240 Change-Id: Iafa5710f4a0da192fc74335b1200b504413f8a8b Signed-off-by: lhinds <lhinds@redhat.com>
2017-06-21rename gatechecks and project_configlhinds2-8/+11
gatechecks is renamed to master_list and project_config is renamed to project_exceptions JIRA:RELENG-251 Change-Id: Icbcc2c114d687783e0720017025cb4bb8e53e8a3 Signed-off-by: lhinds <lhinds@redhat.com>
2017-06-19Provides clarification that LICENSE is in repolhinds1-0/+15
This change peforms a clarification that a LICENSE file exists within the root folder of the set project repo. This feature is only for complete project scans and not a patch scan. JIRA:RELENG-235 Change-Id: I6d238158f7501aaff6c21ecc59b505b5c79565f2 Signed-off-by: lhinds <lhinds@redhat.com>
2017-06-18seperate exception rules for releng projectJulien1-0/+35
add optional project exception configuration file. for one project: configuration in project exception file and in gatechecks.yaml will be merged together for one project JIRA:RELENG-234 Change-Id: I7fff3082e837a478f155769fadd75533583543cd Signed-off-by: Julien <zhang.jun3g@zte.com.cn>
2017-06-14Adds Wiki URL to gerrit outputlhinds2-2/+2
A link to a wiki page is supplied, that instructs the user on how to make an exception patch. Also quick fix to log format Change-Id: Icfc8072d9764fe321e14b97080fca47d26ea8dc6 Signed-off-by: lhinds <lhinds@redhat.com>
2017-05-22Initial code push of Anteaterlhinds4-0/+443
Likely far to much to cover in a commit msg. Main bulk is the Anteater code itself, alongside packaging requirements and build tools and Dockerfile. Unit tests are planned as a follow up, so pushing this for now so that efforts can get underway to integrate the tool with jjb. Questions on how it works, please reach me in IRC. Change-Id: I2cd3cae391f8bf2cdc91b39c56dfc4833a1c4913 Signed-off-by: lhinds <lhinds@redhat.com>