Commit Graph

5 Commits

Author SHA1 Message Date
Vsevolod Fedorov 6b92807cd7 Tests: Rename yamlparser tests and fixture directories
Rename fixtures directory to job_fixtures to prepare for adding view_fixtures
directory in the following commits.

Change-Id: Ic20997cae020b542ddc22bf444fa6b92fbcae064
2023-01-26 11:06:23 +03:00
Thomas Bechtold ecf3933dc2 Fix timeout wrapper version detection
If, for whatever reason, the version of the build-timeout
plugin can not be detected, assume that we use a newer version (>= 1.14).
Version 1.14 is already ~ 2 1/2 years old so this is a sane assumption.
Also adjust fixtures to use the newer plugin version xml output.

Change-Id: I86295933d0c3247f55d0114473fc9c8f8feb7441
Signed-off-by: Bertrand Roussel <broussel@sierrawireless.com>
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
2018-01-09 09:02:29 -08:00
Darragh Bailey 3d728c71a8 Separate out custom yaml tags into separate classes
Implement custom tags for including files by subclassing YAMLObject to
allow PyYAML to easily convert from the Yaml nodes.

Change to support both lists and strings under the same tag name and
deprecate the old tag naming. Rename tests using the deprecated tags to
ensure they are not used for examples. Remove old tests that simply
duplicate others.

Change-Id: I1a8d3376ea6e4918a2adb05fb856b939a3124d74
2015-09-18 00:37:00 +01:00
David Pursehouse cfef27280b Add support for "Override Build Parameters" option in EnvInject
Change-Id: I4f0c9949f1141ccf93ea86d6cdaec6cce7e6ac4d
2014-10-22 12:26:19 +08:00
Darragh Bailey 3e3996d32a Use yaml local tags to support including files
Add support for local tags which are application specific to allow
including of other yaml files or code from scripts. Allows for code to
be maintained and tested as seperate files, as well as reduces
duplication of yaml code that cannot be macro'ed or easily templated by
including it from a common file.

Adds support for the following tags:
  'include' - load file as yaml code
  'include-raw' - load file as data (for scripts)
  'include-raw-escaped' - load file as data with escaping braces '{}'
      as default for use with job-templates

Use configuration file options to provide a search path for the files.

- Test behaviour of yaml tags independent of any XML generation
  by comparing json result of yaml parsing to verify that certain
  tags do/don't recall the yaml.load() method.
- Add examples for the include tags via addition tests for YamlParser
  class

Inspired by
http://stackoverflow.com/questions/528281/how-can-i-include-an-yaml-file-inside-another

Change-Id: Ib90a07043112d4739d6529ceddbc9817668bcec0
2014-06-20 23:16:23 +01:00