X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fdistribution%2Fopendaylight%2Frunsanity.sh;fp=opendaylight%2Fdistribution%2Fopendaylight%2Frunsanity.sh;h=4ee9555b97fc747c411bf8afa42b2c7da736c036;hp=0000000000000000000000000000000000000000;hb=530f16aabf749e45477e8467d73ad0921fc7bb99;hpb=723a5d5b870e81f4f0fe0fa5641b31fe4a609e93 diff --git a/opendaylight/distribution/opendaylight/runsanity.sh b/opendaylight/distribution/opendaylight/runsanity.sh new file mode 100755 index 0000000000..4ee9555b97 --- /dev/null +++ b/opendaylight/distribution/opendaylight/runsanity.sh @@ -0,0 +1,24 @@ +# Inject the sanitytest jar as a controller plugin +cp ./target/dependency/sanitytest*.jar ./target/distribution.opendaylight-osgipackage/opendaylight/plugins + +# Store the current working directory in a variable so that we can get back to it later +cwd=`pwd` + +# Switch to the distribution folder +cd ./target/distribution.opendaylight-osgipackage/opendaylight/ + +# Run the controller +./run.sh + +# Store the exit value of the controller in a variable +success=`echo $?` + +# Switch back to the directory from which this script was invoked +cd $cwd + +# Remove the sanitytest jar from the plugins directory +rm ./target/distribution.opendaylight-osgipackage/opendaylight/plugins/sanitytest*.jar + +# Exit using the exit code that we had captured earlier after running the controller +exit $success +