-#install maven and JDK11 on the Gate since they are not there by default
- sh -c "which mvn >/dev/null || ./installMavenCentOS.sh"
-#install honeynode 1.2.1 simulators
-#patch OLM constant to speed up tests, unnecessary for PCE tests
- sh -c "sed -i'_' 's@=.*//#FUNCTESTVAL=@=@g' ../olm/src/main/java/org/opendaylight/transportpce/olm/util/OlmUtils.java"
-#build controller, source JDK_JAVA_OPTIONS to remove illegal reflective acces warnings introduced by Java11
- sh -c ". $PWD/reflectwarn.sh && cd .. && mvn clean install -B -q -s tests/odl_settings.xml -DskipTests -Dmaven.javadoc.skip=true -Dodlparent.spotbugs.skip -Dodlparent.checkstyle.skip"
- sh -c "mv ../olm/src/main/java/org/opendaylight/transportpce/olm/util/OlmUtils.java_ ../olm/src/main/java/org/opendaylight/transportpce/olm/util/OlmUtils.java"
-#patch Karaf exec for the same reason at runtime
- sh -c "sed -i'_' 's@!/bin/sh@!/bin/sh\'$'\n. $(dirname $0)/../../../../tests/reflectwarn.sh@' ../karaf/target/assembly/bin/karaf"
- # the following command would be the straight and right way to support both BSD and GNU sed versions
- # sh -c "sed -i'_' '1 a\'$'\n. \$(dirname \$0)/\.\./\.\./\.\./\.\./tests/reflectwarn.sh\n' ../karaf/target/assembly/bin/karaf"
- # but tox reinterprets the quotes as
- # sh -c 'sed -i'"'"'_'"'"' '"'"'1 a\'"'"'$'"'"'\n. \$(dirname \$0)/\.\./\.\./\.\./\.\./tests/reflectwarn.sh\n'"'"' ../karaf/target/assembly/bin/karaf'
- # ,what results in an unexpected different formating (with a $ on the second line and the dot on the third)
-#build Lighty if needed
- sh -c 'if [ "$USE_LIGHTY" = "True" ]; then (cd ../lighty && ./build.sh); fi'