1. 10 5月, 2016 1 次提交
  2. 18 3月, 2016 1 次提交
  3. 03 3月, 2016 1 次提交
  4. 02 3月, 2016 1 次提交
  5. 29 2月, 2016 2 次提交
    • C
      Test: remove get_data_path utility API · 58dea874
      Cleber Rosa 提交于
      The get_data_path utility API of the Test class is a convenience,
      it simply joins the name of a given file to the datadir location.
      
      IMHO the value is low when compared to the pollution of the namespace
      and yet another compatibility/stability promise.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      58dea874
    • C
      Test: remove stdout_log and stderr_log attributes · 09ed812b
      Cleber Rosa 提交于
      These two attributes are simply utility logger instances that test
      writers can use to write "directly" to the test process' STDOUT and
      STDERR.
      
      I agree that having those ready to use inside a test is a nice to
      have, but I don't think it justifies the polution to the test class
      namespace.
      
      Let's remove those and document how the user can use Python's standard
      logging API to retrieve the logger instances that Avocado provides to
      tests. This will continue to exist and be supported.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      09ed812b
  6. 07 12月, 2015 1 次提交
    • C
      virtualenv: allow tests to run properly on them · 63aa6df6
      Cleber Rosa 提交于
      While going through the dependency list (requirements*.txt files) and
      performing our self tests out of virtual environments, I noticed that
      some tests are run outside the virtual environments.
      
      The reason is that, even though the virtual environment is activated
      for the test session (and say, `which python` gives `/venv/bin/python`),
      we have hard coded `/usr/bin/python` in most places.
      
      According to the some discussions on the virtualenv project itself[1],
      a quick solution is to revert to the also common `/usr/bin/env python`
      way of pointing to the Python interpreter.
      
      [1] - https://github.com/pypa/virtualenv/issues/124Signed-off-by: NCleber Rosa <crosa@redhat.com>
      63aa6df6
  7. 07 10月, 2015 1 次提交
  8. 05 10月, 2015 1 次提交
  9. 11 9月, 2015 1 次提交
  10. 14 8月, 2015 1 次提交
  11. 28 7月, 2015 1 次提交
    • L
      avocado: Shorter app output · c1728093
      Lucas Meneghel Rodrigues 提交于
      Instead of putting outputs on separate lines, condensate
      test results summary into a single line. The new output
      looks like:
      
      $ avocado run passtest
      JOB ID     : f2f5060440bd57cba646c1f223ec8c40d03f539b
      JOB LOG    : /home/user/avocado/job-results/job-2015-07-27T17.13-f2f5060/job.log
      JOB HTML   : /home/user/avocado/job-results/job-2015-07-27T17.13-f2f5060/html/results.html
      TESTS      : 1
      (1/1) passtest.py:PassTest.test: PASS (0.00 s)
      RESULTS    : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0
      TIME       : 0.00 s
      
      We updated a few unittests in order to not depend on the
      looks of the human output anymore, since unless we are
      specifically testing for human output behavior, the unittests
      should use machine readable output. Also, the documentation
      was updated to reflect the new output layout.
      Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
      c1728093
  12. 07 7月, 2015 1 次提交
  13. 24 6月, 2015 1 次提交
  14. 23 6月, 2015 4 次提交
  15. 15 6月, 2015 1 次提交
  16. 10 6月, 2015 1 次提交
  17. 09 6月, 2015 5 次提交
    • C
      docs: simplify Writing Avocado Test section text · b3788c8a
      Cleber Rosa 提交于
      After reading the text and shuffling the order a bit, I think this
      has an easier to follow structure. A few highlights:
      
      * An Avocado test is really a method, that is, for many methods we
        have many tests.
      * Suppress the attempt to briefly explain the Multiplexer here,
        giving instead a link to a more complete documentation.
      
      Changes from v1:
      * Mention the function naming conventions for the test methods and
        link to PEP 8 relevant section for functions and classes.
      * Break into finer grained sections.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      
      [fixup] docs: simplify Writing Avocado Test section text
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      b3788c8a
    • C
      docs: simplify basic example on Writing Tests Guide · 3c80903c
      Cleber Rosa 提交于
      The idea is to remove everything that is not critical to the user's
      understanding of the core concepts.
      
      Also, to sync to the new multi-test in a single class capabilities
      of Avocado, let's name the main test method `test`. This paves the
      way for other (multi test) examples that name test methods with
      the exact same prefix (test_foo, test_bar and so on).
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      3c80903c
    • C
      docs: reorganization of the Writing Tests section · e01a0d4e
      Cleber Rosa 提交于
      This includes moving the reference text and diagram on test order
      resolution to the Reference Guide. Since this also included
      information on what are simple and instrumented tests, let's
      merge and reuse that.
      
      Also, let's rename "Simple example" to "Basic example" so that it
      does not confuse users with the concept of a Simple Test, since this
      example is actually an Instrumented Test.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      e01a0d4e
    • C
      docs: replace avocado (lowercase) with Avocado (capitalized) · ce4cd9ef
      Cleber Rosa 提交于
      Since Avocado in our context is a proper name, and not really just
      some fruit, let's refer to it using a capitalized word.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      ce4cd9ef
    • 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
  18. 02 6月, 2015 1 次提交
    • L
      avocado.multiplexer: Inject YAML files into /run · 3e5cbc85
      Lukáš Doktor 提交于
      This patch changes the default mux-entry to `/run` as it tends to be
      more convenient.
      
      The biggest change is that this location is used as default location
      for added YAML files. It's also used as the base when using relative
      path YAML file injection. The only way to include file into the exact
      location is to use absolute path (`/your/location`).
      
      The benefit is that single simple YAML file doesn't require any additional
      location and is in the default mux-entry location. Check the documentation
      for details.
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      3e5cbc85
  19. 20 5月, 2015 1 次提交
  20. 16 5月, 2015 2 次提交
    • 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
  21. 24 4月, 2015 2 次提交
  22. 10 4月, 2015 1 次提交
  23. 08 4月, 2015 1 次提交
  24. 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
  25. 20 3月, 2015 1 次提交
  26. 26 2月, 2015 1 次提交
  27. 03 2月, 2015 1 次提交
    • R
      avocado: Add support for recursively finding tests in a directory · f95dc31b
      Rudá Moura 提交于
      Add support to inspect and find tests inside a directory, recursively,
      by using the method `discover_url`. It takes a url (path) and
      returns the tests parameters it discovers.
      
      The loader object has the .discover() method, that can be used
      to inspect the location, and the .validate() method, that will
      discover any problems on the user's input.
      
      We are also changing the behavior of avocado to error out on
      invalid inputs (missing paths or files that are not avocado
      tests). Therefore, the concept of MISSING or NOT_A_TEST both
      disappear from the UI. Unittests were updated to reflect the
      new status quo.
      Signed-off-by: NRudá Moura <rmoura@redhat.com>
      Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
      f95dc31b
  28. 23 1月, 2015 1 次提交
  29. 22 1月, 2015 1 次提交
  30. 16 12月, 2014 1 次提交