1. 04 10月, 2017 1 次提交
    • A
      log the raw output on stdout/stderr · 4235b329
      Amador Pahim 提交于
      Avocado process module has a routine to drain the std* buffer with a
      per-line basis loop. This loop makes the new-line character to be
      dropped.
      
      On the other hand, the Python logging system is hard-coded to add a new-line
      character at the end of the msg string.
      
      The problem takes place when `process` writes a line which originally
      had new-line character at the end but the logging system still adds the
      new-line character to that line.
      
      In this patch:
      - avocado.utils.process to include the new-line character in the lines
        that originally had one.
      - avocado.core.test to use for raw outputs a custom logging FileHandler
        that does not add a new-line character at the end of each line.
      
      Verified with (checking `.../test-results/1-.../[stdout|stderr|output]`):
      
          $ avocado run --external-runner '/bin/echo' 'foo'
      
          $ avocado run --external-runner '/bin/echo -n' 'foo'
      
          $ avocado run --external-runner '/bin/ls' '.'
      
          $ avocado run --external-runner '/bin/ls' 'nonexistingfile
      
      Reference: https://trello.com/c/dH7FLT75Signed-off-by: NAmador Pahim <apahim@redhat.com>
      4235b329
  2. 02 10月, 2017 1 次提交
  3. 29 9月, 2017 1 次提交
  4. 28 9月, 2017 6 次提交
    • C
      MANIFEST.in: there are no longer YAML files under examples · c689699e
      Cleber Rosa 提交于
      This fixes the warning "warning: no files found matching
      'examples/*.yaml'" while running "make develop".
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      c689699e
    • C
      Job: do not count on base_logdir when using dry run mode · b459397c
      Cleber Rosa 提交于
      As in previous commits, job should not count on arguments being
      present, such as "base_logdir".  This also needs to be handled
      when using dry run mode.
      
      Since the dry run implementation creates a temporary directory
      itself, it needs to be cleaned up in addition to the tmpdir
      created by setUp.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      b459397c
    • C
      Job: make sure a job can be created without an explicit base_logdir · 33ea34a1
      Cleber Rosa 提交于
      One of the premises of the Job class is that it can be created without
      any mandatory information set in the args parameter.  But, because of
      the way we're testing it, we always pass a base_logdir.
      
      This test is about making sure the job gets a base_logdir, and
      consequently a logdir, even when a base_logdir is not set in the args.
      The implementation of this test is based on the fact that there's
      already a tmpdir that can be used for playing the role of a base_logdir.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      33ea34a1
    • C
      Job: do not assume a unique_job_id exists when using dry run mode · 69bf621c
      Cleber Rosa 提交于
      We already handle the lack of a unique_job_id in a job, but when
      using dry run, the check is not being done in a way that waives
      that requirement.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      69bf621c
    • C
      Job: distinguish between the base log dir and the job logdir itself · 23ce2269
      Cleber Rosa 提交于
      The Job class code uses the same name, logdir, for both the directory
      that will hold a given job's results (job-<timestamp>-<shortid>) and
      the base directory, where the first one will be created.
      
      This changes the naming so that the base log dir, only present in
      the job arguments (the argparse.Namespace instance) will be named
      "base_logdir".  The job's result dir, which value is kept in the
      job instance itself, is still named "logdir".
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      23ce2269
    • C
      yaml_to_mux: optimize the check for the debug option · 80ebf8ba
      Cleber Rosa 提交于
      In theory, the option will always be set when running a job with the
      accompanying "CLI" plugin enabled.  In practice, some of the selftests
      create Job instances, and the "mux_debug" option may not be present.
      
      The exact error that occurs in these situations is:
      
      ERROR| Reproduced traceback from: [...]/avocado/core/dispatcher.py:255
      ERROR| Traceback (most recent call last):
      ERROR|   File "[...]/optional_plugins/varianter_yaml_to_mux/avocado_varianter_yaml_to_mux/__init__.py", line 416, in initialize
      ERROR|     if args.avocado_variants.debug:
      ERROR| AttributeError: 'Namespace' object has no attribute 'avocado_variants'
      ERROR|
      ERROR| Error running method "initialize" of plugin "yaml_to_mux": 'Namespace' object has no attribute 'avocado_variants'
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      80ebf8ba
  5. 27 9月, 2017 4 次提交
  6. 21 9月, 2017 2 次提交
  7. 20 9月, 2017 2 次提交
  8. 19 9月, 2017 11 次提交
  9. 18 9月, 2017 3 次提交
  10. 16 9月, 2017 4 次提交
  11. 15 9月, 2017 5 次提交