1. 13 2月, 2018 1 次提交
  2. 06 12月, 2017 1 次提交
  3. 30 11月, 2017 2 次提交
    • C
      Output check: add a test for API call check mode enforcement · 11f3b0df
      Cleber Rosa 提交于
      The avocado.utils.process APIs offer the `allow_output_check`
      parameter which exists at a function call level, and thus should be
      applied only during the scope of that function.
      
      While it's questionable if a test process should be able to skip
      some of its generated output (by means of an `avocado.utils.process`
      function parameter), the fact is that the utility libraries offer
      that at a lower level.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      11f3b0df
    • C
      Output check: allow for an explicit `none` mode · 9997aaa1
      Cleber Rosa 提交于
      In commit 4514a8ad, the default value from the command line option
      `--output-check-record` was being used to set the mode of the
      `avocado.utils.process` APIs with regards to output record mode.
      
      The problem with that is it makes it impossible for the API to
      distinguish between "no explicit behavior requested" and "explicitly
      being asked to disable recording".
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      9997aaa1
  4. 20 11月, 2017 1 次提交
  5. 18 11月, 2017 1 次提交
    • C
      Output check record: introduce control for process execution · 4514a8ad
      Cleber Rosa 提交于
      And the support for combined mode.  So far, there was no need to
      determine how processes would be run, and how their output would be
      collected: the stdout and stderr would always be collcted separately.
      
      Now, with the need to support the "combined" mode, the
      `--output-check-record` command line switch not only has to control
      which files are populated (stdout.expected, stderr.expected) but also
      it needs to control the execution of process, because it's what will
      generate the "raw material" for a possible "output.expected" file.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      4514a8ad
  6. 12 10月, 2017 1 次提交
    • L
      output: Adjust LoggingFile to work with raw output · e4b5ee05
      Lukáš Doktor 提交于
      The 4235b329 changed the
      stdout/stderr/output logging handlers to not to add tailing '\n's, but
      these are processed by LoggingFile, which is designed to remove the
      '\n's and to logged them per line. As a result the unittest was
      incorrectly changed as the first outputs actually add the '\n' which was
      removed in the expected output.
      
      This patch keeps the raw approach as it is necessary for the last
      buffered line and instead of buffering puts all lines including the
      tailing '\n' and not '\n' for the remaining last line (if it's
      available). Consequently this should improve the situation where output
      is being produced by stderr and stdout concurrently as no buffering of
      the non-tailing-newline output is done on LoggingFile level.
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      e4b5ee05
  7. 04 10月, 2017 1 次提交
    • A
      log the raw output on stdout/stderr · 4235b329
      Amador Pahim 提交于
      Avocado process module has a routine to drain the std* buffer with a
      per-line basis loop. This loop makes the new-line character to be
      dropped.
      
      On the other hand, the Python logging system is hard-coded to add a new-line
      character at the end of the msg string.
      
      The problem takes place when `process` writes a line which originally
      had new-line character at the end but the logging system still adds the
      new-line character to that line.
      
      In this patch:
      - avocado.utils.process to include the new-line character in the lines
        that originally had one.
      - avocado.core.test to use for raw outputs a custom logging FileHandler
        that does not add a new-line character at the end of each line.
      
      Verified with (checking `.../test-results/1-.../[stdout|stderr|output]`):
      
          $ avocado run --external-runner '/bin/echo' 'foo'
      
          $ avocado run --external-runner '/bin/echo -n' 'foo'
      
          $ avocado run --external-runner '/bin/ls' '.'
      
          $ avocado run --external-runner '/bin/ls' 'nonexistingfile
      
      Reference: https://trello.com/c/dH7FLT75Signed-off-by: NAmador Pahim <apahim@redhat.com>
      4235b329
  8. 03 10月, 2017 1 次提交
  9. 15 9月, 2017 1 次提交
    • L
      selftests: Make sure to use correct basedir · c4dcff6d
      Lukáš Doktor 提交于
      The basedir was mainly set correctly, but sometimes not used in some of
      the tests. Let's move the `os.chdir` to `setUp` phase where it makes
      sense and add new ones where they were not present.
      
      Related to basedir the test_mux was using hardcoded path based on the
      method used to execute the test, let's change it to `__file__` which
      gives better results.
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      c4dcff6d
  10. 29 8月, 2017 1 次提交
  11. 14 8月, 2017 1 次提交
  12. 15 5月, 2017 2 次提交
  13. 18 4月, 2017 1 次提交
  14. 06 4月, 2017 1 次提交
  15. 15 3月, 2017 1 次提交
  16. 25 2月, 2017 1 次提交
  17. 11 2月, 2017 1 次提交
  18. 06 2月, 2017 1 次提交
  19. 12 1月, 2017 1 次提交
  20. 08 12月, 2016 1 次提交
  21. 06 12月, 2016 1 次提交
    • L
      avocado.plugins.tap: Produce result.tap by default · 2da59620
      Lukáš Doktor 提交于
      We do produce `results.xml` and `results.json`, let's also include
      `results.tap` by default and allow disabling this by `--tap-job-result`.
      
      Note it's impossible to initialize the default result.tap in `__init__`
      as we only get `args` and not the job itself, therefor this patch adds
      it as first thing inside the `pre_tests` step.
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      2da59620
  22. 28 10月, 2016 1 次提交
  23. 27 9月, 2016 1 次提交
  24. 21 9月, 2016 1 次提交
  25. 07 9月, 2016 1 次提交
    • C
      HTML Result: host it in a directory outside the avocado package · a480d731
      Cleber Rosa 提交于
      This step makes the HTML result a proper Python plugin, by living
      outside the Avocado package namespace.
      
      The RPM package is also adjusted: it now builds ands install both
      Avocado and the HTML result plugin while keeping the two separate
      installable packages.
      
      Developers can use the usual `make link` and `make clean` to enable
      and disable all plugins (including this one).
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      a480d731
  26. 25 7月, 2016 1 次提交
    • C
      Result: use FileOrStdoutAction on result plugins and app · d205805b
      Cleber Rosa 提交于
      This change replaces the in-job logic to deal with the standard output
      with the FileOrStdoutAction that does it at the command line parsing
      time.  Then, it deals with a possible command line option conflict (the
      first two players that attempt to use stdout) at the application level,
      exiting the application in such case.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      d205805b
  27. 22 7月, 2016 1 次提交
  28. 13 6月, 2016 1 次提交
  29. 03 5月, 2016 1 次提交
    • L
      avocado.core.loader: Fix the test alias resolver · 3ff48800
      Lukáš Doktor 提交于
      This patch fixes and improves resolving of the test aliases (paths
      relative to `data_dir.get_tests_dir`).
      
      1. It removes the magic `.py` suffix, which prevented non-python files
         from being resolved (simple.sh was resolved to $tests/simple.sh.py)
      2. It adds the feature to filter the class/method from the test
         reference by parsing $test_reference:$class.$method for implicit
         resolver. (previously this worked only for absolute path resolver)
      
      Visible changes are:
      
      * `avocado run passtest` => fails (used to work)
      * `avocado run passtest.py` => works (did not work)
      * `avocado run env_variables.sh` => works (did not work)
      * `avocado run passtest.py:PassTest.test` => works (did not work)
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      3ff48800
  30. 26 3月, 2016 1 次提交
  31. 16 3月, 2016 1 次提交
    • L
      avocado.core: Log all messages to sys.stdout except of errors · f5acea12
      Lukáš Doktor 提交于
      While working on the avocado logging system we thought it'd be
      consistent and better to log certain streams to sys.stderr rather than
      sys.stdout. It turned out to be a bit confusing and unexpected, so after
      a discussion this commit adjusts the streams to:
      
       * avocado.app - loglevel <= info goes to stdout
                     - loglevel > info goes to stderr
       * other streams - go always into stdout
       * sys.stdout - goes to sys.stdout when enabled
       * sys.stderr - goes to sys.stderr when enabled
                    - goes to sys.stdout when enabled as test output
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      f5acea12
  32. 03 3月, 2016 1 次提交
  33. 24 2月, 2016 1 次提交
    • L
      avocado: Change logging initialization · 83a50b5f
      Lukáš Doktor 提交于
      This patch changes the way logging is initialized in avocado app:
      
      1. stdout/stderr/logging is replaced with in-memory handlers
      2. when arg parsing is done, logging is reconfigured accordingly to
         setting and re-logs stored messages (when streams are enabled)
      3. when job starts and "test" stream is enabled, "" and "avocado.test"
         streams are enabled
      4. when job finishes and "test" stream enabled the additional outputs,
         the additional outputs are disabled again.
      
      The 3 and 4 is necessarily as the "" logger contains all logs including
      avocado initialization (stevedore, PIL, ...). This way the "test" stream
      still outputs everything, but only during the job-execution and not
      during avocado initialization and cleanup. (one can use "early" log to
      see those).
      
      Last but not least it keeps "avocado.app" output in stdout (and stderr),
      but it moves all other outputs to stderr instead. This is IMO better
      handling as one can distinguish between debug and "additional" output.
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      83a50b5f
  34. 20 2月, 2016 1 次提交
  35. 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
  36. 18 12月, 2015 3 次提交