1. 01 11月, 2017 1 次提交
  2. 29 10月, 2017 1 次提交
  3. 19 10月, 2017 1 次提交
  4. 17 10月, 2017 9 次提交
  5. 16 10月, 2017 17 次提交
  6. 14 10月, 2017 9 次提交
    • L
      docs: Add note about `get_data(..., must_exist=False)` · 9db70581
      Lukáš Doktor 提交于
      The `must_exist` is part of the API and significantly changes the way
      the datadirs are processed, therefor it deserves to be mentioned in the
      documentation.
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      9db70581
    • L
      Merging pull request 2263 · d43eb649
      Lukáš Doktor 提交于
      Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
      
      * https://github.com/avocado-framework/avocado:
        Runner: add option to log data directories for each test to be run
        selftests/unit/test_test.py: fix comment typo
        avocado.Test: use new data dirs for output check record feature
        Limit SimpleTest to "file" and "variant" data file sources
        avocado.Test: deprecate datadir property
        examples/tests/whiteboard.py: remove chdir into datadir
        avocado.Test: introduce get_data() method
      d43eb649
    • C
      Runner: add option to log data directories for each test to be run · fab26003
      Cleber Rosa 提交于
      While users could follow the documented rules for test directories,
      it can be useful to log all of the options in advance.  With that
      a test writer can create the data directories and put data files
      at the right level.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      fab26003
    • C
      selftests/unit/test_test.py: fix comment typo · f0be7b7f
      Cleber Rosa 提交于
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      f0be7b7f
    • C
      avocado.Test: use new data dirs for output check record feature · 82816f75
      Cleber Rosa 提交于
      This changes the output check record functionality, from using the
      file-level directory only containing std{out,err}.expected files, to
      one that respects leaves to the specific implementations on a test
      class.
      
      When checking if the output matches the expected one, it just uses the
      new public get_data() method.  When recording output data, it either
      uses the most specific source provided by the test class.  For
      INSTREMENTED tests, it means a variant-level when a variant is being
      used, or the test-level directory when a variant is not being used.
      
      A tool that could be added on top of this change of behavior is one
      that consolidates recorded output in higher-levels.  Suppose that a
      test run with a thousand variants generate the same output.  It's a
      waste to have one thousand files (not counting the directories) when a
      single file at the file-level data directory would be enough.  But,
      this can be implemented later, I suppose.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      82816f75
    • C
      Limit SimpleTest to "file" and "variant" data file sources · cbfd2bd3
      Cleber Rosa 提交于
      Simple tests are defined as an executable that can either return 0
      for success, or non-zero for failures.  This means that it doesn't
      support multiple tests on a single file.  But, it can be run with
      variants.  This means that the possible sources for data files
      are "variants" and "file".
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      cbfd2bd3
    • C
      avocado.Test: deprecate datadir property · 53445a82
      Cleber Rosa 提交于
      This change deprecates the use of the of the `datadir` property,
      and switches to `get_data()` instead.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      53445a82
    • C
      examples/tests/whiteboard.py: remove chdir into datadir · b69a24d3
      Cleber Rosa 提交于
      The whiteboard test is an example test, and, since, we're about to
      deprecate the datadir attribute, let's remote this call to chdir.
      
      If we believe that's necessary to stress this part of the API, let's
      write a (non-example) test for that.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      b69a24d3
    • C
      avocado.Test: introduce get_data() method · 0941cdd7
      Cleber Rosa 提交于
      This method allows to look for test data in ways that are more
      flexible than the current "datadir" feature currently available.
      
      The current "datadir" is bound to the test filename only, and
      can not provide different data for different tests hosted within
      a single test file.
      
      The newly introduced get_data() method looks for test data in
      various locations, to be able to provide custom data not only
      to different tests hosted inside a single test file, but also
      to different variants.
      
      Note about this alternative implementation of `get_data()`: it does so
      in a much more detached form.  It allows for other test types to
      clearly change the way data files are stored and accessed.  It also
      introduces the concept of named data sources.
      
      In the previous implementation, the types of "data dirs" were hard
      coded, while in this approach, they're defined at the class level and
      it's up to the `get_data()` implementation to deal with it.
      Consequently, the `get_data()` method gets a second (optional)
      parameter that allows the user to specify from which data source the
      data file should be retrieved.
      
      This is necessary, for example, when we add configurability to sources
      of data files, such as expected `stdout`, `stderr` and `output` files.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      0941cdd7
  7. 13 10月, 2017 2 次提交