blob: a92caee57435a38821d38594d728fa7cbcd5eb34 [file] [log] [blame]
A R Karthick1fa66542017-08-10 14:15:29 -07001#!/usr/bin/env bash
Matteo Scandolo48d3d2d2017-08-08 13:05:27 -07002# 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 Gaonkercc19ac42016-05-04 17:21:50 -070016cord_tester="$(dirname $0)/cord-test.py"
17if [ ! -f $cord_tester ]; then
18 cord_tester="$HOME/cord-tester/src/test/setup/cord-test.py"
19fi
Chetan Gaonker503032a2016-05-12 12:06:29 -070020echo "Building all cord-tester images."
21$cord_tester build all
Chetan Gaonkercc19ac42016-05-04 17:21:50 -070022docker kill cord-onos || true
23docker kill cord-quagga || true
Chetan Gaonker503032a2016-05-12 12:06:29 -070024docker kill cord-radius || true
A R Karthickb03cecd2016-07-27 10:27:55 -070025function finish {
26 $cord_tester cleanup --olt
27 pkill -f cord-test
A R Karthickb03cecd2016-07-27 10:27:55 -070028}
29trap finish EXIT
30$cord_tester setup --olt --start-switch
31cnt=`docker ps -lq`
Chetan Gaonkercc19ac42016-05-04 17:21:50 -070032echo "Running TLS authentication test"
ChetanGaonker055d7f72016-11-07 02:11:23 -080033docker exec $cnt nosetests -v /root/test/src/test/tls/tlsTest.py:eap_auth_exchange.test_eap_tls
A R Karthickb03cecd2016-07-27 10:27:55 -070034echo "Running DHCP relay request test"
35docker exec $cnt nosetests -v /root/test/src/test/dhcprelay/dhcprelayTest.py:dhcprelay_exchange.test_dhcpRelay_1request
Chetan Gaonkercc19ac42016-05-04 17:21:50 -070036echo "Running IGMP join verify test"
A R Karthickb03cecd2016-07-27 10:27:55 -070037docker exec $cnt nosetests -v /root/test/src/test/igmp/igmpTest.py:igmp_exchange.test_igmp_join_verify_traffic
Chetan Gaonkercc19ac42016-05-04 17:21:50 -070038echo "Running VROUTER test with 5 routes"
A R Karthickb03cecd2016-07-27 10:27:55 -070039docker exec $cnt nosetests -v /root/test/src/test/vrouter/vrouterTest.py:vrouter_exchange.test_vrouter_with_5_routes
A R Karthick112cb6a2016-07-27 16:53:13 -070040echo "Running CORD subscriber tests"
ChetanGaonker055d7f72016-11-07 02:11:23 -080041docker exec $cnt nosetests -v /root/test/src/test/cordSubscriber/cordSubscriberTest.py:subscriber_exchange.test_cord_subscriber_join_recv