Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update binarize.sh #706

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
30 changes: 28 additions & 2 deletions bin/binarize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ case $key in
exclude_repos_list_path="$2"
shift
;;
-t|--enabletests)
enable_tests="$2"
shift
;;
--)
shift
break
Expand All @@ -60,7 +64,6 @@ if [ -z "${pyarmor_license_zip_file_path}" ]; then
pyarmor_license_zip_file_path="/home/user/pyarmor-regfile-1.zip"
fi


if [ -z "${install_space}" ]; then
install_space="/opt/ros/shadow"
fi
Expand All @@ -87,6 +90,18 @@ if [[ $exclude_repos_list_path ]]; then
fi
fi

if [ -z "${enable_tests}" ]; then
enable_tests="false"
elif [ "${enable_tests,,}" = "true" ]; then
enable_tests="true"
elif [ "${enable_tests,,}" = "yes" ]; then
enable_tests="true"
elif [ "${enable_tests,,}" = "y" ]; then
enable_tests="true"
else
enable_tests="false"
fi

source $workspace_path/devel/setup.bash

echo "Running binarization script on workspace: $workspace_path"
Expand Down Expand Up @@ -280,5 +295,16 @@ do
fi
done

echo "Binarize: done."
if [ "${enable_tests}" = "true" ]; then
test_files_full_paths=$(find ${install_space} -name "*\.test")
test_packages=$(for package in $test_files; do dirname $(dirname $package ) | sed -r 's;.*\/;;g'; done | uniq)
test_commands=$(for package in $test_packages; do test_file=$(rosls ${package}/test | grep "\.test"); echo "${package} ${test_file}"; done)
IFS=$'\n'
for test_command in ${test_commands}; do ; ; done; done
package=$(echo $test_command | cut -d " " -f 1)
test_file_name=$(echo $test_command | cut -d " " -f 2)
rostest ${package} ${test_file_name}
done
fi

echo "Binarize: done."