A R Karthick | 1fa6654 | 2017-08-10 14:15:29 -0700 | [diff] [blame] | 1 | #!/usr/bin/env bash |
Matteo Scandolo | 48d3d2d | 2017-08-08 13:05:27 -0700 | [diff] [blame] | 2 | # Copyright 2017-present Open Networking Foundation |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | |
Chetan Gaonker | cc19ac4 | 2016-05-04 17:21:50 -0700 | [diff] [blame] | 16 | cord_tester="$(dirname $0)/cord-test.py" |
| 17 | if [ ! -f $cord_tester ]; then |
| 18 | cord_tester="$HOME/cord-tester/src/test/setup/cord-test.py" |
| 19 | fi |
Chetan Gaonker | 503032a | 2016-05-12 12:06:29 -0700 | [diff] [blame] | 20 | echo "Building all cord-tester images." |
| 21 | $cord_tester build all |
Chetan Gaonker | cc19ac4 | 2016-05-04 17:21:50 -0700 | [diff] [blame] | 22 | docker kill cord-onos || true |
| 23 | docker kill cord-quagga || true |
Chetan Gaonker | 503032a | 2016-05-12 12:06:29 -0700 | [diff] [blame] | 24 | docker kill cord-radius || true |
A R Karthick | b03cecd | 2016-07-27 10:27:55 -0700 | [diff] [blame] | 25 | function finish { |
| 26 | $cord_tester cleanup --olt |
| 27 | pkill -f cord-test |
A R Karthick | b03cecd | 2016-07-27 10:27:55 -0700 | [diff] [blame] | 28 | } |
| 29 | trap finish EXIT |
| 30 | $cord_tester setup --olt --start-switch |
| 31 | cnt=`docker ps -lq` |
Chetan Gaonker | cc19ac4 | 2016-05-04 17:21:50 -0700 | [diff] [blame] | 32 | echo "Running TLS authentication test" |
ChetanGaonker | 055d7f7 | 2016-11-07 02:11:23 -0800 | [diff] [blame] | 33 | docker exec $cnt nosetests -v /root/test/src/test/tls/tlsTest.py:eap_auth_exchange.test_eap_tls |
A R Karthick | b03cecd | 2016-07-27 10:27:55 -0700 | [diff] [blame] | 34 | echo "Running DHCP relay request test" |
| 35 | docker exec $cnt nosetests -v /root/test/src/test/dhcprelay/dhcprelayTest.py:dhcprelay_exchange.test_dhcpRelay_1request |
Chetan Gaonker | cc19ac4 | 2016-05-04 17:21:50 -0700 | [diff] [blame] | 36 | echo "Running IGMP join verify test" |
A R Karthick | b03cecd | 2016-07-27 10:27:55 -0700 | [diff] [blame] | 37 | docker exec $cnt nosetests -v /root/test/src/test/igmp/igmpTest.py:igmp_exchange.test_igmp_join_verify_traffic |
Chetan Gaonker | cc19ac4 | 2016-05-04 17:21:50 -0700 | [diff] [blame] | 38 | echo "Running VROUTER test with 5 routes" |
A R Karthick | b03cecd | 2016-07-27 10:27:55 -0700 | [diff] [blame] | 39 | docker exec $cnt nosetests -v /root/test/src/test/vrouter/vrouterTest.py:vrouter_exchange.test_vrouter_with_5_routes |
A R Karthick | 112cb6a | 2016-07-27 16:53:13 -0700 | [diff] [blame] | 40 | echo "Running CORD subscriber tests" |
ChetanGaonker | 055d7f7 | 2016-11-07 02:11:23 -0800 | [diff] [blame] | 41 | docker exec $cnt nosetests -v /root/test/src/test/cordSubscriber/cordSubscriberTest.py:subscriber_exchange.test_cord_subscriber_join_recv |