1. 15 9月, 2017 3 次提交
    • L
      loader: Be specific in method/variable names · 8b5fa1eb
      Lukáš Doktor 提交于
      The `_make_avocado_tests` does not actually produce avocado tests, it
      only processes existing file into the most suitable test definition,
      which can be INSTRUMENTED, SIMPLE but also MISSING test. Let's rename
      that function as well as the tests variable.
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      8b5fa1eb
    • C
      Merge remote-tracking branch 'apahim/utils_vmimage4' · d349ef3f
      Cleber Rosa 提交于
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      d349ef3f
    • A
      Introducing the vmimage util · 1ed1bc63
      Amador Pahim 提交于
      Utility to provide Qcow VM Images acquired from distro repositories.
      
      Usage:
      
          >>> from avocado.utils import vmimage
      
          >>> image = vmimage.get()
          >>> image
          <Image name=Fedora version=26 arch=x86_64>
          >>> image.name
          'Fedora'
          >>> image.path
          '/tmp/Fedora-Cloud-Base-26-1.5.x86_64-d369c285.qcow2'
          >>> image.get()
          '/tmp/Fedora-Cloud-Base-26-1.5.x86_64-e887c743.qcow2'
          >>> image.path
          '/tmp/Fedora-Cloud-Base-26-1.5.x86_64-e887c743.qcow2'
          >>> image.version
          26
          >>> image.base_image
          '/tmp/Fedora-Cloud-Base-26-1.5.x86_64.qcow2'
      
          >>> image = vmimage.get(arch='aarch64')
          >>> image
          <Image name=FedoraSecondary version=26 arch=aarch64>
          >>> image.name
          'FedoraSecondary'
          >>> image.path
          '/tmp/Fedora-Cloud-Base-26-1.5.aarch64-07b8fbda.qcow2'
      
          >>> image = vmimage.get(version=7)
          >>> image
          <Image name=CentOS version=7 arch=x86_64>
          >>> image.path
          '/tmp/CentOS-7-x86_64-GenericCloud-1708-dd8139c5.qcow2'
      
          >>> i1 = vmimage.get()
          >>> i2 = vmimage.get()
          >>> i1.path == i2.path
          False
      Signed-off-by: NAmador Pahim <apahim@redhat.com>
      1ed1bc63
  2. 08 9月, 2017 1 次提交
  3. 31 8月, 2017 6 次提交
  4. 30 8月, 2017 3 次提交
  5. 29 8月, 2017 4 次提交
  6. 28 8月, 2017 2 次提交
  7. 24 8月, 2017 7 次提交
    • L
      Merging pull request 2119 · 292e702e
      Lukáš Doktor 提交于
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      
      * https://github.com/avocado-framework/avocado:
        Added a method to get near real physical memory
      292e702e
    • C
      avocado/plugins/replay.py: remove misleading TODO comment · bd79c7c5
      Cleber Rosa 提交于
      The current state of this comment is the result of a mechanical change
      replacing `urls` with `references`.
      
      The source for references given on the command line is working as
      intended, that is, if test references are given on the command line
      they are taken and will override the ones on the replay args.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      bd79c7c5
    • C
      avocado/core/job.py: fix Avocado version info output to log · f1d06794
      Cleber Rosa 提交于
      The recording of Avocado version, when running from a GIT repo has
      been broken for a long time (since the SPEC file was renamed).  This
      could be a simple fix to just match the new SPEC file named, but I
      think we can do better.  Besides this fix, the changes here include:
      
       - Print a short commit instead (8 chars)
       - Omit branch name, commit is authoritative enough and developers can
         tell the name of a branch if it's really necessary
      
      But, let me say that this is still broken.  The GIT version
      information is only printed if the current work directory is inside
      the GIT repo directory.  A better (and way more complex) fix would be
      one that looks where the avocado script and Python libraries were
      loaded from, and check if that location is a GIT repo.  Instead of
      doing that, though, it'd make more sense to use a semantic version
      approach (and possibly a library).
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      f1d06794
    • C
      Removal of "import magic" for avocado and avocado-rest-client · d39f9a0a
      Cleber Rosa 提交于
      These scripts rely on some Python library path manipulation to be
      able to load from the source tree.  But, in fact that are a few
      reasons for not having those, including:
      
       * All functionality in `avocado` relies on plugins, which will not be
         available from the source tree unless a `$ setup.py develop` is
         executed, which automatically makes the "import magic" unnecessary.
      
       * Most users will end up using a setuptools generated "entry point"
         instead.
      
      For the sake of less code, I propose this (and all other?) magic to be
      removed.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      d39f9a0a
    • C
      scripts/avocado: remove duplicate conditional '__main__' section · 8eb65529
      Cleber Rosa 提交于
      Simple syntatic fix removing one of the (duplicate) conditional
      `__name__ == '__main__'` section.
      
      To preserve the functionality of the exception hook
      (`handle_exception`) the import of Avocado libraries are moved closed
      to their usage (inside the condition `__main__` block).
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      8eb65529
    • C
      runner: install the SIGTSTP handler on the runner only · f621024e
      Cleber Rosa 提交于
      Currently, the signal handler for SIGTSTP (which implements the test
      pause/resume) is installed before the test process is created, and
      thus, is inherited by it.
      
      There's a clean up of the signal handler in the test process, but this
      clean up can be prevented by installing the signal handler on the test
      runner alone (after the test process is created).
      
      The ramifications of this proposal are such that, in the chance that a
      SIGTSTP is received after the test process is created and before the
      signal handler is installed in the test runner process, nothing will
      happen.  In contrast, the current approach may have the signal handler
      action being executed, and attempting to send SIGSTOP or SIGCONT to
      the test process, but not doing so because there's no test process
      yet.
      
      In the end, it seems that the two approaches are pretty safe, and the
      biggest benefit here is that the test process never has the handler
      installed.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      f621024e
    • A
      Merge branch 'abdhaleegit-memory-func-v3' · 14a84ad8
      Amador Pahim 提交于
      Signed-off-by: NAmador Pahim <apahim@redhat.com>
      14a84ad8
  8. 23 8月, 2017 14 次提交