1. 04 8月, 2016 6 次提交
    • C
      Result: port JSON result plugin · d60991ff
      Cleber Rosa 提交于
      This moves all JSON result code to the plugin file.  With that, the
      core avocado has no knowledge about this plugin, as it should be.
      Still, the `results.json` is going to be generated by default, unless
      the command line option `--json-job-result` is set to `off`.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      d60991ff
    • C
      Result: port xUnit result · 43349c11
      Cleber Rosa 提交于
      This moves all xUnit code to the plugin file.  With that, the core
      avocado has no knowledge about this plugin, as it should be.  Still,
      the `results.xml` is going to be generated by default, unless the
      command line option `--xunit-job-result` is set to `off`.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      43349c11
    • C
      Result: introduce plugin interface and corresponding dispatcher · 05200036
      Cleber Rosa 提交于
      It's a known fact that the concept of results (as in job results) has
      been abused.  Runners implemented as results prove that.  This minimal
      interface is intended for Result implementations that render the
      complete result at once.  This is the case for most *real* result
      writer needs, such as XUnit, JSON (ported on the upcoming commits) and
      even the HTML report writer (port coming soon)
      
      Once all results are ported, the ResultProxy, our more custom and old
      fashioned form of a dispatcher, can be removed.  Then, the job
      attribute `result`, which is currently a ResultProxy instance with
      multiple Result* classes holding a lot of duplicate information, will
      be turned into a single instance.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      05200036
    • C
      Result: keep track of the state of all tests · 318ad9f5
      Cleber Rosa 提交于
      In a planned change of goal for the result class to actually hold one
      copy of the overall job results, and then introduce specific result
      formatters that will use that as the data to write varied result
      formats, let's add all test information to the result class.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      318ad9f5
    • C
      Result: be more specific about the the total time · c5c0913e
      Cleber Rosa 提交于
      By renaming the variables from `total_time` to `tests_total_time` it's
      hopefully going to be more clear that key hold the accumulated amount of
      time spent on tests.  When other time related attributes are added, such
      as the total job run time, it's going to be a lot easier to distinguish
      between them.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      c5c0913e
    • C
      Result: drop "Test" from TestResult related classes names · 5495257c
      Cleber Rosa 提交于
      The initial versions of Avocado focused on tests, and ommited a bit
      the idea of jobs.  This had the consequence of some unfit names, such
      as the TestResult class, which defines methods such as "start_tests".
      It's clear that a "Test" starting "tests" is either about a nested
      relationship or is badly named.
      
      Instead of replacing the name of the TestResult related classes to
      JobResult, which is currently our top level player in most of the
      Avocado use cases, let's just consider that this class holds the
      result of what Avocado runs.  It's an abstract name, but it's not
      vague because the individual attributes refer to the exact type of
      information that is being held.  For instance, `job_unique_id` is
      clearly about a Job, and `tests_run` is clearly about tests.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      5495257c
  2. 02 8月, 2016 4 次提交
  3. 29 7月, 2016 4 次提交
  4. 28 7月, 2016 4 次提交
    • C
      Merge remote-tracking branch 'apahim/python_env' · a09565d2
      Cleber Rosa 提交于
      a09565d2
    • C
      04c87ec3
    • A
      Asset fetcher improvements · 3e0a6313
      Amador Pahim 提交于
      Use the avocado.utils.filelock to avoid race conditions:
       - Download the files with a temporary unique name.
       - Lock the original file.
       - Move downloaded file to the original name.
       - Compute the hash, creating the hashfile.
       - Verify the file against the provided hash.
       - Unlock the original file.
       (While the lock is acquired, users trying to use the file will wait until
       the lock is released or, on wait timeout, receive a cache miss)
      
      Drop EnviromentError exceptions on cache miss. Instead, we now only
      log an error message and return None.
      
      Clean debug messages. Log was being polluted by asset fetcher. Let's
      make it quieter.
      
      Reference: https://trello.com/c/NeFPMkZY
      Reference: https://trello.com/c/OWCprQpdSigned-off-by: NAmador Pahim <apahim@redhat.com>
      3e0a6313
    • A
      Introduce the file locker utility · 47799337
      Amador Pahim 提交于
      This is a general purpose file locker.
      
      If the lock file already exists and it contains the current process
      id in it, we wait until the timeout for the lock to be released,
      raising an AlreadyLocked exception when the timeout is reached.
      
      If the lock file already exists and it contains a pid of another
      running process, we raise an AlreadyLocked exception.
      
      If the lock file exists and it has no running processes pid in it,
      we try to clean the file and acquire the lock, raising a LockFailed
      exception when something goes wrong.
      Signed-off-by: NAmador Pahim <apahim@redhat.com>
      47799337
  5. 27 7月, 2016 4 次提交
  6. 26 7月, 2016 8 次提交
  7. 25 7月, 2016 10 次提交