Changing the file names from run.sh/run.bat to runsanity.sh/runsanity.bat to make...
[controller.git] / opendaylight / distribution / opendaylight / runsanity.bat
1 rem Inject the sanitytest jar as a controller plugin
2 copy .\target\dependency\sanitytest*.jar .\target\distribution.opendaylight-osgipackage\opendaylight\plugins
3
4 rem Store the current working directory in a variable so that we can get back to it later
5 set cwd=%cd%
6
7 rem Switch to the distribution folder
8 cd .\target\distribution.opendaylight-osgipackage\opendaylight
9
10 rem Run the controller
11 cmd.exe /c run.bat
12
13 rem Store the exit value of the controller in a variable
14 set success=%ERRORLEVEL%
15
16 rem Switch back to the directory from which this script was invoked
17 cd %cwd%
18
19 rem Remove the sanitytest jar from the plugins directory
20 del .\target\distribution.opendaylight-osgipackage\opendaylight\plugins\sanitytest*.jar
21
22 rem Exit using the exit code that we had captured earlier after running the controller
23 exit /b %SUCCESS%