1. 05 10月, 2016 10 次提交
    • L
      avocado.plugins.yaml_to_mux: Allow empty yaml files · 28a08d8e
      Lukáš Doktor 提交于
      This patch avoids avocado crash on empty multiplex yaml file. Empty file
      contains basically nothing and that is how it's handled now.
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      28a08d8e
    • L
      avocado: Replace `--multiplex` with `--mux-yaml` · 6be4aca0
      Lukáš Doktor 提交于
      Recently we created separate `yaml2mux` plugin, which keeps using the
      `--multiplex` argument. The connection between yaml2mux and multiplex is
      not really obvious and the separation was meant to bring the order to
      the avocado params system. This is another step which replaces the
      `--multiplex|-m` with `--mux-yaml|-m` and makes it more obvious that
      it's related to `yaml` files and it's also related to `multiplexation`.
      
      You might notice that the old `-m` was kept. It's very convenient and
      also allows coexisting of old and new versions (useful eg. in remote
      executions).
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      6be4aca0
    • L
      avocado.plugins.replay: Change the `replay_ignore mux` meaning · d01ed093
      Lukáš Doktor 提交于
      Currently `replay` has hardcoded treating of `--multiplex`, which is not
      systematic and even now allows some unhandled errors (like --mux-filter
      along with replay-test-status). With this patch I propose to ignore all
      multiplex related options and use the one from the job and process the
      mux only when the user uses `--replay-ignore mux`. This means it does
      not allow mixing of previous job's mux with new options, on the other
      hand it's simple and easily understandable:
      
      1. no `--replay-ignore mux` => all --mux options are ignored and the
         original Mux is used
      2. `--replay-ignore mux` => old Mux is ignored and full new Mux is used
         including system-wide args, --mux options and the yaml parser (-m)
      
      To make things clear this patch always logs a warning notifying the user
      about the current situation.
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      d01ed093
    • L
      avocado.plugins.replay: Use list as default for replay_ignore · 1c3efdad
      Lukáš Doktor 提交于
      The --replay-ignore is a list of arguments, but the default is None,
      which requires special hendling in the code. Let's change it to list and
      remove the special handling.
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      1c3efdad
    • 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
    • L
      fb1700e8
    • L
      avocado.core.parser: Introduce "mux_debug" option · 3423ca96
      Lukáš Doktor 提交于
      The mux need to support debugging the options. This is a basic
      implementation which allows requesting mux to use TreeNodeDebug. Then
      it's the plugin's job to check whether mux uses debug (`mux.debug`) and
      act accordingly.
      
      In this basic implementation the debug is only enabled for `--multiplex`
      and `@None` is used for other injects (like `--mux-inject`)
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      3423ca96
    • L
      avocado.plugins.multiplex: Make --multiplex optional · c773cbce
      Lukáš Doktor 提交于
      The `--multiplex` is about to be changed into a separate plugin. It does
      not sound fair to keep it as default positional argument of the
      `multiplex` command. Let's sync the naming scheme and require
      `--multiplex` for it.
      
      This also means the `-m` is optional so one can run `avocado multiplex`
      without arguments to get default multiplex values.
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      c773cbce
    • L
      avocado: Replace "multiplex_files" with "multiplex" · 9d6bb585
      Lukáš Doktor 提交于
      The option changed from --multiplex-files to `--multiplex` long time ago
      but we kept using the original `multiplex_files` destination for it.
      This is not systematic and can lead to problems in the future. Let's
      change it once for all.
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      9d6bb585
    • L
      avocado.core.multiplexer: Define multiplexer API · 905a45ef
      Lukáš Doktor 提交于
      This patch is a 1st step to independent multiplex plugin. It unifies the
      multiplexation, which is handled exclusively by the
      avocado.core.multiplexer.Mux object, which is initialized directly in
      argument parser as `args.mux`, instead of the
      `parser.default_avocado_params`.
      
      The idea is to provide unified database with simple interface:
      
       * data_inject - inject key/value[/path] data
       * data_merge - merge node/tree into the data
      
      Additionally it supports internal API to generate the params:
      
       * is_parsed - whether it was already initialized/filtered/...
       * get_number_of_tests - reports number of test*variants
       * itertests - iterate through tests
      
      All those changes are pickle-safe from the old object to the new object
      (not vice versa), therefor it's possible to use old Mux objects stored
      in `jobdata` to replay tests.
      
      This API is not 100% stable yet, but we plan to keep the one sided
      pickle compatibility into the future (no guarantee, but we'll do our
      best).
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      905a45ef
  2. 04 10月, 2016 6 次提交
  3. 03 10月, 2016 1 次提交
  4. 30 9月, 2016 7 次提交
  5. 29 9月, 2016 3 次提交
    • L
      selftests.checkall: Enable fail-fast per-test · f30ebdec
      Lukáš Doktor 提交于
      Currently the fail-fast works per section (pylint style, unittests, ...)
      but this patch enables it also inside the unittests, therefor it
      finishes with the first failed unittest finishing even quicker than
      before.
      Note that this option is incompatible with the parallel check.
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      f30ebdec
    • L
      selftests.checkall: Support for parallel unittests execution · 9d46cf4b
      Lukáš Doktor 提交于
      This patch allows running the tests in parallel, when
      AVOCADO_PARALLEL_CHECK env variable is set. It spawns 2xno_cpu workers
      (or less when there are not enough tests), captures the output and shows
      only output of failed workers. Before the exit it also reports the
      number of executed tests in the same fashion as normal unittest
      execution (without the number of failed tests, though).
      
      On my laptop this decreases the duration from 125s to 28s.
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      9d46cf4b
    • L
      selftests.checkall: Improve the readability · 0e2cc213
      Lukáš Doktor 提交于
      This patch adds summary at the end of the execution and uses colors to
      mark start and finish of each section. This might produce some
      unexpected characters on redirections/unsupported terminals at the
      beginning and endings of the highlighted lines, but in most cases it
      looks way better and those +3 chars can be ignored by humans.
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      0e2cc213
  6. 28 9月, 2016 1 次提交
  7. 27 9月, 2016 12 次提交