1. 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
  2. 02 4月, 2019 1 次提交
  3. 20 3月, 2019 2 次提交
  4. 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
  5. 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
  6. 14 2月, 2019 1 次提交
  7. 13 2月, 2019 1 次提交
  8. 05 2月, 2019 1 次提交
  9. 29 1月, 2019 1 次提交
  10. 10 12月, 2018 1 次提交
  11. 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
  12. 06 12月, 2018 1 次提交
  13. 30 11月, 2018 4 次提交
  14. 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
  15. 14 11月, 2018 1 次提交
  16. 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
  17. 25 9月, 2018 1 次提交
  18. 24 9月, 2018 1 次提交
  19. 18 9月, 2018 1 次提交
  20. 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
  21. 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
  22. 01 9月, 2018 1 次提交
  23. 28 8月, 2018 2 次提交
  24. 27 8月, 2018 1 次提交
  25. 03 8月, 2018 4 次提交
  26. 21 7月, 2018 1 次提交
    • C
      selftests/functional/test_basic.py: prevent unversioned Python · 9b2db940
      Cleber Rosa 提交于
      `examples/tests/simplewarning.sh` calls a generic avocado command,
      which gets added to the path by the test code. That generic avocado
      command is `scripts/avocado`, from the source repository, which
      contains the unversioned `/usr/bin/env python`.
      
      Under some environments, such as Fedora >= 29, there may be no
      unversioned Python binary.  Let's respect the UNITTEST_AVOCADO_CMD
      environment variable, and add the the directory containting that
      binary to the PATH.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      9b2db940
  27. 19 7月, 2018 2 次提交
  28. 17 7月, 2018 1 次提交
  29. 04 7月, 2018 2 次提交