1. 02 1月, 2018 1 次提交
  2. 22 12月, 2017 1 次提交
    • C
      HTML plugin: use subprocess.DEVNULL instead of custom open file · e51acbfa
      Cleber Rosa 提交于
      The HTML plugin is using the `subprocess` library to fire up the
      web browser that will show the report.  In theory, we could be
      using our own `avocado.utils.process` for that, but given the
      comments in that section, I believe there may be caveats.
      
      As a fix for the immediate issue at hand (pylint catching a failure on
      a Python 3 environment about using `file`), let's just use the
      definitions from the `subprocess` module itself.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      e51acbfa
  3. 16 10月, 2017 1 次提交
    • C
      Python 3 port: use AvocadoParams.iteritems() method · e29cc04b
      Cleber Rosa 提交于
      As part of 0795831f, all occurrences of dict.iteritems() turned into
      iteritems(dict).  The problem is that AvocadoParams doesn't implement
      the items() method that six.iteritems() expects from Python 3.
      
      So given that AvocadoParams doesn't provide it, we could either implement
      items() just to satisfy iteritems(), or just use the existing interface.
      
      This commit chooses the later, which means reverting a small part of
      the changes (incorrect ones) from 0795831f.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      e29cc04b
  4. 11 10月, 2017 1 次提交
  5. 03 10月, 2017 1 次提交
  6. 28 6月, 2017 1 次提交
  7. 24 6月, 2017 1 次提交
    • C
      HTML: write report in the same location other results live · 429673aa
      Cleber Rosa 提交于
      All other result plugins write (by default) to the job results dir.
      The HTML plugin was different because it used to require a number of
      files.  Now, it's a single file, and thus, could/should live in the
      same place as other files.
      
      To ease the transition of the location, let's add a symlink, so that
      users can still rely on the old location.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      429673aa
  8. 15 6月, 2017 1 次提交
  9. 16 5月, 2017 1 次提交
  10. 15 5月, 2017 1 次提交
    • L
      avocado: Use output.LOG_{UI,JOB} in Avocado · f2ca8094
      Lukáš Doktor 提交于
      Currently we hardcode the "avocado.app" and "avocado.test" loggers
      everywhere in Avocado, let's use the newly defined
      `avocado.core.output.LOG_{UI,JOB}` variables everywhere in Avocado
      except of `avocado.utils`, which shouldn't have used this interface in
      the first place and will be subject of change in the future.
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      f2ca8094
  11. 27 4月, 2017 2 次提交
  12. 24 4月, 2017 1 次提交
    • L
      html: Avoid removing in-job-dir results on --html · 049354e6
      Lukáš Doktor 提交于
      When --html is used the original in-job-dir results are removed just
      before the second render. This was probably due to typo as the original
      location was (probably) intended for removal. This patch doesn't do that
      because the user-defined dir can be shared dir with other user files so
      let's just produce the results and keep the dirs intact (while keeping
      the refresh in job-dir as that is guaranteed to be our directory and we
      do know it can be removed).
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      049354e6
  13. 10 3月, 2017 1 次提交
  14. 08 12月, 2016 1 次提交
  15. 04 11月, 2016 2 次提交
  16. 27 9月, 2016 1 次提交
    • C
      HTML Result: fix rendering with pystache 0.3.1 · 9137db51
      Cleber Rosa 提交于
      Commit 3154794d broke the HTML report
      when older some versions of pystache is used.  The current status is
      that the HTML report generated on those systems is a one line report
      containing the literal `utf8` string.
      
      This proposal does not try to add support Unicode based inputs with
      that version of pystache, because it's internally not well supported.
      Internal methods such as `Template.render_tags()` will blindly try to
      do conversions without respecting the encoding passed on `render()`.
      
      Also, it's true that we're missing Unicode support in many other
      places, such as documented here in this card:
      
       https://trello.com/c/bfE9NBbl
      
      For now, let's try properly generate the report, and keep the error
      handling already present, that let's users know there have been
      encoding errors.
      
      References: https://trello.com/c/8j3aVUlISigned-off-by: NCleber Rosa <crosa@redhat.com>
      9137db51
  17. 09 9月, 2016 1 次提交
  18. 07 9月, 2016 4 次提交
  19. 04 8月, 2016 1 次提交
    • 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
  20. 28 5月, 2016 1 次提交
    • C
      Plugin interfaces: proposal for a better module name and location · 88cd8261
      Cleber Rosa 提交于
      Avocado currently does not define a set of APIs for plugin writers.
      It's well understood that anyone writing plugins is really playing
      under the hoods of core Avocado.
      
      Because there's no such module namespace allocated for that purpose
      alone (say, `avocado.plugin`) it was decided to put plugin interfaces
      together with the "core plugin repository", that is the
      "avocado/plugins" directory.  By no means the contents of
      "avocado/plugins/", that is, the plugin implementations themselves,
      need be the "avocado.plugins" module, it could just as well live in
      "avocado-core-plugins" directory or repository.  This is also well
      exemplified by the avocado-vt and avocado-virt plugins, which live in
      completely separate repositories.
      
      So, the first goal of these changes are, effectively, to make all
      plugin implementations equal, always referring to
      `avocado.core.plugins_interface`.  Then, the secondary goal is to pave
      the way for a specific namespace to contain only the interfaces (which
      should be non-core) which plugin writers should rely on.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      88cd8261
  21. 03 3月, 2016 2 次提交
    • L
      avocado: Remove the "View" concept · 2105f912
      Lukáš Doktor 提交于
      The "View" concept was developed to abstract the messages and events.
      The problem is it was only abused to pass the status to other places, to
      colorize the messages and to allow creating paginated view.
      
      There already is a nice class hooked to all important events, the
      "TestResult".
      
      For (not only human readable) messages this commit uses the standard
      python logging as it's pretty well known, widely used and very scalable.
      The colored output is handled by already existing
      "ProgressStreamHandler", which maps: DEBUG,INFO,WARNING and >=ERROR
      messages to previously existing: minor, message, warning and error event
      types.
      
      The paginator was unified and is initialized during logging reconfigure.
      During reconfigure all previously logged messages are re-logged into the
      output so one does not lose those messages. Another great difference is
      that the Paginator is cleaned at exit by avocado and does not require
      complex handling to avoid broken console. To use paginator one just
      enables it in "args" and writes to any available stream/stdout/stderr
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      2105f912
    • L
      avocado: Various style fixes · 6717e350
      Lukáš Doktor 提交于
      This contains some import cleanups, few docstring updates and escaped
      new line fixes.
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      6717e350
  22. 23 2月, 2016 1 次提交
  23. 05 2月, 2016 1 次提交
    • C
      Test Result: define a formal method to register test result classes · 6ee69b27
      Cleber Rosa 提交于
      Avocado defines avocado.core.result.TestResult, so that alternative
      test result classes can inherit from it. When a user writes a new
      test result class, he's left wondering how to activate that.
      
      First, for consistency, Avocado should define proper interfaces
      for "test result plugins". This is on sight, and will ultimately
      allow users to register new test result implementations simply by
      registering the setuptools entry points, just as it's currently
      done (on versions >= 0.31.0) for command line related plugins.
      
      Until then, let's at least improve the current state of things.
      These changes believe that the following improvements are given here:
      
      * avocado.core.job.Job._set_output_plugins now won't look at every
        possible key in the application arguments, and won't silence
        possible errors while trying to instantiate test result classes.
      * test result writers can now use a documented method for registering
        their test result classes.
      
      The same approach was not chosen to be done with the test runner
      classes because there can only by one test runner per Avocado job.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      6ee69b27
  24. 18 12月, 2015 1 次提交