1. 19 4月, 2018 1 次提交
  2. 18 4月, 2018 1 次提交
    • C
      Travis-CI: skip tests that are time/resource sensitive · 822095d5
      Cleber Rosa 提交于
      And that have been causing failures on Travis jobs, due to limited
      on unreliable amount of resources present.
      
      This is the full list of tests that won't be run anymore on Travis,
      only on `make check-full`:
      
        selftests.functional.test_basic.RunnerOperationTest.test_early_latest_result
        selftests.functional.test_basic.RunnerSimpleTest.test_kill_stopped_sleep
        selftests.functional.test_interrupt.InterruptTest.test_well_behaved_sigint
        selftests.functional.test_interrupt.InterruptTest.test_well_behaved_sigterm
        selftests.functional.test_loader.LoaderTestFunctional.test_simple_using_main
        selftests.functional.test_loader.LoaderTestFunctional.test_sleep_a_lot
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      822095d5
  3. 16 4月, 2018 1 次提交
  4. 14 4月, 2018 1 次提交
  5. 11 4月, 2018 1 次提交
  6. 05 4月, 2018 2 次提交
  7. 28 3月, 2018 4 次提交
  8. 26 3月, 2018 1 次提交
    • C
      avocado.utils.process: attempt first to decode bytes into text · 79d99673
      Cleber Rosa 提交于
      And only if the method is not available, attempt to fallback to
      the stdout itself if it is a string.
      
      Before 30617c1e, the following kind of check was done:
      
         >>> type(bytes('foo')) in string_types
         False
      
      And after it, the check was changed to:
      
         >>> isinstance(bytes('foo'), string_types)
         True
      
      That made the bytes decoding not to be performed at times.  While the
      new check is correct, we should favor the attempt to decode, and
      only if not available, fallback to the original stdout if it looks
      like a string.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      79d99673
  9. 24 3月, 2018 3 次提交
  10. 22 3月, 2018 4 次提交
  11. 21 3月, 2018 2 次提交
  12. 20 3月, 2018 1 次提交
    • C
      Travis-CI: whitelist style check errors · aadb1c9a
      Cleber Rosa 提交于
      The latest jobs have been failing because of the following issues:
      
          ************* Module raise
          E1130: 48,30: Raise.test: bad operand type for unary -: NoneType
          ************* Module selftests.functional.test_basic
          I1101:1191,24: PluginsXunitTest.run_and_check: Module 'lxml.etree'
          has not 'XMLSchema' member, but source is unavailable. Consider
          adding this module to extension-pkg-whitelist if you want to
          perform analysis based on run-time introspection of living
          objects.
          I1101:1191,40: PluginsXunitTest.run_and_check: Module 'lxml.etree'
          has not 'parse' member, but source is unavailable. Consider adding
          this module to extension-pkg-whitelist if you want to perform
          analysis based on run-time introspection of living objects.
          I1101:1193,43: PluginsXunitTest.run_and_check: Module 'lxml.etree'
          has not 'parse' member, but source is unavailable. Consider adding
          this module to extension-pkg-whitelist if you want to perform
          analysis based on run-time introspection of living objects.
          ************* Module selftests.unit.test_xunit
          I1101: 91,24: xUnitSucceedTest.test_add_success: Module
          'lxml.etree' has not 'XMLSchema' member, but source is
          unavailable. Consider adding this module to
          extension-pkg-whitelist if you want to perform analysis based on
          run-time introspection of living objects.
          I1101: 91,40: xUnitSucceedTest.test_add_success: Module
          'lxml.etree' has not 'parse' member, but source is
          unavailable. Consider adding this module to
          extension-pkg-whitelist if you want to perform analysis based on
          run-time introspection of living objects.
          I1101: 92,43: xUnitSucceedTest.test_add_success: Module
          'lxml.etree' has not 'parse' member, but source is
          unavailable. Consider adding this module to
          extension-pkg-whitelist if you want to perform analysis based on
          run-time introspection of living objects.
      
      We can't whitelist the `lxml.etree` module at this time (inspekt doesn't
      have such an option) and the raise failure is a false positive.  Let's
      ignore those issues then.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      aadb1c9a
  13. 16 3月, 2018 1 次提交
  14. 15 3月, 2018 2 次提交
  15. 13 3月, 2018 1 次提交
  16. 08 3月, 2018 3 次提交
  17. 26 2月, 2018 1 次提交
    • C
      avocado/utils/process.py: make CmdResult.std{out,err}_text smarter · 72bdab0f
      Cleber Rosa 提交于
      In situations where a user of the CmdResult class manually sets the
      stdout/stderr attributes to a string, instead of the recommended and
      documented content of type "bytes", it won't be possible to "decode"
      the bytes into a string of a given encoding, and we'll end up with
      a crash.
      
      Since the goal of std{out,err}_text is to return a text version
      of stdout, if itself already is of such a type, let's just return
      it.
      
      Additionally, if the data cannot be "decode()d", let's raise an
      explicit TypeError on this location, rather than later in the code
      when its value is attempted to be used.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      72bdab0f
  18. 23 2月, 2018 9 次提交
    • A
      Support variants dump/load · cf6aab6a
      Amador Pahim 提交于
      Depending on the number of parameters, generating the Variants can be
      compute intensive. This patch adds the ability to dump/load the variants
      to/from a JSON file so the Variants generation can be offloaded from the
      machine under test.
      
      Reference: https://trello.com/c/llZJKBdiSigned-off-by: NAmador Pahim <apahim@redhat.com>
      cf6aab6a
    • C
      selftests/unit/test_runner_queue.py: use absolute path for module · 1e4fdaa8
      Cleber Rosa 提交于
      Looks like the Python 3 module import code behaves differently than
      Python 2 with regards to where it looks modules by name:
      
         File "/home/cleber/src/avocado/avocado/avocado/core/test.py", line 932, in _run_avocado
            raise test_exception
         File "/home/cleber/src/avocado/avocado/avocado/core/test.py", line 819, in _run_avocado
            testMethod()
         File "/home/cleber/src/avocado/avocado/avocado/core/test.py", line 1371, in test
            self.error(self.exception)
         File "/home/cleber/src/avocado/avocado/avocado/core/test.py", line 1041, in error
            raise exceptions.TestError(message)\navocado.core.exceptions.TestError: Traceback (most recent call last):
         File "/usr/lib64/python3.6/imp.py", line 297, in find_module
            raise ImportError(_ERR_MSG.format(name), name=name)
         ImportError: No module named \'whiteboard\'\n\n'
      
      Effectively, this means when running this test, on Python 3, on the
      parallel mode, the change of directory implemented there
      (on selftests/checkall) will make Python 3 fail to find this module,
      and the test will fail.
      
      This makes the reference to the module path absolute, so no matter
      where this test is run from, it should be able to find the module.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      1e4fdaa8
    • C
      Python 3: do not allow failures on CI, but only run unittests and doc · 494405ae
      Cleber Rosa 提交于
      This removes the exception of allowing failures on the Travis CI jobs
      with Python 3, while, at the same time, temporary restricts Python 3
      jobs to run only unittests and the documentation build for the Avocado
      core.  That is, it excludes the functional tests, and the optional
      plugin's tests.
      
      While it may look like a step back, it's actually a step forward in the
      Python 3 port, because now any regression on the unittests will be caught.
      And, when the additional fixes are applied to address the functional tests
      and plugin's tests, the whole set of tests will be enabled for Python 3.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      494405ae
    • C
      selftests/functional/test_basic.py: also check for HTML entity references · f5b0ac93
      Cleber Rosa 提交于
      The pystache library on Python 3 will generated an HTML file with entity
      references for the single quote char, instead of the literal char.
      
      Let's check for either one of them in the functional test
      test_basic.RunnerSimpleTest.test_fs_unfriendly_run().
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      f5b0ac93
    • C
      selftests/functional/test_output.py: use bytes in comparison · 1cc77039
      Cleber Rosa 提交于
      The content on the file is being read as bytes, so let's use byte
      literals in the comparison.
      
      The error message received some adjustments, mainly because it could
      produce weird stuff text such as "1th" or "2th".  To be honest, I'd
      remove this error message completely, the assertion error is pretty
      easy to spot IMO.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      1cc77039
    • C
      selftests/functional/test_loader.py: use text in comparisons · b038ca38
      Cleber Rosa 提交于
      This fixes the functional test
      test_loader.LoaderTestFunctional.test_yaml_loader_run.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      b038ca38
    • C
      selftests/functional/test_output.py: use command output as text · 67804026
      Cleber Rosa 提交于
      Instead of as bytes in assertions, specially because of a part of it
      is going to be used as a path.  This fixes the following issue:
      
          ======================================================================
          ERROR: test_default_enabled_plugins (test_output.OutputPluginTest)
          ----------------------------------------------------------------------
          Traceback (most recent call last):
            File "/home/cleber/src/avocado/avocado/selftests/functional/test_output.py", line 509, in test_default_enabled_plugins
              self.check_output_files(debug_log)
            File "/home/cleber/src/avocado/avocado/selftests/functional/test_output.py", line 286, in check_output_files
              json_output_path = os.path.join(base_dir, 'results.json')
            File "/usr/lib64/python3.6/posixpath.py", line 92, in join
              genericpath._check_arg_types('join', a, *p)
            File "/usr/lib64/python3.6/genericpath.py", line 151, in _check_arg_types
              raise TypeError("Can't mix strings and bytes in path components") from None
          TypeError: Can't mix strings and bytes in path components
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      67804026
    • C
      selftests/functional/test_job_timeout.py: use bytes in comparison · 840389cb
      Cleber Rosa 提交于
      This fixes the functional test "test_invalid_values" (from
      test_job_timeout.JobTimeOutTest).
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      840389cb
    • C
      13127695
  19. 22 2月, 2018 1 次提交