diff options
author | RossC <ross.carter@est.tech> | 2020-05-14 10:40:00 +0100 |
---|---|---|
committer | RossC <ross.carter@est.tech> | 2020-05-15 14:20:47 +0100 |
commit | 5f3c6aba1ef89f41e82b8d47bef8731b679da971 (patch) | |
tree | 4cf3733c91358d96f40f1de074e0f7d4d9b2ba5a /testsuites/performance/src/main/resources/testplans/generate.sh | |
parent | 14722adc36a48f4e120b3ad9e6287cc939bfd130 (diff) |
Frankfurt Distribution Performance Test
Issue-ID: POLICY-2458
Change-Id: I475ac795256db980ae68993a8cbc509d74278549
Signed-off-by: RossC <ross.carter@est.tech>
Diffstat (limited to 'testsuites/performance/src/main/resources/testplans/generate.sh')
-rwxr-xr-x | testsuites/performance/src/main/resources/testplans/generate.sh | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/testsuites/performance/src/main/resources/testplans/generate.sh b/testsuites/performance/src/main/resources/testplans/generate.sh deleted file mode 100755 index d28da1e8..00000000 --- a/testsuites/performance/src/main/resources/testplans/generate.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env bash - -function print_usage_and_exit { - [ -z "$1" ] || echo "Error: $1" - echo "Usage: $0 <output_dir> <random_number>" - echo " - <output_dir>: directory where the generated csar file will be put into" - echo " - <random_number>: random number to choose which csar template to use" - exit 1 -} - -[ "$#" -ne 2 ] && print_usage_and_exit -OUTPUT=$1 -SEED=$2 -[ -d $OUTPUT ] || mkdir -p $OUTPUT -[ -d $OUTPUT ] || print_usage_and_exit "$OUTPUT is not a valid directory" -[[ $SEED =~ ^[0-9]+$ ]] || print_usage_and_exit "$SEED is not a integer" - - -ROOT_DIR=`dirname $(readlink -f $0)` -TMP_DIR=$ROOT_DIR/csar_tmp - -declare -A TEMPLATES -#fill templates -for path in $ROOT_DIR/templates/*; do - [ -d "$path" ] || continue # not directory, skip - dirname="$(basename "${path}")" - TEMPLATES[$dirname]=${path} -done -KEYS=(${!TEMPLATES[@]}) - -key=${KEYS[$(( 10#$SEED % ${#KEYS[@]} ))]} -src=${TEMPLATES[$key]} - -rm -rf $TMP_DIR -cp -r -f $src $TMP_DIR -find $TMP_DIR -type f | xargs sed -i "s/##RANDOM_RESOURCE_NAME##/s3p_${SEED}_${key}/g" -cd $TMP_DIR -echo $key -echo $src -zip -r "$ROOT_DIR/s3p_${SEED}_${key}.csar" * - -rm -f "$OUTPUT/s3p_${SEED}_${key}.csar" -mv -f "$ROOT_DIR/s3p_${SEED}_${key}.csar" $OUTPUT/ - -cd $ROOT_DIR -rm -rf $TMP_DIR |