-changedir={toxinidir}/tests
-commands =
- {py27,portmapping,topoPortMapping,rspn,topology,pce,olm,end2end,portmapping221,rspn221,topology221,olm221,end2end221,gnpy}: - bash -c "if [ ! `which mvn` ]; then ./installMavenCentOS.sh ; fi"
- {py27,portmapping,topoPortMapping,rspn,topology,olm,end2end,portmapping221,rspn221,topology221,olm221,end2end221,gnpy}: - bash -c "sed 's@=.*//#FUNCTESTVAL=@=@g' ../olm/src/main/java/org/opendaylight/transportpce/olm/util/OlmUtils.java >/tmp/pivot; mv /tmp/pivot ../olm/src/main/java/org/opendaylight/transportpce/olm/util/OlmUtils.java"
- {py27,portmapping,topoPortMapping,rspn,topology,pce,olm,end2end,portmapping221,rspn221,topology221,olm221,end2end221,gnpy}: - bash -c "(cd .. && mvn clean install -s tests/odl_settings.xml -DskipTests -Dmaven.javadoc.skip=true)"
- {py27,portmapping,topoPortMapping,rspn,topology,pce,olm,end2end,portmapping221,rspn221,topology221,olm221,end2end221,gnpy}: - bash -c 'if [ "$USE_LIGHTY" == "True" ]; then (cd ../lighty && ./build.sh); fi'
- {py27,portmapping,topoPortMapping,rspn,topology,olm,end2end}: - ./buildHoneynode.sh
- {py27,portmapping}: nosetests --with-xunit transportpce_tests/1.2.1/test_portmapping.py
- {py27,topoPortMapping}: nosetests --with-xunit transportpce_tests/1.2.1/test_topoPortMapping.py
- {py27,topology}: nosetests --with-xunit transportpce_tests/1.2.1/test_topology.py
- {py27,rspn}: nosetests --with-xunit transportpce_tests/1.2.1/test_renderer_service_path_nominal.py
- {py27,pce}: nosetests --with-xunit transportpce_tests/1.2.1/test_pce.py
- {py27,olm}: nosetests --with-xunit transportpce_tests/1.2.1/test_olm.py
- {end2end}: nosetests --with-xunit transportpce_tests/1.2.1/test_end2end.py
- {py27,portmapping221,rspn221,topology221,olm221,end2end221}: - ./buildHoneynode.sh 2.2.1
- {py27,portmapping221}: nosetests --with-xunit transportpce_tests/2.2.1/test_portmapping.py
- {py27,topology221}: nosetests --with-xunit transportpce_tests/2.2.1/test_topology.py
- {py27,rspn221}: nosetests --with-xunit transportpce_tests/2.2.1/test_renderer_service_path_nominal.py
- {py27,olm221}: nosetests --with-xunit transportpce_tests/2.2.1/test_olm.py
- {end2end221}: nosetests --with-xunit transportpce_tests/2.2.1/test_end2end.py
- #{gnpy}: - sudo docker pull atriki/gnpyrest:v1.1
- {gnpy}: - sudo docker run -d -p 8008:5000 --name gnpy_tpce_rest1 atriki/gnpyrest:v1.1
- {gnpy}: nosetests --with-xunit transportpce_tests/1.2.1/test_gnpy.py
- #{gnpy}: - sudo docker container rm -f gnpy_tpce_rest1
+commands =
+#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 "../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'
+
+[testenv:sims121]
+whitelist_externals = sh
+depends = buildcontroller
+# sims profiles does not strictly depends on buildcontroller
+# but this dependency avoids race condition in the gate
+commands =
+ - sh -c "./install_honeynode.sh 1.2.1"
+
+[testenv:sims221]
+whitelist_externals = sh
+depends = buildcontroller
+commands =
+ - sh -c "./install_honeynode.sh 2.2.1"
+
+[testenv:sims71]
+whitelist_externals = sh
+depends = buildcontroller
+commands =
+ - sh -c "./install_honeynode.sh 7.1"
+
+[testenv:testsPCE]
+depends = buildcontroller
+whitelist_externals = launch_tests.sh
+passenv = LAUNCHER USE_LIGHTY
+commands =
+ ./launch_tests.sh pce {posargs:}
+
+[testenv:tests121]
+depends = buildcontroller,sims121,testsPCE
+# testsPCE dependency is only here to chain tests in the gate and avoid resources starvation
+whitelist_externals = launch_tests.sh
+passenv = LAUNCHER
+setenv =
+ USE_LIGHTY=False
+ 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
+commands =
+ ./launch_tests.sh 1.2.1 {posargs:}
+# By default, all tests in the folder transportpce_tests/1.2.1/ are run.
+# Though, a restricted list of tests can be passed as argument to 'tox -e tests121'.
+# For example, 'tox -e tests121 portmapping' will run only the portmapping test.
+# and 'tox -e tests121 "portmapping pce"' will run the portmapping and pce tests.
+# Additionnally, a different launcher command than 'nosetests --with-xunit' can be
+# used by exporting the variable LAUNCHER. For example 'export LAUNCHER="python3"'
+# which is more verbose than nose or 'export LAUNCHER="ls -l"' to only list script
+# files attributes.