diff options
author | Tibor Frank <tifrank@cisco.com> | 2020-04-24 10:10:45 +0200 |
---|---|---|
committer | Tibor Frank <tifrank@cisco.com> | 2020-04-28 11:17:15 +0000 |
commit | 51b4c826796b9f1f3267a0d6a8f2ba796c24d8d4 (patch) | |
tree | 0f489d214124d72aa435b8ee91db06d5f26871f2 /resources/tools/presentation/specification_parser.py | |
parent | 2544d4579306396f0ebb56cf7c4513e824b7dfd4 (diff) |
Trending: NDRPDR weekly comparison
Change-Id: I6c5166e1fabfe7471af92a1423c0c89ca6b040a4
Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources/tools/presentation/specification_parser.py')
-rw-r--r-- | resources/tools/presentation/specification_parser.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/resources/tools/presentation/specification_parser.py b/resources/tools/presentation/specification_parser.py index 548bbff532..302ce037ab 100644 --- a/resources/tools/presentation/specification_parser.py +++ b/resources/tools/presentation/specification_parser.py @@ -529,6 +529,7 @@ class Specification: if isinstance(builds, dict): build_end = builds.get(u"end", None) max_builds = builds.get(u"max-builds", None) + reverse = builds.get(u"reverse", False) try: build_end = int(build_end) except ValueError: @@ -536,7 +537,9 @@ class Specification: build_end = self._get_build_number(job, build_end) builds = [x for x in range(builds[u"start"], build_end + 1)] if max_builds and max_builds < len(builds): - builds = builds[:max_builds] + builds = builds[-max_builds:] + if reverse: + builds.reverse() self.configuration[u"data-sets"][set_name][job] = builds elif isinstance(builds, list): for idx, item in enumerate(builds): |