5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
21 # TOX_ENV is tox environment which is to be executed.
22 if [ -z ${TOX_ENV+x} ]; then
25 SCRIPT_DIR="$(dirname $(readlink -f ${BASH_SOURCE[0]}))"
27 DOCKER_IMAGE_TAG=${DOCKER_IMAGE_TAG:-rec-cloudtaf-runner}
29 $SCRIPT_DIR/rfcli-docker-build $DOCKER_IMAGE_TAG
34 while [ $i -lt ${#ORIGINAL_ARGS[@]} ]; do
35 arg=${ORIGINAL_ARGS[$i]}
36 if [ $arg == "-t" ]; then
37 target_index=$(expr $i + 1)
38 target_path=${ORIGINAL_ARGS[$target_index]}
41 NO_TARGET_CMD="${NO_TARGET_CMD} ${arg}"
46 cp $target_path targets
47 new_target_path=targets/$(basename $target_path)
53 -v $(pwd):/tmp/rec-cloudtaf \
54 -w /tmp/rec-cloudtaf \
55 $DOCKER_IMAGE_TAG ./rfcli-tox-umask -t ${new_target_path} $NO_TARGET_CMD