1. 22 9月, 2018 1 次提交
  2. 18 9月, 2018 3 次提交
  3. 24 8月, 2018 1 次提交
  4. 24 3月, 2018 1 次提交
    • C
      Lint: W0622 fixes · 7fb38a04
      Cleber Rosa 提交于
      The following two issues come up on the CI environment:
      
          ************* Module avocado_runner_remote
          W0622: 51,0: ConnectionError: Redefining built-in 'ConnectionError'
          ************* Module tests.test_mux
          W0622:130,8: TestMuxTree.test_basic_functions: Redefining built-in 'ascii'
      
      And are fixed here.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      7fb38a04
  5. 22 3月, 2018 1 次提交
  6. 13 3月, 2018 1 次提交
    • C
      test_fingerprint_order: work around dict items representation · 27656da5
      Cleber Rosa 提交于
      In Python 3, the order of a dictionary items will be different than
      under Python 2.  To not have to change the supporting code to return
      OrderedDicts, let's just simplify the comparison, breaking them down
      into each dictionary item.
      
      This fixes the varianter_yaml_to_mux plugin unittest failure under
      Python 3:
      
          ======================================================================
          FAIL: test_fingerprint_order (tests.test_mux.TestMuxTree)
          ----------------------------------------------------------------------
          Traceback (most recent call last):
            File "/home/cleber/src/avocado/avocado/optional_plugins/varianter_yaml_to_mux/tests/test_mux.py", line 231, in test_fingerprint_order
              self.assertEqual(str(variant1), "{'paths': '', 'variant': "
          AssertionError: "{'variant_id': 'child1-child2-9154', 'varia[65 chars] ''}" != "{'paths': '', 'variant': [TreeNode(name='ch[65 chars]54'}"
          - {'variant_id': 'child1-child2-9154', 'variant': [TreeNode(name='child1'), TreeNode(name='child2')], 'paths': ''}
          + {'paths': '', 'variant': [TreeNode(name='child1'), TreeNode(name='child2')], 'variant_id': 'child1-child2-9154'}
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      27656da5
  7. 26 2月, 2018 1 次提交
    • C
      Style only change: make it clear that there's a node being created · 7f8a83d0
      Cleber Rosa 提交于
      The current code style creates and appends an object into the list,
      and then later implicitly references that item using the `[-1]`
      notation, changing its filter.
      
      While correct, IMO, it's easier to follow code that creates the
      object, sets its values, and then appends it to the list.
      
      This was a style only change that appeared while debugging another
      mux related issue.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      7f8a83d0
  8. 23 2月, 2018 2 次提交
  9. 16 2月, 2018 1 次提交
  10. 21 12月, 2017 3 次提交
  11. 14 12月, 2017 2 次提交
  12. 01 12月, 2017 2 次提交
  13. 29 11月, 2017 1 次提交
    • C
      Move mux module to the variater plugin · b3812995
      Cleber Rosa 提交于
      There was once an idea that the "mux" would be an interface that would
      be reused by other implementations (say, json_to_mux, foo_to_mux,
      etc).  Now, it seems much more important to make the Avocado varianter
      design and interfaces better, and advocate its use instead.
      
      Additionally, there has always been a gray line between the
      Multiplexer and the Avocado params.  Moving the mux outside of the
      Avocado core will help to draw clearer lines.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      b3812995
  14. 13 10月, 2017 1 次提交
  15. 11 10月, 2017 1 次提交
  16. 15 9月, 2017 2 次提交
    • L
      yaml_to_mux: Construct tree as OrderedDict · 7e887c03
      Lukáš Doktor 提交于
      Don't create nodes directly, but first attempt to use OrderedDict. If
      advanced features (tags, ...) are detected, declare the current mapping
      TreeNode and follow as before. In the end create mapping which should
      turn the directly connected OrderedDicts into TreeNodes while keep the
      hidden user dicts as OrderedDicts.
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      7e887c03
    • L
      selftests: Make sure to use correct basedir · c4dcff6d
      Lukáš Doktor 提交于
      The basedir was mainly set correctly, but sometimes not used in some of
      the tests. Let's move the `os.chdir` to `setUp` phase where it makes
      sense and add new ones where they were not present.
      
      Related to basedir the test_mux was using hardcoded path based on the
      method used to execute the test, let's change it to `__file__` which
      gives better results.
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      c4dcff6d
  17. 15 6月, 2017 1 次提交
  18. 30 5月, 2017 1 次提交
  19. 24 4月, 2017 1 次提交
  20. 12 4月, 2017 2 次提交
    • L
      mux: Improve the variant_id · dd1919d4
      Lukáš Doktor 提交于
      Use the combination of path-ordered leaves names and a hash of combined
      fingerprint as variant_id. This should improve human-readability of the
      results and also it should produce machine-friendly unique names, which
      change when values in variant are modified.
      
      Because the leaves names are ordered by path, the order of yaml file
      does not affect the variant_id. On the other hand any modified/added
      value changes the fingerprint and therefor variant_id.
      
      Important feature is also that the variant still contains the
      default_params, but the variant-id is not affected by it.
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      dd1919d4
    • L
      tree: Add support "fingerprint" method · 3262c280
      Lukáš Doktor 提交于
      The TreeNode.fingerprint() generates string, which represents the value
      of the node. The idea is to represent the content of the node and it's
      environment and such for the purpose of evaluating, whether other node
      is alike.
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      3262c280
  21. 31 3月, 2017 1 次提交
    • L
      mux: Add support for internal filters · 20364904
      Lukáš Doktor 提交于
      This adds the support to define per-node filters, which take part of
      environment and are evaluated during multiplexation.
      
      The basic idea is to define relations ({could be only used | could
      not be used} with other branch), which makes it a bit different from
      what we know from `--mux-filter-{only|out}`:
      
      1. They are applied per complete variant (because the filters are
         compound of per-leaf-filters)
      2. They don't remove/keep the nodes, but they only evaluate whether
         this resulting variant makes sense (whether it passes the filters)
      
      See the updated documentation for details.
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      20364904
  22. 04 3月, 2017 1 次提交
    • L
      varianter: Make it properly pluggable · bae47d00
      Lukáš Doktor 提交于
      This patch replaces the hardcoded mux in Varianter for list of Varianter
      plugins, iterating through all of them to produce all specified
      variants. The interface is described in `avocado.core.plugin_interfaces`
      and we also provide base-implementation for Mux-like plugins in
      `avocado.core.mux`.
      
      Mainly this PR is about defining the stevedore entry points, moving the
      code around and wrapping the code into a class according the defined
      stevedore interface. Doing so allowed us to simplify the `MuxTree`
      object which does not need to keep track of the `root` of the tree,
      because the root is stored in the pluggin's instance.
      
      There is still one potential issue in Varianter which is probably even
      more visible now, which is that we are pickling it in jobdata in order
      to be able to reproduce the variants when re-running/diffing the job.
      Before this was prone to code-changes but now it can be even worse as
      multiple plugins can be enabled and can break loading of the previous
      state. To avoid the potential breakage this version simply initializes
      only the available extensions which should produce only the supported
      variants.
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      bae47d00
  23. 16 2月, 2017 1 次提交
    • L
      yaml_to_mux: Use custom yaml.Loader · 0851e22e
      Lukáš Doktor 提交于
      Previously we were directly using the yaml.Loader, which is shared
      across all `yaml` instances. This patch creates a `_BaseLoader` with the
      basic set of constructors. That one is copied and updated of the
      run-time data (debug/non-debug) during the `_create_from_yaml` to allow
      loading debug and non-debug files in a single execution without
      overriding the same loader.
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      0851e22e
  24. 06 2月, 2017 1 次提交
  25. 03 1月, 2017 3 次提交
  26. 05 10月, 2016 1 次提交
    • L
      avocado: Replace --multiplex with yaml_to_mux plugin · df07ee47
      Lukáš Doktor 提交于
      This complex patch replaces the custom `--multiplex` handling with a
      brand new plugin called `yaml_to_mux`. This touches several place and
      removes the `yaml` functionality from the avocado core and moves it into
      the plugin code.
      
      There are still 2 references from plugins to the `yaml_to_mux` plugin
      which are not defined as a public API yet.
      
      1. remote runner - which allows copying --multiplex files to remote
                         machine.
      2. replay - which allows overriding of the job's mux variants with
                  the --multiplex files. Note that by doing this you
                  lose the system-wide options. It is described in the
                  warning message.
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      df07ee47
  27. 23 7月, 2016 1 次提交
  28. 14 6月, 2016 1 次提交
  29. 24 2月, 2016 1 次提交