1. 10 9月, 2015 1 次提交
  2. 09 9月, 2015 2 次提交
  3. 08 9月, 2015 2 次提交
  4. 05 9月, 2015 1 次提交
  5. 04 9月, 2015 2 次提交
  6. 03 9月, 2015 8 次提交
    • L
      selftests/functional/test_interrupt.py: Fix NoSuchProcess bug · 8a5e28d8
      Lucas Meneghel Rodrigues 提交于
      If between psutil.procs() and the instantiation of the Process
      object the given pid has terminated, we'll get a NoSuchProcess
      error from psutils. Let's expand the list comprehension to avoid
      getting caught by such a condition.
      Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
      8a5e28d8
    • L
      Merge pull request #775 from clebergnu/selftests_run_for_setuptools_test · 8b60ae24
      Lucas Meneghel Rodrigues 提交于
      Use standard unittest (and setuptools) for execution of selftests 
      8b60ae24
    • C
      selftests/doc/test_doc_build.py: convert to a unittest test · b8bd211f
      Cleber Rosa 提交于
      All other tests (unit and functional) are based on unittest. Let's do
      the same to this one, so that the default unittest discover code finds
      it and runs it.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      b8bd211f
    • 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: allow tests to be run with "setup.py test" · 333e439b
      Cleber Rosa 提交于
      One standard setuptools command is "test". That command does some useful
      setup and then runs the test in a verbose mode.
      
      There are a couple of reasons for activating that, including that
      setuptools can help us support a Python 3 version of Avocado by
      running 2to3 and even custom fixers before running the tests, or even
      builds and installs.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      333e439b
    • C
      Selftests: drop nose usage for plain unittest discovery · e9c0d813
      Cleber Rosa 提交于
      The unittest module, and unittest2 backport on Python 2.6, is capable of
      finding unittests and running them. So, effectively, we do not need nose
      at all.
      
      This patch removes the dependency on nose, replacing the run script
      with a version based solely on the unittest module.
      
      One change of functionality is that run now looks and runs tests in the
      standard selftests directories (unit, functional, doc), and does not
      accept command line arguments. If one wants to run a subset of them,
      it's pretty easy to just use the unittest module for that:
      
       $ python -m unittest discover -s selftests/unit
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      e9c0d813
    • C
      selftests/functional/test_interrupt.py: silence the test · dae3ea22
      Cleber Rosa 提交于
      When running this functional test with the standard unittest
      discovery/runner it produces output that conflicts with the runner
      output.
      
      It looks like this output is not necessary for the test itself, and
      not that helpful for debugging purposes, so, let's just silence it.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      dae3ea22
    • 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
  7. 15 8月, 2015 2 次提交
  8. 14 8月, 2015 12 次提交
  9. 13 8月, 2015 10 次提交
    • L
      avocado.core.runner: Change the Ctrl+C handling behavior · b9c44e88
      Lucas Meneghel Rodrigues 提交于
      We are too verbose when Ctrl+C is pressed, we can convey
      a sufficient amount of information more concisely. Also,
      instead of printing the first message on the 2nd Ctrl+C
      pressed, print it right away so the user knows that avocado
      understood his/her request.
      Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
      b9c44e88
    • L
      avocado.core.runner: Fix Ctrl+C management · 24daf923
      Lucas Meneghel Rodrigues 提交于
      After a not so successful attempt to fix Ctrl+C management
      (see c400b2f4), I finally figured out the actual problem
      with the way we were doing handling: We just needed a
      clean way to break out of the test loop. Since
      TestRunner.run_test will return False if avocado
      received a Ctrl+C, let's use it to establish a condition
      for breaking the TestRunner.run_suite loop.
      Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
      24daf923
    • L
      avocado.core.runner: Restore behavior of the 'Change the throbber colors' commit · a3a20c17
      Lucas Meneghel Rodrigues 提交于
      On commit d2d6623a, ldoktor
      changes the throbber color. This commit reverts the behavior
      to the one before the Ctrl+C reversion, since that'll be
      better in terms of bisectability.
      Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
      a3a20c17
    • L
      Revert "avocado.core.runner: Do better Ctrl+C handling" · 88848a56
      Lucas Meneghel Rodrigues 提交于
      This reverts commit c400b2f4.
      As a matter of fact the reversion had to be fixed due to
      a conflict with new code that entered that particular part
      of the code. The behavior previous to the commit was kept
      the same, so that we can change things in the next commits.
      Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
      88848a56
    • 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
    • L
      Merge pull request #765 from lmr/more-helpful-subprocess-msg-v2 · e439247d
      Lukáš Doktor 提交于
      [V2] Fix unhelpful message when calling process/GDB APIs
      e439247d
    • L
      Merge pull request #759 from lmr/rename-plugins-avocado-side · 73d29863
      Lukáš Doktor 提交于
      Makefile: Modify avocado-vt plugin links
      73d29863
    • L
      Fix unhelpful message when calling process/GDB APIs · 69c7d0b5
      Lucas Meneghel Rodrigues 提交于
      The process and gdb related APIs trust on subprocess.Popen
      to start a process. When shell=False and the command being
      executed is missing, Subprocss.Popen will raise an OSError
      with errno 2, with no additional message about what file
      is actually missing.
      
      OSError: [Errno 2] No such file or directory
      
      As you might have guessed, my workaround is to capture
      OSErrors with errno 2, and re-raise them with a more
      helpful message.
      
      'File /usr/bin/gdbserver not found'
      Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
      69c7d0b5
    • L
      avocado.core.output: Add a padding space on test list · a2ae5b2c
      Lucas Meneghel Rodrigues 提交于
      This is a slight tweak on the appearance of the test
      list in the human readable output - a single space
      between the beginning of the line and the beginning
      of the output (test numbering).
      
      Before:
      
      avocado run examples/tests/gdbtest.py
      JOB ID     : 569340b20c85ed09a6164e8ce21e7b547e75802a
      JOB LOG    : /home/lmr/avocado/job-results/job-2015-08-12T18.12-569340b/job.log
      TESTS      : 21
      (1/21) examples/tests/gdbtest.py:GdbTest.test_connect_multiple_clients: PASS (2.43 s)
      (2/21) examples/tests/gdbtest.py:GdbTest.test_disconnect: PASS (2.45 s)
       ...
      (21/21) examples/tests/gdbtest.py:GdbTest.test_stream_messages: PASS (0.15 s)
      RESULTS    : PASS 21 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0
      JOB HTML   : /home/lmr/avocado/job-results/job-2015-08-12T18.12-569340b/html/results.html
      TIME       : 19.34 s
      
      After:
      
      avocado run examples/tests/gdbtest.py
      JOB ID     : 569340b20c85ed09a6164e8ce21e7b547e75802a
      JOB LOG    : /home/lmr/avocado/job-results/job-2015-08-12T18.12-569340b/job.log
      TESTS      : 21
       (1/21) examples/tests/gdbtest.py:GdbTest.test_connect_multiple_clients: PASS (2.43 s)
       (2/21) examples/tests/gdbtest.py:GdbTest.test_disconnect: PASS (2.45 s)
       ...
       (21/21) examples/tests/gdbtest.py:GdbTest.test_stream_messages: PASS (0.15 s)
      RESULTS    : PASS 21 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0
      JOB HTML   : /home/lmr/avocado/job-results/job-2015-08-12T18.12-569340b/html/results.html
      TIME       : 19.34 s
      Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
      a2ae5b2c
    • L
      avocado.core.result: Show HTML report at the end of human readable results · 6b6a47fa
      Lucas Meneghel Rodrigues 提交于
      Instead of showing it at the beginning, when it's not
      ready yet.
      
      Before:
      
      JOB ID     : 751ceef63264d7749211875de16a0a719b80ccd3
      JOB LOG    : /home/lmr/avocado/job-results/job-2015-08-12T18.17-751ceef/job.log
      JOB HTML   : /home/lmr/avocado/job-results/job-2015-08-12T18.17-751ceef/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
      
      After:
      
      JOB ID     : b92df2a8389bbc0c3569263968ca6509ec562825
      JOB LOG    : /home/lmr/avocado/job-results/job-2015-08-12T18.17-b92df2a/job.log
      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
      JOB HTML   : /home/lmr/avocado/job-results/job-2015-08-12T18.17-b92df2a/html/results.html
      TIME       : 0.00 s
      Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
      6b6a47fa