1. 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
  2. 27 4月, 2016 2 次提交
  3. 26 4月, 2016 3 次提交
    • C
      Job Script Plugin: allow user scripts to be run pre/post job · b9cc7abe
      Cleber Rosa 提交于
      This script introduces a pair of directories that will be searched
      for executable files, to be run before and after the actual execution
      of a job.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      b9cc7abe
    • L
      avocado: Implement serialized test ids · 5973e898
      Lukáš Doktor 提交于
      This commit implements the serialized test ids described in the
      Introduce proper test IDs RFC.
      
      https://www.redhat.com/archives/avocado-devel/2016-March/msg00024.html
      
      It implements `TestName` class, which contains the test uid, test name
      and the variant uid and allows querying for the file-system-friendly
      name.
      
      The workflow is:
      
      1. tests are discovered, name is translated to "Test Name" by loader
      2. test_suite is passed to the runner (new) along with the number of
         tests+variants to be executed (used to get number of digits)
      3. the Mux (params generator) yields the template + (new) variant id
      4. the runner replaces template['name'] to TestName(uid, test_name,
         variant_id); where uid is currently no executed tests, test_name is
         the original name from Loader and variant_id is either None or the
         variant index.
      
      This commit makes the `tag` argument unused. To avoid problems a warning
      is issued on it's usage so we can remove it in the upcoming releases.
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      5973e898
    • L
      avocado remote plugin: Add support to identity files · 7ef1d659
      Lucas Meneghel Rodrigues 提交于
      Add support for identity files as valid SSH options
      to our remote plugin. The use case for this is connecting
      to Amazon EC2 instances using the provided keypair (.pem
      files).
      
      avocado run --remote-hostname my-machine.com --remote-username myuser --remote-key-file /path/to/myfile.pem passtest
      Signed-off-by: NLucas Meneghel Rodrigues <lookkas@gmail.com>
      7ef1d659
  4. 22 4月, 2016 3 次提交
  5. 14 4月, 2016 4 次提交
  6. 13 4月, 2016 2 次提交
  7. 11 4月, 2016 3 次提交
  8. 07 4月, 2016 1 次提交
    • A
      avocado.code.job fix job return code on timed out jobs · 41177f0a
      Amador Pahim 提交于
      When a job is timed out during a test execution, we fail the test
      and put status ERROR in the test. The job then exits with the rc
      AVOCADO_TESTS_FAIL. This patch fixes this, making the test status
      INTERRUPTED and the job to exit with AVOCADO_JOB_INTERRUPTED.
      
      Also, when a job is timed out before a test, the test is skipped
      and the job exits with rc AVOCADO_ALL_OK. For that case, this patch
      makes the job to exit with AVOCADO_JOB_INTERRUPTED instead, keeping
      the test status as SKIP.
      
      Given this change, now we have the following combinations of test status
      and job return code:
      
      Case1:
          - Test1: PASS
          - Test2: SKIP (TestTimeoutSkip)
      
          Job RC: AVOCADO_JOB_INTERRUPTED
      
      Case2:
          - Test1: PASS
          - Test2: INTERRUPTED (TestTimeoutInterrupted)
          - Test3: SKIP (TestTimeoutSkip)
      
          Job RC: AVOCADO_JOB_INTERRUPTED
      
      Case3:
          - Test1: PASS
          - Test2: FAIL
          - Test3: INTERRUPTED (TestTimeoutInterrupted)
          - Test4: SKIP (TestTimeoutSkip)
      
          Job RC: AVOCADO_JOB_INTERRUPTED
      Signed-off-by: NAmador Pahim <apahim@redhat.com>
      41177f0a
  9. 30 3月, 2016 2 次提交
  10. 29 3月, 2016 1 次提交
  11. 26 3月, 2016 1 次提交
  12. 18 3月, 2016 1 次提交
    • C
      External Runner: deal with empty test URL · 139e717b
      Cleber Rosa 提交于
      A test base on the external runner feature depends on both the
      external runner and the test URL. These two are always combined to
      generate the complete command that will be executed by Avocado.
      
      But, the Avocado command line application does not require URLs to be
      given on the command line, because these may come from other sources
      on loaders other than the basic FileLoader.
      
      So, let's also explicitly require a URL to be given to to the External
      Runner loader to return a test factory (class and parameters).
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      139e717b
  13. 17 3月, 2016 1 次提交
  14. 16 3月, 2016 2 次提交
  15. 10 3月, 2016 1 次提交
    • C
      selftests/functional/test_basic.py: extend timeout on test_kill_stopped_sleep · 27029ff4
      Cleber Rosa 提交于
      Given the last CI jobs, RunnerSimpleTest:test_kill_stopped_sleep() has
      been failing often. The obvious reason, given the nature of the test
      and the heavily shared and loaded computing resources they run on, is
      the lack of resources.
      
      One example of such as failure:
      
         ======================================================================
         FAIL: test_kill_stopped_sleep (selftests.functional.test_basic.RunnerSimpleTest)
         ----------------------------------------------------------------------
         Traceback (most recent call last):
           File "/home/travis/build/avocado-framework/avocado/selftests/functional/test_basic.py", line 549, in test_kill_stopped_sleep
             % proc.get_output())
         AssertionError: Avocado process still alive 1s after job-timeout:
         JOB ID     : 5c65a06b4ab15e69d6c4a1fc762368e0e99cbc1f
         JOB LOG    : /tmp/avocado_selftests.functional.test_basicHIyhV4/job-2016-03-09T15.08-5c65a06/job.log
         TESTS      : 1
          (1/1) /bin/sleep 60:
         ctrl+z pressed, stopping test (5046)
         ERROR
      
      So, let's give 4 extra seconds for the process to be
      terminated. Hopefully failures in the timeout handling will still be
      revealed given the relatively small buffer.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      27029ff4
  16. 09 3月, 2016 1 次提交
  17. 04 3月, 2016 2 次提交
    • C
      avocado/core/data_dir.py: make data_dir settings dynamic · be47dcc4
      Cleber Rosa 提交于
      The configurations related to the "data_dir" are currently read at
      module load time. This means that changes in the configuration between
      module load time and changes to the settings (such as parsing an
      additional config file) is never seen.
      
      Since the avocado command line application parses extra configuration
      files (given with `--config`) after the module is loaded, these extra
      configuration files are never applied to the data_dir configuration.
      
      There's one more issue with regards to the the settings usage: because
      once references to the `settings` instance singleton are grabbed, they
      will always point to the same settings objects. The data_dir unittests
      exercise changes to the settings objects by replacing that
      instance. So, let's refer to the settings using the full location
      (module.attribute), which will always give back the "current" (be it
      original or replaced) settings instance.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      be47dcc4
    • C
      selftests/unit/test_datadir.py: combine setUp() and _get_bogus_settings() · 78c2e52d
      Cleber Rosa 提交于
      The current implementation of _get_bogus_settings() solves a partial need
      of the setUp() method. Let's combine both into a single (private) utility
      method (_get_temporary_dirs_mapping_and_config()) that can be re-used.
      
      The major goal is to re-use it when testing how data_dir reacts to changes
      in the settings at run time.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      78c2e52d
  18. 03 3月, 2016 4 次提交
    • L
      selftests: Add avocado -v selftest · 981e7f66
      Lukáš Doktor 提交于
      This check "avocado -v" produces correct output and returns 0.
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      981e7f66
    • L
      avocado: Move --silent arg from "run" to core · 3f52fee9
      Lukáš Doktor 提交于
      The `--silent` argument is valid for all commands, let's add it to
      the core avocado args. For backward compatibility keep supporting it in
      "run" subcommand too.
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      3f52fee9
    • 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.core.result: Supply only "job" (and output for json/xunit/...) · 10fb8f69
      Lukáš Doktor 提交于
      Both "stream" and "args" are present in the job. Let's only pass
      the "job" object and let the Result class to take the needed objects.
      
      Additionally allow overriding the output for json/xunit/html in order
      to allow users to specify different value than the one from args.
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      10fb8f69
  19. 02 3月, 2016 1 次提交
  20. 25 2月, 2016 1 次提交
  21. 24 2月, 2016 3 次提交