1. 24 2月, 2016 7 次提交
    • C
      Use of symbolic permission names instead of literal octals · b5db3f03
      Cleber Rosa 提交于
      This change introduces symbolic names for various filesystem
      permission modes, instead of the literal octals with which
      Python 3 shows no compassion.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      b5db3f03
    • C
      spark and gdbmi parsers: port to code also compatible with Python 3 · e53e147f
      Cleber Rosa 提交于
      This commit ports the, arguably old style code (even enough old
      to "modern" Python 2 standards) found in the "external" spark
      and gdbmi parsers. It includes changes such as:
      
      * print style (using print "function")
      * lambda parameter style
      * dict "has_key" changed to "key in dict" idiom
      * use of string instances instead of the external string module. This
        change is intended to make the same code compatible with Python 2
        and 3. That is, even when using 2to3, this doesn't get
        "fixed". Instead of writing a "fixer", let's just make this code be
        more Pythonic and compatible.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      e53e147f
    • C
      setup.py: enable use of 2to3 · 4c09a817
      Cleber Rosa 提交于
      Avocado's setup.py used to not be based on setuptools, but plain
      distutils. Then, it wasn't possible to use 2to3 when to help with
      Python 3 automatic adjustments.
      
      Since 333e439b it's now based on setuptools so we can enable 2to3.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      4c09a817
    • C
      Merge branch 'logging7.2' · 36aba8a0
      Cleber Rosa 提交于
      36aba8a0
    • L
      avocado.core: Merge avocado.core.log into avocado.core.output · b6496893
      Lukáš Doktor 提交于
      Those two are interconnected, let's keep them in one file instead of
      local imports.
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      b6496893
    • L
      scripts.avocado: Simplify error streams detection · 5ee2b5c6
      Lukáš Doktor 提交于
      Avoid unnecessary complexity of quering for enabled logs and only support
      os.environ to show the full traceback.
      
      Additionally avoid problems with redirected sys.stderr by writing
      directly to fd 2, which is STDERR.
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      5ee2b5c6
    • L
      avocado: Change logging initialization · 83a50b5f
      Lukáš Doktor 提交于
      This patch changes the way logging is initialized in avocado app:
      
      1. stdout/stderr/logging is replaced with in-memory handlers
      2. when arg parsing is done, logging is reconfigured accordingly to
         setting and re-logs stored messages (when streams are enabled)
      3. when job starts and "test" stream is enabled, "" and "avocado.test"
         streams are enabled
      4. when job finishes and "test" stream enabled the additional outputs,
         the additional outputs are disabled again.
      
      The 3 and 4 is necessarily as the "" logger contains all logs including
      avocado initialization (stevedore, PIL, ...). This way the "test" stream
      still outputs everything, but only during the job-execution and not
      during avocado initialization and cleanup. (one can use "early" log to
      see those).
      
      Last but not least it keeps "avocado.app" output in stdout (and stderr),
      but it moves all other outputs to stderr instead. This is IMO better
      handling as one can distinguish between debug and "additional" output.
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      83a50b5f
  2. 23 2月, 2016 6 次提交
  3. 20 2月, 2016 2 次提交
  4. 19 2月, 2016 7 次提交
  5. 18 2月, 2016 3 次提交
    • A
      avocado.plugins.replay fix crashes when using --replay-test-status · 6bf4a271
      Amador Pahim 提交于
      Options --multiplex-files and/or urls are incompatible with
      --replay-test-status, since the resulting variants will differ from the
      original job.
      
      This patch adds a test to fail avocado when those incompatible options are
      used togheter.
      
      Also, some minor fixes in replay messages; and in return code when --remote
      is used.
      
      Reference: https://trello.com/c/OJpRv36iSigned-off-by: NAmador Pahim <apahim@redhat.com>
      6bf4a271
    • C
      20a94802
    • H
      Use environment marker for conditional requirements · 03c04b98
      Hao Liu 提交于
      Managing different requirements files for different python version
      requires much more efforts when the requirements became too complex.
      
      This issue emerged when a required package `stevedore` decide not
      supporting Python 2.6 since version `1.11.0`.
      
      ```
      >>> import stevedore
      Traceback (most recent call last):
        File "<stdin>", line 1, in <module>
        File "/usr/lib/python2.6/site-packages/stevedore/__init__.py", line 23, in <module>
          LOG.addHandler(logging.NullHandler())
      AttributeError: 'module' object has no attribute 'NullHandler
      ```
      
      Pip provides a feature named [Environment
      Markers](https://www.python.org/dev/peps/pep-0496/) for requirements
      file to include specific packages conditionally which could properly
      solve this issue.
      
      This fix:
      1. Use environment markers and merge python version specific
      requirements files;
      2. Remove python version specific requirements files references in
      `Makefile` and Travis configuration;
      3. Use `pip install -r requirements.txt` to replace per-line package
      installation;
      4. Restrain package `stevedore` on Python 2.6 to `1.10.0`.
      Signed-off-by: NHao Liu <hliu@redhat.com>
      03c04b98
  6. 17 2月, 2016 3 次提交
  7. 16 2月, 2016 10 次提交
  8. 15 2月, 2016 2 次提交