rodrigoqueiroz / geoscenarioserver

8 stars 1 forks source link

Fixed rosversion check. #40

Closed mchlswyr closed 3 years ago

mchlswyr commented 3 years ago

Testing

read -p "Press ENTER to run test 1."

1. rosversion command exists, rosversion -sd returns "melodic"

export ROS_DISTRO=melodic bash scripts/install_dependencies.bash

2. rosversion command exists, rosversion -sd returns ""

read -p "Press ENTER to run test 2." export ROS_DISTRO= bash scripts/install_dependencies.bash


### Test 1

... Installing Lanelet2 library from ROS binaries... ... Installing Lanelet2 library from source for Python3.8...

Configuring Catkin workspace... ... Successfully installed GeoScenario Server dependencies.


### Test 2

... Installing Lanelet2 library from ROS binaries...

No ROS distribution was found. Please ensure that setup.bash is sourced.



### Test 3 and Test 4
- Are the cases where the `rosversion` command doesn't exist
- This is hard to simulate, but `! which rosversion > /dev/null` will be true, and so the if-block will be entered (i.e., `No ROS distribution was found. Please ensure that setup.bash is sourced.` will be echoed, and the script will `exit` with an exit status of `1`).