Create a Karaf post-install script for tests
[transportpce.git] / tox.ini
diff --git a/tox.ini b/tox.ini
index 879d1fc60914c2e08780e847ff97d43168ec4c20..b763ce428a3c2b94e5b653ccc0b1bea08bc8800d 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -35,12 +35,7 @@ commands =
   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)
+  sh -c "../karaf/target/assembly/ressources/post_install_for_tests.sh"
 #build Lighty if needed
   sh -c 'if [ "$USE_LIGHTY" = "True" ]; then (cd ../lighty && ./build.sh); fi'