Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
Signed-off-by: KumoLiu <[email protected]>
  • Loading branch information
KumoLiu committed Oct 9, 2023
1 parent 8bfd087 commit 571b62b
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions runtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,11 @@ function print_error_msg() {

function print_style_fail_msg() {
echo "${red}Check failed!${noColor}"
echo "Please run auto style fixes: ${green}./runtests.sh --autofix${noColor}"
if [ "$homedir" = "$currentdir" ]
then
echo "Please run auto style fixes: ${green}./runtests.sh --autofix${noColor}"
else :
fi
}

function list_unittests() {
Expand Down Expand Up @@ -352,11 +356,17 @@ do
done

# home directory
currentdir="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ -e "$homedir" ]
then
echo "run tests under $homedir"
if [ "$homedir" != "$currentdir" ]
then
$(cp $currentdir/"pyproject.toml" $homedir/"pyproject.toml")
else :
fi
else
homedir="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
homedir=$currentdir
fi
cd "$homedir"

Expand Down

0 comments on commit 571b62b

Please sign in to comment.