My team is using JUnit to launch tests from eclipse.
Before executing these tests from eclipse, we have to specify the env variable LD_LIBRARY_PATH to load dependencies at run time. The correct value of LD_LIBRARY_PATH can change when one of my team's member commits a change in the project. We have a script which computes its correct value.
Today, we have two solutions to set the variable :
- run the script to get the value, and for each JUnit test we want to run, set it in Run Configurations window.
- write a script which sets the variable and launches eclipse.
First method is unproductive, and with second method, we have to restart eclipse each time we update the project.
A better solution would be to write a script which would set the variable and which would be called by eclipse each time a test is run.
Is there a way to call a script before each test with Eclipse ? Any other idea would be also greatly appreciated.