Skip to content

Commit

Permalink
tried to change the env variables
Browse files Browse the repository at this point in the history
  • Loading branch information
julienthevenoz committed Jan 22, 2024
1 parent fae15f3 commit 6933321
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/systemtests_sim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,12 @@ jobs:
cd ros2_ws
source /opt/ros/humble/setup.bash
. install/local_setup.bash
##########
pip show cffirmware
export PYTHONPATH="${PYTHONPATH}:/home/github/.local/lib/python3.10/site-packages/"
printenv PYTHONPATH
unzip /home/github/.local/lib/python3.10/site-packages/cffirmware-0.1-py3.10.egg
##########
export ROS_LOCALHOST_ONLY=1
python3 src/crazyswarm2/systemtests/test_flights.py --sim
Expand All @@ -69,17 +70,16 @@ jobs:
with:
name: pdf_rosbags_and_logs
path: |
/home/github/.local/lib/python3.10/site-packages/cffirmware-0.1-py3.10.egg
/home/github/.local/lib/python3.10/site-packages/cffirmware.py
#/home/github/.local/lib/python3.10/site-packages/cffirmware-0.1-py3.10.egg
#ros2_ws/results
- name: Do some ls
id: step8
if: '!cancelled()'
run: |
ls /home/github/.local/lib/python3.10/
ls /home/github/.local/lib/python3.10/site-packages/
Expand Down
4 changes: 3 additions & 1 deletion systemtests/test_flights.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,14 @@ def setUp(self):
self.test_file = None

# launch server
current_env = None
src = "source " + str(Path(__file__).parents[3] / "install/setup.bash") # -> "source /home/github/actions-runner/_work/crazyswarm2/crazyswarm2/ros2_ws/install/setup.bash"
command = f"{src} && ros2 launch crazyflie launch.py"
if TestFlights.SIM :
command += " backend:=sim" #launch crazyswarm from simulation backend
current_env = os.environ.copy()
self.launch_crazyswarm = Popen(command, shell=True, stderr=PIPE, stdout=PIPE, text=True,
start_new_session=True, executable="/bin/bash")
start_new_session=True, executable="/bin/bash", env=current_env)
atexit.register(clean_process, self.launch_crazyswarm) #atexit helps us to make sure processes are cleaned even if script exits unexpectedly
time.sleep(1)

Expand Down

0 comments on commit 6933321

Please sign in to comment.