1. 18 6月, 2015 3 次提交
  2. 12 6月, 2015 3 次提交
  3. 09 6月, 2015 4 次提交
    • C
      API review: move avocado.gdb to avocado.utils.gdb · f8f898a7
      Cleber Rosa 提交于
      This means also moving its dependencies, namely spark and gdbmi_parser,
      to a place under avocado/utils. I've chosen to add another level here
      to clearly identify those deps as 3rd party external modules that are
      reused in Avocado.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      f8f898a7
    • C
      API review: move avocado.restclient to avocado.core.restclient · adadd5d3
      Cleber Rosa 提交于
      The initial idea about the avocado.restclient namespace was that
      eventually users could write scripts using that as an API to
      interact with avocado-server using Python code.
      
      While the idea is still valid, the avocado-server interface is
      a simple and standards compliant RESTful interface. Thus, users
      can still easily interact with it without us having to support
      a formal Python API at this point.
      
      In the future, if need arises, we can improve the Python REST
      client API and promote it to a public namespace.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      adadd5d3
    • C
      API review: move avocado.linux.kernel_build to avocado.utils.kernel_build · b08ad8c4
      Cleber Rosa 提交于
      And while doing that, also remove avocado.linux for good, since no one else
      lives there.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      b08ad8c4
    • C
      API review: move avocado.test to avocado.core.test and expose avocado.Test · 08810698
      Cleber Rosa 提交于
      Only avocado.Test is of general interest to test writers. For that reason
      the entire test module has been moved to the avocado.core namespace.
      
      The recommended way to go about writing instrumented tests is something like:
      
         from avocado import Test
         class MyTest(Test):
            def test_foo(self):
               do_stuff()
      
      Changes from v2:
      * Fixed references in docstrings
      * Fixed refrences of avocado.test in Writing Test Guide docs
      
      Changes from v1:
      * Fixed comment typo on commit message
      * Fixed old reference of avocado.test (then test.Test) instead of
        avocado then Test in GDB docs.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      08810698
  4. 05 6月, 2015 1 次提交
    • C
      trinity example test: fix fetch of tarball parameter and update to 1.5 · ff4e6741
      Cleber Rosa 提交于
      Because of the parameter behaviour change this test was failing to get
      the name of the tarball to use during the test.
      
      Once that was fixed, there was a couple of build errors. Instead of
      debugging the build of the 1.4 version, I tried version 1.5, which
      built without any problems. Let's use this oppotunity to fix the
      test (wrapper) and update the (original test) tarball.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      ff4e6741
  5. 19 5月, 2015 1 次提交
  6. 16 5月, 2015 3 次提交
    • L
      avocado.multiplexer: Switch to the new API · d727bfe0
      Lukáš Doktor 提交于
      This patch adds documentation of the "new params API" and removes the
      compatility layer. From now on only the API with paths is valid:
      
          self.params.get(key, path='*', default=None)
      
      where the default path '*' matches anything from --mux-entry path.
      Default path is `/test`.
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      d727bfe0
    • L
      examples.tests: Adjust tests to use new params API · 8e2ddf58
      Lukáš Doktor 提交于
      This patch modifies all example tests to use the new API. It uses the
      default path, which is `*`, which matches the mux-entry paths ONLY.
      In order to get the values it's necessarily to inject the YAML files
      into the mux-entry path, by default `/test`, eg:
      
          avocado run sleeptest -m /test:examples/tests/sleeptest.py.data/
          sleeptest.yaml
      
      It might seen as a bit more complicated to execute, but it's definitely
      easier for maintaining and combining existing YAML files. To execute
      matrix of tests you simply inject them into 2 different `/test` children,
      eg: `-m /test/by_length:lengths.yaml /test/by_method:methods.yaml`.
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      8e2ddf58
    • L
      avocado.multiplexer: Use !mux and support for recursive mux · f5ce7a45
      Lukáš Doktor 提交于
      This patch modifies the multiplexer logic to support full recursive
      multiplexation, unlike the old version which only flattened the
      multiplexed nodes. This allows greater flexibility.
      
      Additionally it removes the !join flag and inverts the logic to use !mux
      instead. By default leaves are not multiplexed and all are part of the
      current params. Users can specify exact nodes which get multiplexed by
      using !mux keyword.
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      f5ce7a45
  7. 15 5月, 2015 1 次提交
  8. 06 5月, 2015 1 次提交
  9. 05 5月, 2015 1 次提交
  10. 24 4月, 2015 2 次提交
  11. 21 4月, 2015 1 次提交
  12. 15 4月, 2015 2 次提交
  13. 14 4月, 2015 1 次提交
  14. 09 4月, 2015 2 次提交
    • L
      examples.tests: Correct multiplextest yaml file · 135ecc7d
      Lukáš Doktor 提交于
      Multiplextest contains in /guest/os contains Linux and Windows branches.
      These branches are mutually exclusive thus they need to be !join-ed.
      
      Additionally I reworked the /host/kernel_config and split the "numa" vs.
      "page_size" variants and added "default". This IMO reflects the
      real-world usage better.
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      135ecc7d
    • L
      avocado.test: Add support for params with paths · 1c9eb21b
      Lukáš Doktor 提交于
      This is a testing version of params with paths support. By default
      it acts as the old Params, but you can use params.get(key, path=....)
      to utilize new-params handling.
      
      For now the PATH for relative paths is hardcoded to "/test/*" but it
      will be specifiable on the command line. I just need to pass it to the
      test which I'd like to do over "metadata" (see below) rather then adding
      it temporarily to the params and risk colisions.
      
      The code is not optimized and in order to be compatible it uses old
      concepts. Some of them I'd like to get rid of in near future:
      
      * default_params => currently used only to set default "metadata" like
        test timeout. I'd like to replace it for RW Test.metadata, which would
        be overwritten durint __init__ if params contain the keys in specific
        paths. IMO they shouldn't be shared with test params.
      * test_factory's params are currently dict with some metadata like
        wether this test is executed from directory or by uri. Again, they are
        metadata and should be handled separately. Some of them might be reused
        to params if needed, but not generaly.
      * create separated multiplexer plugin generate multiple variants
      * reconsider the need for "objects", "object_params" and "object_counts"
      * couple of others I forget to mention...
      
      There is one real change I made, I got rid of ${key}_${type} to specify
      type of the argument. Yaml supports any type we might like and by
      our convention all tests should be written to work without any params.
      Thus this is IMO more confusing, than beneficial. But if you insist
      I can copy&paste the support for it.
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      1c9eb21b
  15. 08 4月, 2015 1 次提交
  16. 07 4月, 2015 1 次提交
  17. 31 3月, 2015 1 次提交
  18. 25 3月, 2015 1 次提交
    • L
      scripts.avocado-bash-utils: Add Avocado bash utils · fa0e77a7
      Lukáš Doktor 提交于
      This patch is initial support for people using custom bash scripts
      with avocado. Tests should use:
      
          PATH=$(avocado "exec-path"):$PATH
      
      and then they can utilize the helpers.
      
      This version contain functions to write to Test.log the same way it's
      possible from python including failing the test with TestWarn in case
      avocado_warn was used.
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      fa0e77a7
  19. 13 3月, 2015 1 次提交
  20. 04 3月, 2015 1 次提交
    • L
      avocado.test: Fortify avocado before very nasty exceptions · fda1dde4
      Lukáš Doktor 提交于
      The NastyException error is back:
      
      class NastyException(Exception):
          def __init__(self, msg):
              self.msg = msg
          def __str__(self):
              return self.msg
      
      crashes Avocado. The problem is we are trying to re-raise the exceptions
      and then read the traceback again. Even reading of the details of this
      very nasty written exception causes critical failure.
      
      What this patch does instead of handling issues wherever we produce
      them, it waits till the exception bubbles to the entry-point and it
      tries to read it. If it fails, we log the original traceback
      (information about the failure) and then user-friendly message saying
      we're unable to retrieve the original failure.
      
      Additionally I had to modify the xunit output as in case of very nasty
      inputs it's unable to reproduce the values.
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      fda1dde4
  21. 27 2月, 2015 3 次提交
  22. 26 2月, 2015 5 次提交