1. 27 1月, 2016 1 次提交
  2. 07 1月, 2016 2 次提交
    • C
      selftests/functional/test_basic.py: remove references to old Plugin · c4180e95
      Cleber Rosa 提交于
      There are a few leftover references to the old Plugin classes in
      the functional tests. Let's remove them.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      c4180e95
    • L
      avocado.core.loader: Append test directory to sys.path · 62ae0d60
      Lucas Meneghel Rodrigues 提交于
      If a test has local imports (a fairly common use case),
      we have to append the base test dir to sys.path. Otherwise,
      we end up having a horrible traceback as a result:
      
      Exception loading test
      Traceback (most recent call last):
        File "/home/lmr/Code/avocado.lmr/avocado/core/runner.py", line 200, in _run_test
          instance = loader.load_test(test_factory)
        File "/home/lmr/Code/avocado.lmr/avocado/core/loader.py", line 262, in load_test
          test_module = imp.load_module(module_name, f, p, d)
        File "scylla_longevity.py", line 5, in <module>
          from sdcm.tester import ScyllaClusterTester
      ImportError: No module named sdcm.tester
      
      Which is clearly not wanted. We had this problem before
      and now we have a regression. It's time for a functional
      test to make sure we don't regress again.
      Signed-off-by: NLucas Meneghel Rodrigues <lookkas@gmail.com>
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      62ae0d60
  3. 18 12月, 2015 10 次提交
  4. 03 11月, 2015 1 次提交
  5. 30 10月, 2015 2 次提交
    • C
      Exit codes: use symbolic names in functional self tests · 49fcd32c
      Cleber Rosa 提交于
      Since we define the meaning of each exit code, we should be using that
      ourselves.
      
      Functional tests have been coded using literal values, and there may
      be a good reason for that: proving that the API stands.  But there's a
      big issue: we have not declared those codes as some kind of an
      external API and guarantee stability. Also the subsequent changes in
      this series actually change the meaning and values of those.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      49fcd32c
    • L
      avocado: Add support for --dry-run · 069e3784
      Lukáš Doktor 提交于
      It's prone to mistakes maintain two separate ways to query for tests
      (running them and displaying available ones).
      
      This patch implements --dry-run, which follows the full "run" process,
      only instead of running the test it skips them.
      
      Additionally the --dry-run uses some tweaks to tell them apart from
      normal executions, namely:
      
          1. No sysinfo gathering
          2. Unique id is 0000000000000000000000000000000000000000
          3. Unless user provides custom log location, fresh tmpdir is used
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      069e3784
  6. 28 10月, 2015 1 次提交
    • C
      Plugins: remove external plugin support · 7b969527
      Cleber Rosa 提交于
      In preparation for the large plugin refactor, let's simplify the code ASAP
      and drop related (custom) functionality that is going to be replaced.
      
      Standard setuptools entrypoints is going to provide better capability then
      our custom code that supports external 'avocado_*.py'module loading.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      7b969527
  7. 07 10月, 2015 2 次提交
  8. 01 10月, 2015 1 次提交
    • L
      avocado.core.loaders: Make it possible to specify test loaders · fddbd88c
      Lukáš Doktor 提交于
      Currently we can only specify the loader plugins order via settings.
      This patch adds "--loaders" argument and improves the granularity.
      Now it's possible to set either @plugin_name, or TEST_TYPE, where
      TEST_TYPE is the mapped name of the plugin (eg. SIMPLE, VT, ...)
      
      There is one special name "DEFAULT", which injects all unspecified
      loaders in the position of the "DEFAULT" keyword. When "DEFAULT" is
      not specified, not-listed plugins/test_types are not evaluated.
      (therefor it's possible to restrict some test loaders or only some
      test types).
      
      As the usecase changed slightly, the settings option was renamed
      from plugins.loader_plugins_priority to plugins.loaders.
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      fddbd88c
  9. 30 9月, 2015 3 次提交
  10. 24 9月, 2015 1 次提交
  11. 03 9月, 2015 2 次提交
    • C
      Selftests: remove evil "simple import magic" · 6149e2dc
      Cleber Rosa 提交于
      Even though I may be the one to blame about coming up with this
      "simple import magic", I believe it was a mistake and we should get
      rid of them.
      
      There are a couple of other ways to actually do development out of
      of a source tree, including running unittests that do not require
      this amount of boiler plate code. Examples include just setting
      the PYTHONPATH environment variable to actually run (setuptools based)
      `python setup.py develop`.
      
      The little bits of what looks like the import magic that was left, is
      not really import magic. It's just that functional tests need to locate
      the Avocado source tree base directory to run the test runner from it.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      6149e2dc
    • C
      Selftests: move to adhere to unittest discover default pattern · 24d87eb4
      Cleber Rosa 提交于
      To be honest, our test code could still be kept in the same directories and
      have the same names. But I think we can improve two things here:
      
      1) Flatten a little bit the directory structure of selftests. Two path
      components are being dropped here: "all" and "avocado". So that
      "selftests/all/functional/avocado" becomes simply
      "selftests/functional".
      
      2) File names match what is, by default, recognized by unittest (the
      Standard Library module) based discovery of tests. That means that
      doc_build_test.py becomes test_doc_build.py. Not a big deal IMHO.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      24d87eb4
  12. 14 8月, 2015 1 次提交
  13. 13 8月, 2015 1 次提交
    • C
      Inner Runner implementation · f364a1ab
      Cleber Rosa 提交于
      In some external test suites, what is defined as a "test" can not be
      run by itself and need a specific runner script/tool.
      
      This introduces the concept of an "inner runner", that is, a custom
      test runner or tool that can deal with custom tests that do follow
      the Avocado SIMPLE test definition.
      
      This implements the Trello card:
      
       https://trello.com/c/TpXecE2n/486-introduce-inner-runner-to-avocado-run
      
      More information can be found in the man page section about it.
      
      Changes from v1:
       * removed "level" from "inner level runner" mentions
       * replicated docs from man page to "main" docs
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      f364a1ab
  14. 04 8月, 2015 1 次提交
  15. 31 7月, 2015 1 次提交
  16. 20 7月, 2015 1 次提交
    • L
      avocado.core.loader: Refactor test loader to be consistent · 3573b193
      Lukáš Doktor 提交于
      Previously the "file" loader was special and always matched the URL
      which might be confusing and lead to problems when developing additional
      plugins.
      
      This commit tires to define the way loaders should work. They must never
      fail (unless of uncaught exception which is reported and next available
      plugins is used). Instead when the URL produces broken test or even a
      single corrupted subtest, consider it as URL not for me and return empty
      set. The loader proxy uses next plugin to resolve this URL. When no
      plugin resolves the URL user is advised to run "avocado list -V" to see
      the potential problems.
      
      The order of loader plugins was also changed. Now the file-loader is
      first by default and all remaining ones are loaded by the plugin
      priority. The order can be changed in setting
      "plugins/loader_plugins_priority". It uses "name" variable of the each
      loader plugin. Not listed plugins are loaded afterwards.
      
      Additionally the whole loader API was simplified. Now it only accepts
      one parameter - list_tests - which is 3-state:
      
      1. ALL       - all tests including broken/incorrect ones
      2. AVAILABLE - available tests (for listing purposes)
      2. DEFAULT   - default tests (to run when no url given)
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      3573b193
  17. 08 7月, 2015 1 次提交
  18. 07 7月, 2015 2 次提交
  19. 18 6月, 2015 1 次提交
  20. 12 6月, 2015 1 次提交
  21. 05 6月, 2015 1 次提交
  22. 06 5月, 2015 1 次提交
  23. 14 4月, 2015 1 次提交
  24. 07 4月, 2015 1 次提交