From afc59e6af25a60c68a3095365c780974721f1364 Mon Sep 17 00:00:00 2001 From: Morgan Richomme Date: Mon, 20 Mar 2017 10:04:57 +0100 Subject: bug fix: version not retrieved on weekly jobs a first fix had been done but the version was retrieved 2 times with the regex this patch removes the second regex and re-use get_version the associated unit tests has been removed because even if the build_tag is badly formated, it will not prevent the results to be pushed with version = unknown JIRA: FUNCTEST-765 Change-Id: I2cbe8ba1dd7278c3f3510a47c667c433f65e00f8 Signed-off-by: Morgan Richomme --- functest/utils/functest_utils.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'functest/utils/functest_utils.py') diff --git a/functest/utils/functest_utils.py b/functest/utils/functest_utils.py index 9e13ffe90..7cc5029d9 100644 --- a/functest/utils/functest_utils.py +++ b/functest/utils/functest_utils.py @@ -207,13 +207,7 @@ def push_results_to_db(project, case_name, except KeyError as e: logger.error("Please set env var: " + str(e)) return False - rule = "daily-(.+?)-[0-9]*" - m = re.search(rule, build_tag) - if m: - version = m.group(1) - else: - logger.error("Please fix BUILD_TAG env var: " + build_tag) - return False + version = get_version() test_start = dt.fromtimestamp(start_date).strftime('%Y-%m-%d %H:%M:%S') test_stop = dt.fromtimestamp(stop_date).strftime('%Y-%m-%d %H:%M:%S') -- cgit 1.2.3-korg