Allow Karaf to use altern. RESTCONF and akka ports
[transportpce.git] / tox.ini
diff --git a/tox.ini b/tox.ini
index e48ff5acf5d19b3bf540506aac6e1011d286dd7c..ae74a2681a08463ecb19b3a9b20d7c0e01a48375 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -34,13 +34,8 @@ commands =
 #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)
+#patch Karaf exec for the same reason at runtime and also to have the possibility to use alternative ports
+  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'
 
@@ -81,7 +76,7 @@ setenv =
     USE_ODL_ALT_WEBSOCKET_PORT=8186
     USE_ODL_ALT_AKKA_PORT=2551
     USE_ODL_ALT_AKKA_MGT_PORT=8559
-#    USE_ODL_ALT_RESTCONF_PORT=8182
+    USE_ODL_ALT_RESTCONF_PORT=8182
 commands =
   ./launch_tests.sh 1.2.1 {posargs:}
 # By default, all tests in the folder transportpce_tests/1.2.1/ are run.
@@ -103,7 +98,7 @@ setenv =
     USE_ODL_ALT_WEBSOCKET_PORT=8187
     USE_ODL_ALT_AKKA_PORT=2552
     USE_ODL_ALT_AKKA_MGT_PORT=8560
-#    USE_ODL_ALT_RESTCONF_PORT=8183
+    USE_ODL_ALT_RESTCONF_PORT=8183
 commands =
   ./launch_tests.sh 2.2.1 {posargs:}
 
@@ -116,7 +111,7 @@ setenv =
     USE_ODL_ALT_WEBSOCKET_PORT=8188
     USE_ODL_ALT_AKKA_PORT=2553
     USE_ODL_ALT_AKKA_MGT_PORT=8561
-#    USE_ODL_ALT_RESTCONF_PORT=8184
+    USE_ODL_ALT_RESTCONF_PORT=8184
 commands =
   ./launch_tests.sh 7.1 {posargs:}
 
@@ -130,7 +125,7 @@ setenv =
     USE_ODL_ALT_WEBSOCKET_PORT=8186
     USE_ODL_ALT_AKKA_PORT=2551
     USE_ODL_ALT_AKKA_MGT_PORT=8559
-#    USE_ODL_ALT_RESTCONF_PORT=8182
+    USE_ODL_ALT_RESTCONF_PORT=8182
 commands =
 #  nosetests --with-xunit transportpce_tests/hybrid/test01_device_change_notifications.py
   ./launch_tests.sh hybrid {posargs:}