1. 08 6月, 2017 1 次提交
  2. 07 6月, 2017 1 次提交
  3. 31 5月, 2017 2 次提交
  4. 30 5月, 2017 2 次提交
  5. 29 5月, 2017 1 次提交
  6. 26 5月, 2017 3 次提交
    • C
      docstring directives: define more formal and strict format · 1719d983
      Cleber Rosa 提交于
      The format of the docstring directives has not been formally described
      so far.  Because at least two different features are built on that,
      and possibly more will come, it's a good idea to define a format.
      
      This introduces a stricter format, basically adding a number of
      requirements or rules.  To make the following description more
      consistent let's call the "🥑" part of the docstring directive
      "the marker" and what follows it the "content".
      
      1) One or more spaces are required between the "🥑" marker and
         the content.  The following is a valid docstring directive:
      
         "🥑 enable"
      
         While this is invalid:
      
         ":avocado:enable"
      
      2) A more limited set of characters are now allowed in the content,
         namely one from the following set: [a-zA-Z0-9_:,=].  The following
         is a valid docstring directive:
      
         "🥑 foo=bar,foz=baz:extra"
      
         While the following is invalid:
      
         "🥑 foo=bar!"
      
      3) The first character of the content must be alphanumeric, so the
         following is a valid docstring directive:
      
         "🥑 foo=bar"
      
         While the following is invalid:
      
         "🥑 =bar"
      
      4) An end of string (or end of line) is now required after the content
         (which itself may not contain white spaces).  The following is a
         valid docstring directive:
      
         "🥑 enable"
      
         While the following is invalid:
      
         "🥑 enable FOO"
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      1719d983
    • A
      selftests: remove redundant test · 6cb2f710
      Amador Pahim 提交于
      with the new 'test_statuses.py', this test became redundant.
      Signed-off-by: NAmador Pahim <apahim@redhat.com>
      6cb2f710
    • A
      test: always execute tearDown() · 2c571c7d
      Amador Pahim 提交于
      Currently, when something goes wrong in setUp(), tearDown() is not
      executed. This patch changes the behaviour of our Test class, making the
      tearDown() to be always executed, regardless what happens in setUp().
      
      Reference: https://trello.com/c/zSZ4xFwpSigned-off-by: NAmador Pahim <apahim@redhat.com>
      2c571c7d
  7. 24 5月, 2017 3 次提交
    • L
      selftests: Silence `inspekt lint` unless there is an error · b97a4cfa
      Lukáš Doktor 提交于
      For couple of weeks the `inspekt lint` produces unwanted `Your code has
      been rated at 10.00/10 (previous run: 10.00/10, +0.00)` messages
      polluting the log too much for me to bear. I tried to remove those
      messages, but so far I haven't found a solution, so let's just silence
      it unless there is a lint failure.
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      b97a4cfa
    • C
      avocado list command: also show tag statistics · e3e2cf33
      Cleber Rosa 提交于
      Just like `avocado list` presents the statistics for the test types,
      it may be useful to also list the number of tests that have a
      particular tag.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      e3e2cf33
    • C
      avocado list command: also list test tags · e9ad7b6d
      Cleber Rosa 提交于
      Test tags (via docstring directives) have been supported in Avocado
      for a number of releases, but up until now user would only be able to
      see the tags on their tests by resorting to the source code.
      
      This was already difficult when the tags where set only at the class
      level, now that they can be set both on the class and method
      docstring, users would have to do the "math" on their minds.
      
      Let's display the test tags when the verbose switch is given to the
      list command to make the life of users easier.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      e9ad7b6d
  8. 23 5月, 2017 3 次提交
  9. 18 5月, 2017 2 次提交
  10. 15 5月, 2017 5 次提交
  11. 13 5月, 2017 2 次提交
    • C
      Human Interface: show job execution time · 9b307c7c
      Cleber Rosa 提交于
      A long standing task is to show the job execution time, instead of the
      sum of tests execution time.  After some major work, this is now
      possible.
      
      This change adds the job execution time to the human interface UI, in
      addition to the test execution time.  Some users may prefer the job
      execution time alone, while others may prefer all the time statistics
      on a single line.
      
      Since we cannot please everyone, this version just adds it.  I believe
      UI tweaks can follow.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      9b307c7c
    • C
      Job: add time accounting · c632993f
      Cleber Rosa 提交于
      It may be useful to users of the Job class to have information on how
      much time it took for it to run.  Since the goal for the Job class is
      to be flexible when it comes to its usage, it may not be possible to
      track the execution time if users follow a different path.
      
      For now, the time accouting is done automatically if users use the
      `run()` method.
      
      If advanced users of the Job class choose to set the start time, end
      time and elapsed time themselves, they are free to do it and `run()`
      will never overwrite it.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      c632993f
  12. 11 5月, 2017 1 次提交
  13. 04 5月, 2017 3 次提交
    • L
      replay: Add support to resume interrupted/crashed job · 2b544f0b
      Lukáš Doktor 提交于
      This commit adds "--replay-resume" argument, which is basically a
      symlink to "--replay-test-status INTERRUPTED", therefor it executes only
      the tests which were interrupted, or not executed (as we use INTERRUPTED
      in Replay internally to represent not-executed-tests).
      
      As the "results.json" used to get the list of tests might not be
      available on a system crash, this also adds a fallback to use
      "results.tap", which is a machine readable, streamline format. It does
      not represent all available test statuses, but as a fallback it works
      well.
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      2b544f0b
    • L
      replay: Include non-executed tests in replay map · 95098498
      Lukáš Doktor 提交于
      The "results.json" includes only executed tests in "tests" while the
      non-executed tests are only included in the overall info like "total".
      Let's append "UNKNOWN" tests at the end of the "tests" to represent
      those non-executed tests and mark them as "INTERRUPTED".
      
      According to our meanings they'd be "SKIP" tests, but this is local
      representation for Replay only and we would not be able to distinguish
      between SKIP and SKIP-AFTER-INTERRUPTION, which is super handy. To avoid
      introducing new/artifical status, let's use INTERRUPTED which works for
      our scenario and in the future we might expand it if needed.
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      95098498
    • A
      loader: support tags in test methods · 933d6b3b
      Amador Pahim 提交于
      Currently we only support tags in test classes. This patch adds the
      tags feature to the test methods. Test methods will iherit the tags from
      its class.
      Signed-off-by: NAmador Pahim <apahim@redhat.com>
      933d6b3b
  14. 03 5月, 2017 2 次提交
  15. 27 4月, 2017 1 次提交
    • A
      skip classes: internal improvements · d6056afb
      Amador Pahim 提交于
      Due to the deprecation of the self.skip(), the availability of the skip
      decorators and the new CANCEL status, some internal improvements are
      important to keep our behaviour sane and our own code sound and clean.
      
      - The test.SkipTest class was renamed to test.MockingTest to be even more
        generic, intending to be overridden by sub-classes that make the test
        to end both with SKIP or CANCEL status. To keep it generic,
        test.MockingTest class will not SKIP the test if used directly anymore.
      
      - The test.TimeOutSkipTest and test.ReplaySkipTest classes now are using
        the skip decorators instead of raising an exception in setUp(), since
        'skipping' the test means 'don't execute anything', not even the
        setUp().
      
      - The test.DryRunTest class, which is expected to log itself in setUp()
        and then abort the test execution, is now using self.cancel() (instead
        of raising a SKIP exception), being now compliant with the concept
        that a SKIP test cannot execute anything.
      
      - Selftests were adjusted accordingly.
      Signed-off-by: NAmador Pahim <apahim@redhat.com>
      d6056afb
  16. 25 4月, 2017 2 次提交
    • L
      runner: Increase test postprocess timeout · 76d6efa5
      Lukáš Doktor 提交于
      Currently there is a hardcoded test-postprocess timeout consisting of
      two cycle-timeouts which is something between 1 and 2 seconds. This is
      not sufficient on heavily loaded machines so this patch increases the
      timeouts to:
      
       1s: when test was interrupted (ctrl+c/timeout)
      10s: when the process died but the status was not yet delivered
      60s: when test reported status but the process did not finish
      
      taking into account the current available test/job timeout.
      
      As those deadlines are significantly longer, users could have noticed a
      frozen throbber, which is why I propagate the results_dispatcher and
      handle the throbber also during the postprocess, which makes this patch
      a bit more complicated than one would expect. I used "progress = False"
      to distinguish between running test and postprocessing it.
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      76d6efa5
    • L
      selftests: Increase the test_job_timeout selftest timeout · d353959d
      Lukáš Doktor 提交于
      The current 2s sleep is too-time-sensitive for travis from time to
      time. Let's increase the test's sleep to 10s.
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      d353959d
  17. 24 4月, 2017 1 次提交
  18. 21 4月, 2017 2 次提交
  19. 20 4月, 2017 1 次提交
  20. 18 4月, 2017 1 次提交
  21. 13 4月, 2017 1 次提交
    • L
      selftests: Run check_tmp_dirs between selftests · 00d4d3aa
      Lukáš Doktor 提交于
      This commit enables the left-behind-temporary-dirs check between each
      test. As all selftests are executed as a single process the BORG class
      keeps the TMP dir of the unit-tests. To avoid results spoiled by this
      fact this commit adds a force-cleanup of the tmp dir tracker overriding
      the BORG internal state, which is not really nice, but for selftests
      acceptable.
      
      The method to clean it was especially named
      "unittest_refresh_dir_tracker" to emphasize it should not be used
      outside of unittest.
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      00d4d3aa