Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions pyperf/pyperf_run
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ install_tools()
#
# Clone the repo that contains the common code and tools
#
tools_git=https://github.com/dvalinrh/test_tools
tools_git=https://github.com/redhat-performance/test_tools-wrappers

found=0
for arg in "$@"; do
Expand All @@ -39,7 +39,7 @@ install_tools()
# clone the repo.
#
if [ ! -d "test_tools" ]; then
git clone $tools_git
git clone $tools_git test_tools
if [ $? -ne 0 ]; then
echo pulling git $tools_git failed.
exit
Expand Down Expand Up @@ -128,9 +128,20 @@ install_tools $0

test_name_run="pyperf"
arguments="$@"
chars=`echo $0 | awk -v RS='/' 'END{print NR-1}'`
run_dir=`echo $0 | cut -d'/' -f 1-${chars}`

if [[ $0 == "./"* ]]; then
chars=`echo $0 | awk -v RS='/' 'END{print NR-1}'`
if [[ $chars == 1 ]]; then
run_dir=`pwd`
else
run_dir=`echo $0 | cut -d'/' -f 1-${chars} | cut -d'.' -f2-`
curdir=`pwd`
run_dir="${curdir}${run_dir}"
fi
else
chars=`echo $0 | awk -v RS='/' 'END{print NR-1}'`
run_dir=`echo $0 | cut -d'/' -f 1-${chars}`
fi

source test_tools/general_setup "$@"

Expand Down