1. 25 6月, 2019 2 次提交
    • C
      Test: report state on each phase · ac776472
      Cleber Rosa 提交于
      The test can be asked to report its state, or it can do it itself.
      Given that the test knows when it enters each phase, let's ask it to
      report it.
      
      Because the *state* is now reported, it's possible for a test to
      finish (for instance by killing itself) without setting a valid (user
      visible) status, such as "PASS", "FAIL", etc.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      ac776472
    • C
      Test: report test phases · 33b28b0f
      Cleber Rosa 提交于
      The avocado test runner mostly "flies blind" when it comes to the
      individual test phases, that is, it doesn't know if a test is
      currently being initialized, running its setup, running the test
      method itself or its teardown.
      
      With this, the runner gets access to that information, and can act
      differently based on this knowledge.  One use case is to allow for
      different timeouts on different test phases.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      33b28b0f
  2. 21 6月, 2019 1 次提交
  3. 19 6月, 2019 2 次提交
  4. 15 6月, 2019 1 次提交
  5. 30 4月, 2019 1 次提交
    • C
      Selftests: temporary file management improvements · 234da7fd
      Cleber Rosa 提交于
      Rules such as "check" on our Makefile make sure that no temporary
      directory created by Avocado is left behind, but, it's very hard to
      tell who created a rogue directory.
      
      This brings improvements to the naming of the temporary directory, so
      that it's trivial to tell which test created in the first place.
      
      Additionally, it improves the temporary directory creation, usually by
      making use of a tearDown() test phase, instead of other more fragile
      methods.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      234da7fd
  6. 02 4月, 2019 1 次提交
  7. 20 3月, 2019 2 次提交
  8. 08 3月, 2019 1 次提交
    • C
      Drop Python 2 · a90c24c6
      Cleber Rosa 提交于
      And the compatiblity helper six.  With Python 2 gone, a number of
      package changes are also introduced, so that the packages are always
      named python3-<suffix>.
      
      Also, because it would be confusing not having an "avocado" script,
      and to conform with the system wide change introduced by distros that
      now offer Python 3 by default, the scripts are no longer called
      avocado-3 (or avocado-3.x), but simply "avocado".
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      a90c24c6
  9. 16 2月, 2019 1 次提交
    • C
      Record all logged messages during test run into the test log · beb9dac8
      Cleber Rosa 提交于
      Each test has its own log file within a given job result dir,
      located at "test-results/$(test-id)/debug.log".
      
      If the test is an INSTRUMENTED test, using the standard Python logging
      module/API, all produced content should be recorded into the test log
      file.  This adds a handler that does exactly that to the logging
      module root logger.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      beb9dac8
  10. 14 2月, 2019 1 次提交
  11. 13 2月, 2019 1 次提交
  12. 05 2月, 2019 1 次提交
  13. 29 1月, 2019 1 次提交
  14. 10 12月, 2018 1 次提交
  15. 07 12月, 2018 1 次提交
    • C
      Job: clean up "dry-run" jobs by default · 4e59ec91
      Cleber Rosa 提交于
      In an effort to make jobs more self contained, and given that dry-run
      jobs created temporary content that is not supposed to be kept after
      the job is run, this introduces the following changes:
      
       * Jobs with "dry-run" enabled will now, by default, cleanup their
         own data.  Basically, this means that the "base log directory"
         created during job initialization, and that for non "dry-run"
         jobs is usually "~/avocado/job-results", will also be removed
         at the job's "cleanup()" phase.
      
       * A new "--dry-run-no-cleanup" command line option, that only makes
         sense when jobs with dry-run enabled start to clean up data for
         themselves
      
       * Because some result plugins will, by default, write to the job
         results directory, results plugins are now run before a job cleanup
         is done.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      4e59ec91
  16. 06 12月, 2018 1 次提交
  17. 30 11月, 2018 4 次提交
  18. 27 11月, 2018 1 次提交
    • C
      Selftests: respect pylint 2.2.0 checks · e28a2461
      Cleber Rosa 提交于
      The newly released pylint version 2.2.0, changed its default behavior
      (enabled) the following checks:
      
       * :unnecessary-pass (W0107): *Unnecessary pass statement*
         Used when a "pass" statement that can be avoided is encountered.
      
       * :unused-import (W0611): *Unused %s*
         Used when an imported module or variable is not used.
      
      Let's apply fixes to those checks, and at the same time, pin the
      pylint versions so that our CI environment is more stable (code that
      test our code -- pylint -- doesn't change, while our code changes).
      
      For Python 2, the latest release was 1.9.3, so let's use that.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      e28a2461
  19. 14 11月, 2018 1 次提交
  20. 02 10月, 2018 2 次提交
    • C
      Add core test parameter passing support (non-varianter based) · 252f8be2
      Cleber Rosa 提交于
      Currently, the only way to pass parameters to Avocado is by using the
      variants layer, that is, one of the existing varianter plugin
      implementations.  This was based on earlier design decisions, that
      we're trying to fix without breaking expectation and compatibility.
      
      While it'd makes sense to support parameters created by the varianter
      layer itself, together with non-varianter parameters, it seems that we
      can start by adding support for one or the other being used at a time.
      
      This commit does exactly that: add support for a method of passing
      parameters via the command line for all tests in a job, without
      having to resort to the varianter.  When the varianter is used,
      it takes precedence and the core test parameter passing support
      is ignored.
      
      This should solve a number of use cases that require one-time
      executions of tests with different parameters, especially
      executions during test development and debugging.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      252f8be2
    • C
      avocado.utils.lvutils: fix bytes/text problems · d9a13f1d
      Cleber Rosa 提交于
      The lv_utils functional tests, which usually don't run because
      they require privileged execution, revealed a number of broken
      expectations when it comes to bytes and text handling.
      
      Let's fix both the module and the test.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      d9a13f1d
  21. 25 9月, 2018 1 次提交
  22. 24 9月, 2018 1 次提交
  23. 18 9月, 2018 1 次提交
  24. 15 9月, 2018 1 次提交
    • C
      External Runner: support relative paths given on the command line · 89704618
      Cleber Rosa 提交于
      I was trying to use the external runner, in a reasonably simple way:
      from within a project (QEMU) build dir, I'd run:
      
       $ avocado run --external-runner=tests/qemu-iotests/check \
         --external-runner-chdir=runner -- 001 002
      
      But, what should work, did not.  The problem is with the non-absolute
      path to the external runner, that is needed because we're changing
      directories.
      
      Absolute paths won't hurt otherwise (when no chdir is done), so it's
      always done here.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      89704618
  25. 04 9月, 2018 1 次提交
    • C
      Enables pylint w0621 · 628e35c3
      Caio Carrara 提交于
      This pylint checks for possible redefining outer names. Some occurrences
      was preserved with disable flag because they would broke some public
      api, like method/functions names or parameters.
      Signed-off-by: NCaio Carrara <ccarrara@redhat.com>
      628e35c3
  26. 01 9月, 2018 1 次提交
  27. 28 8月, 2018 2 次提交
  28. 27 8月, 2018 1 次提交
  29. 03 8月, 2018 4 次提交