Improve tox tests parallelization with Karaf 36/98236/2
authorguillaume.lambert <guillaume.lambert@orange.com>
Mon, 5 Jul 2021 09:08:00 +0000 (11:08 +0200)
committerVachhani, Shweta (sv111y) <sv111y@att.com>
Sun, 31 Oct 2021 11:30:02 +0000 (07:30 -0400)
JIRA: TRNSPRTPCE-482
Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com>
Change-Id: I71038c8c51719158694167e95c26833978d0ff86

tests/build_karaf_for_tests.sh [new file with mode: 0755]
tests/launch_tests.sh
tox.ini

diff --git a/tests/build_karaf_for_tests.sh b/tests/build_karaf_for_tests.sh
new file mode 100755 (executable)
index 0000000..3476e71
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+if [ -z "$USE_ODL_ALT_KARAF_INSTALL_DIR" ]; then
+    exit
+fi
+
+cd $(dirname $0)
+
+if [ -f ../"$USE_ODL_ALT_KARAF_INSTALL_DIR"/target/assembly/bin/karaf_ ]; then
+    exit
+fi
+
+. ./reflectwarn.sh
+cd  ../$USE_ODL_ALT_KARAF_INSTALL_DIR
+mvn clean install -B -q -s ../tests/odl_settings.xml -DskipTests -Dmaven.javadoc.skip=true
+./target/assembly/ressources/post_install_for_tests.sh
index c62307bd97665647133965a4b6fcda18610ec1e6..f1951c2205bf83d9186a62c7c77060df8e3bb3c9 100755 (executable)
@@ -1,5 +1,9 @@
 #!/bin/sh
 
+if [ "$USE_LIGHTY" != "True" ]; then
+    ./build_karaf_for_tests.sh
+fi
+
 for arg in $@; do
     if [ -z "$test_suite" ]; then
         test_suite=$1
diff --git a/tox.ini b/tox.ini
index 20feaf9ec37ec0a0b86153b7a12420a7d61f6cc7..a7ac907eed30fe70ad0c634635a15a8dc12d035f 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -37,7 +37,6 @@ commands =
   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 and also to have the possibility to use alternative ports
   sh -c "../karaf/target/assembly/ressources/post_install_for_tests.sh"
-  sh -c 'if [ "$USE_LIGHTY" != "True" ]; then . $PWD/reflectwarn.sh && (for suffix in 121 221 71; do cd  ../"karaf$suffix"/; mvn clean install -B -q -s ../tests/odl_settings.xml -DskipTests -Dmaven.javadoc.skip=true; ./target/assembly/ressources/post_install_for_tests.sh;done) ; fi'
 #build Lighty if needed
   sh -c 'if [ "$USE_LIGHTY" = "True" ]; then (cd ../lighty && ./build.sh); fi'