1. 22 3月, 2018 9 次提交
  2. 21 3月, 2018 9 次提交
  3. 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
  4. 19 3月, 2018 3 次提交
  5. 18 3月, 2018 1 次提交
    • A
      test results: optimize params information · d5076fac
      Amador Pahim 提交于
      Currently we propagate to test results the AvacadoParams object used by
      the test. Holding that object in the test results makes the Avocado
      process to consume a lot of memory.
      
      For instance, in an Avocado job with 5000 tests (passtest.py), with
      Avocado-VT in place, the Job object grows up from 59MB before running
      the tests to 274MB after running the tests, a 215MB growth::
      
          (Pdb) pre_tests
          Partition of a set of 440754 objects. Total size = 59066528 bytes.
      
          (Pdb) post_tests
          Partition of a set of 1570821 objects. Total size = 274340184 bytes.
      
          (Pdb) growth
          Partition of a set of 1130073 objects. Total size = 215274464 bytes.
      
      Since the 'params' item is important for both the HTML report and the
      ResultsDB report, instead of dropping the 'params' item from the
      results, this patch parses the AvocadoParams, populating the test
      results with a list of tuples, each one containing the 'path', 'key' and
      'value' per parameter basis. This improves the situation a lot. The same
      Avocado Job will now only grow up from 59MB to 89MB::
      
          (Pdb) pre_tests
          Partition of a set of 440747 objects. Total size = 59066424 bytes.
      
          (Pdb) post_tests
          Partition of a set of 840812 objects. Total size = 89619904 bytes.
      
          (Pdb) growth
          Partition of a set of 400071 objects. Total size = 30554288 bytes.
      
      The HTML and ResultsDB plugins were adapted accordingly.
      Signed-off-by: NAmador Pahim <apahim@redhat.com>
      d5076fac
  6. 16 3月, 2018 6 次提交
  7. 15 3月, 2018 4 次提交
  8. 14 3月, 2018 6 次提交
  9. 13 3月, 2018 1 次提交
    • C
      avocado/core/tree.py: allow MuxTreeNode to be hashed under Python 3 · 3d41ea15
      Cleber Rosa 提交于
      Under Python 3, as in Python 2, most objects are automatically
      hashable.  Example:
      
         >>> class Foo(object):
         >>>     pass
         >>> hash(Foo())
         >>> 8760583602380
      
      But if an object that implements __eq__ also has to implement
      __hash__.  Under Python 3:
      
         >>> class Foo(object):
         >>>     def __eq__(self, other):
         >>>         return False
         Traceback (most recent call last):
         File "<stdin>", line 1, in <module>
         TypeError: unhashable type: 'Foo'
      
      Since TreeNode implements __eq__, under Python 3, it *must* implement
      __hash__.  There are a few tricky points, though.  One of them is that
      "The only required property is that objects which compare equal have
      the same hash value".  TreeNodes have a very flexible equality
      comparison, which cannot be taken into account in a hash
      implementation which doesn't have access to the "other" object.
      
      To the best of my knowledge, the way to go with the TreeNode __hash__
      implementation is to take into account the comparison of all
      attributes that are used on __eq__ (name, values, children) and use
      those as the composition for __hash__, as suggested by the Python
      docs.  Unfortunately, some of the content of "values" and "children"
      may themselves be unshashable values (such as dicts coming from YAML
      test suite loader).  My coward's way out here was to use a string
      representation of such unhashable types to compose the TreeNode hash.
      
      This fixes 5 unittests of the varianter_yaml_to_mux plugin when
      run under Python 3, such as:
      
          ======================================================================
          ERROR: test_get_rel_path (tests.test_mux.TestAvocadoParams)
          ----------------------------------------------------------------------
            ....
              if len(set([_[1] for _ in ret])) == 1:  # single source of results
          TypeError: unhashable type: 'MuxTreeNode'
      
      Reference: https://docs.python.org/3/reference/datamodel.html#object.__hash__Signed-off-by: NCleber Rosa <crosa@redhat.com>
      3d41ea15