1. 18 8月, 2020 1 次提交
  2. 06 8月, 2020 1 次提交
    • C
      N(ext) Runner: move the status server out of the nrunner module · dc9d662e
      Cleber Rosa 提交于
      The only reason for the "avocado/core/nrunner.py" to be standalone is
      to ease its deployment into an environment that contains nothing but
      Python itself.  This will hopefully change in the future when we solve
      the deployment problem.
      
      For now, it's clear that at least the StatusServer does not need to
      live in that module and be deployed when tests are executed in a
      different environment.  The StatusServer is used solely by the
      `avocado nrun` command, and thus, can live on another module.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      dc9d662e
  3. 11 6月, 2020 2 次提交
    • C
      N(ext) Runner: implement entry point based runner selection · 4c331dc9
      Cleber Rosa 提交于
      If the "avocado.core.nrunner" module is being used by the Avocado Job,
      it can benefit from being on a system that has setuptools installed
      and can pick runner for runnables from there.
      
      But, if the "nrunner" module is being executed by itself, let's say,
      on a remote system, it may not access to setuptools or entrypoints,
      so it should still rely on its internal runner registry.
      
      This change allows the Avocado Job to run all ranges of test types
      (runnable kinds, really) currently supported.  This is true for
      executions without spawners and always local, which currently, in a
      job, it's the only way they're done.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      4c331dc9
    • C
      Python based tests: use same style of reference resolution · 855acaa3
      Cleber Rosa 提交于
      The "avocado-instrumented" test and the Python unittest share a
      good deal of similarity, including a common ancestry, and this
      attempts to improve it even further.
      
      In Avocado, the "reference resolution" produces a user visible
      "test name", which, according to our own guidelines, should be
      a valid reference.  This allows users to copy and past those test
      names and run tests from them.  Example:
      
       $ avocado list examples/tests/passtest.py
       INSTRUMENTED examples/tests/passtest.py:PassTest.test
      
       $ avocado list examples/tests/passtest.py:PassTest.test
       INSTRUMENTED examples/tests/passtest.py:PassTest.test
      
      This is what enables a user to do:
      
       $ avocado list multiple.py
       INSTRUMENTED multiple.py:Test.test_1
       INSTRUMENTED multiple.py:Test.test_2
       INSTRUMENTED multiple.py:Test.test_3
      
       $ avocado run multiple.py:Test.test_3
      
      And have a valid test executed.
      
      So, the idea here is to allow the same to happen for Python unittests.
      Internally, at execution time, the valid "unittest name" is still
      used, but to the user, a test name that is reusable and coherent with
      the overall Avocado experience and guidelines is used.
      
      The example given, though, is about the principle, using the current
      runner (and loader), while these changes are clearly about the nrunner
      and resolver.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      855acaa3
  4. 04 6月, 2020 1 次提交
  5. 19 5月, 2020 3 次提交
  6. 16 5月, 2020 2 次提交
  7. 13 5月, 2020 2 次提交
  8. 08 5月, 2020 2 次提交
  9. 06 5月, 2020 1 次提交
  10. 30 4月, 2020 4 次提交
  11. 21 4月, 2020 8 次提交
  12. 18 4月, 2020 2 次提交
  13. 16 4月, 2020 4 次提交
    • C
      nrunner: move runner selection to runnable · d54c6630
      Cleber Rosa 提交于
      Analogous to the pick_runner_command() method, the pick_runner_class()
      method selects the known runner class based on the runnable kind.
      
      There are a few differences from the command selection, given that
      for a Python class we don't attempt to find a Python module in the system
      and load its code.  For Python classes we depend on a proper and active
      registration.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      d54c6630
    • C
      nrunner: be more explicit about the type of runner registry used · a9a31673
      Cleber Rosa 提交于
      Which is a registry containing the name of standalone executables.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      a9a31673
    • C
      nrunner: move runner selection to runnable · db6f15e0
      Cleber Rosa 提交于
      The selection of a runner was initially introduced as a set of methods
      to the Task class.  Most use cases will involve running a Task (which
      always contain a Runnable, but not using a Runnable by itself), but
      the runner really acts on the Runnable.  This can be evidenced by the
      "task.runnable.kind" references in the methods being moved to the
      Runnable class.
      
      With this change, it's expected that we will be able to determine if a
      runnable has its requirements satisfied.  Right now the only
      requirement is really a suitable Runner implementation for the
      Runnable kind.
      
      Then, if found to be necessary, we can then implement and determine
      extra requirements that are related to a Task that are not necessarily
      related to a Runnable.  For instance, the a Task may be configured to
      require a specific scheduling/spawing condition, such as to be
      executed on a container, which to a Runnable should be transparent (a
      Runnable should only care that it's being executed by a suitable
      Runner).
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      db6f15e0
    • C
      nrunner: style only double quotes for single quotes · f6530d05
      Cleber Rosa 提交于
      To make it more consistent in the same block of code.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      f6530d05
  14. 11 4月, 2020 1 次提交
  15. 10 4月, 2020 2 次提交
  16. 09 4月, 2020 4 次提交
    • C
      nrunner: implement is_alive() check · f9e0e1ef
      Cleber Rosa 提交于
      This brings an initial and limited check to the spawing of tasks.
      The different spawn implementations show how other implementations
      could do the same.
      
      The goal after this is  to:
      
       1) expand the amount of information provided, such as telling if the
          spawning was successful
      
       2) use the information to identify if tasks that have not being given
          results back to the status server (or some other replacement
          implementation) are still alive but unable to communicate
      
       3) if a spawned task is not alive anymore, we can give up on it
          and give it a status such as "UNKNOWN" or something similar.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      f9e0e1ef
    • C
      nrunner: introduce a podman based spawner · 0275eb17
      Cleber Rosa 提交于
      This introduces a simplistic implementation of spawner that, although
      limited in features at this time, serves to prove the concept of the
      spawner interface.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      0275eb17
    • C
      nrunner: make the Python module executable · 829e02ae
      Cleber Rosa 提交于
      The reason being that this module is a complete and standalone
      implementation ready to be used, as long as it's executable.
      
      Also and by making it executable it can be deployed on demand, say to
      containers, much more easily.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      829e02ae
    • C
      nrunner: make check_tasks_requirements a core utility function · bb2e8d2a
      Cleber Rosa 提交于
      By splitting some of its functionality into a task method that can be
      used for checking each task requirement availability.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      bb2e8d2a