diff options
author | 2016-03-28 09:16:27 +0000 | |
---|---|---|
committer | 2016-03-28 09:16:27 +0000 | |
commit | 87d58363042410a1641fd97734d45c17b4acb0e5 (patch) | |
tree | 6961c5bc2f77029f77a6a1869a133efba0d59c08 /common.sh | |
parent | c61fcf46ecabd718f92541e2de53ed027b241f78 (diff) | |
parent | 3c0f6d5ced2474240fa14f5594b84c527767edca (diff) |
Merge "improvement: rubbos test suite running workflow"
Diffstat (limited to 'common.sh')
-rwxr-xr-x | common.sh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/common.sh b/common.sh new file mode 100755 index 00000000..16966320 --- /dev/null +++ b/common.sh @@ -0,0 +1,29 @@ +#!/bin/bash +############################################################################## +# Copyright (c) 2016 Huawei Technologies Co.,Ltd and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +mkdir -p /home/opnfv/bottlenecks/config +config_file=/home/opnfv/bottlenecks/config/bottlenecks_cfg.yaml + +if [ ! -f ${config_file} ]; then + default_config_file=$(find /home/opnfv/repos -name bottlenecks_cfg.yaml) + cp $default_config_file $config_file + echo "bottlenecks_cfg.yaml not provided. Using default one" +fi + +SUITE_PREFIX_CONFIG=$(cat $config_file | grep -w suite_prefix_config | awk 'END {print $NF}') + +info () { + logger -s -t "bottlenecks.info" "$*" +} + +error () { + logger -s -t "bottlenecks.error" "$*" + exit 1 +} |