aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/bash/function/common.sh
diff options
context:
space:
mode:
authorJan Gelety <jgelety@cisco.com>2020-03-03 15:55:27 +0100
committerJan Gelety <jgelety@cisco.com>2020-05-13 15:37:20 +0000
commit42e546faaf042ef78bb8cbb9339c7fb06f6299dd (patch)
tree3167bc164d2d445596a52d28457a533aaabb3250 /resources/libraries/bash/function/common.sh
parentae9c086f7b2b57bb7376eb143cd01ddfb29a10d0 (diff)
job-specs: new job test spec files including test count and durations
Change-Id: I4ad87092bff1c072051ca1c7243d8dedb1c4576e Signed-off-by: Jan Gelety <jgelety@cisco.com> Signed-off-by: Maciek Konstantynowicz <mkonstan@cisco.com>
Diffstat (limited to 'resources/libraries/bash/function/common.sh')
-rw-r--r--resources/libraries/bash/function/common.sh26
1 files changed, 15 insertions, 11 deletions
diff --git a/resources/libraries/bash/function/common.sh b/resources/libraries/bash/function/common.sh
index f89f71dc65..8f2e88843e 100644
--- a/resources/libraries/bash/function/common.sh
+++ b/resources/libraries/bash/function/common.sh
@@ -1,5 +1,5 @@
-# Copyright (c) 2019 Cisco and/or its affiliates.
-# Copyright (c) 2019 PANTHEON.tech and/or its affiliates.
+# Copyright (c) 2020 Cisco and/or its affiliates.
+# Copyright (c) 2020 PANTHEON.tech and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
@@ -193,7 +193,8 @@ function common_dirs () {
# Variables set:
# - BASH_FUNCTION_DIR - Path to existing directory this file is located in.
# - CSIT_DIR - Path to existing root of local CSIT git repository.
- # - TOPOLOGIES_DIR - Path to existing directory with available tpologies.
+ # - TOPOLOGIES_DIR - Path to existing directory with available topologies.
+ # - JOB_SPECS_DIR - Path to existing directory with job test specifications.
# - RESOURCES_DIR - Path to existing CSIT subdirectory "resources".
# - TOOLS_DIR - Path to existing resources subdirectory "tools".
# - PYTHON_SCRIPTS_DIR - Path to existing tools subdirectory "scripts".
@@ -223,6 +224,9 @@ function common_dirs () {
TOPOLOGIES_DIR=$(readlink -e "${CSIT_DIR}/topologies/available") || {
die "Readlink failed."
}
+ JOB_SPECS_DIR=$(readlink -e "${CSIT_DIR}/docs/job_specs") || {
+ die "Readlink failed."
+ }
RESOURCES_DIR=$(readlink -e "${CSIT_DIR}/resources") || {
die "Readlink failed."
}
@@ -273,9 +277,6 @@ function compose_pybot_arguments () {
*"device"*)
PYBOT_ARGS+=("--suite" "tests.${DUT}.device")
;;
- *"func"*)
- PYBOT_ARGS+=("--suite" "tests.${DUT}.func")
- ;;
*"perf"*)
PYBOT_ARGS+=("--suite" "tests.${DUT}.perf")
;;
@@ -763,20 +764,23 @@ function select_tags () {
sed_nics_sub_cmd+=" | sed -e s/ANDvic1227/ANDnic_cisco-vic-1227/"
sed_nics_sub_cmd+=" | sed -e s/ANDvic1385/ANDnic_cisco-vic-1385/"
# Tag file directory shorthand.
- tfd="${BASH_FUNCTION_DIR}"
+ tfd="${JOB_SPECS_DIR}"
case "${TEST_CODE}" in
# Select specific performance tests based on jenkins job type variable.
*"ndrpdr-weekly"* )
- readarray -t test_tag_array < "${tfd}/mlr-weekly.txt" || die
+ readarray -t test_tag_array <<< $(sed 's/ //g' \
+ ${tfd}/mlr-weekly-${NODENESS}-${FLAVOR}.md |
+ eval ${sed_nics_sub_cmd}) || die
;;
*"mrr-daily"* )
readarray -t test_tag_array <<< $(sed 's/ //g' \
- ${tfd}/mrr-daily-${NODENESS}-${FLAVOR}.txt |
+ ${tfd}/mrr-daily-${NODENESS}-${FLAVOR}.md |
eval ${sed_nics_sub_cmd}) || die
;;
*"mrr-weekly"* )
- readarray -t test_tag_array <<< $(${sed_nic_sub_cmd} \
- ${tfd}/mrr-weekly.txt) || die
+ readarray -t test_tag_array <<< $(sed 's/ //g' \
+ ${tfd}/mrr-weekly-${NODENESS}-${FLAVOR}.md |
+ eval ${sed_nics_sub_cmd}) || die
;;
* )
if [[ -z "${TEST_TAG_STRING-}" ]]; then