blob: 3295fe33aac3f0aa05570ad3db7c1f9b2905d4c4 [file] [log] [blame]
Matteo Scandolo48d3d2d2017-08-08 13:05:27 -07001
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
16
Chetan Gaonkercc19ac42016-05-04 17:21:50 -070017#!/usr/bin/env bash
18cord_tester="$(dirname $0)/cord-test.py"
19if [ ! -f $cord_tester ]; then
20 cord_tester="$HOME/cord-tester/src/test/setup/cord-test.py"
21fi
Chetan Gaonker503032a2016-05-12 12:06:29 -070022echo "Building all cord-tester images."
23$cord_tester build all
Chetan Gaonkercc19ac42016-05-04 17:21:50 -070024docker kill cord-onos || true
25docker kill cord-quagga || true
Chetan Gaonker503032a2016-05-12 12:06:29 -070026docker kill cord-radius || true
A R Karthickb03cecd2016-07-27 10:27:55 -070027function finish {
28 $cord_tester cleanup --olt
29 pkill -f cord-test
A R Karthickb03cecd2016-07-27 10:27:55 -070030}
31trap finish EXIT
32$cord_tester setup --olt --start-switch
33cnt=`docker ps -lq`
Chetan Gaonkercc19ac42016-05-04 17:21:50 -070034echo "Running TLS authentication test"
ChetanGaonker055d7f72016-11-07 02:11:23 -080035docker 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 -070036echo "Running DHCP relay request test"
37docker exec $cnt nosetests -v /root/test/src/test/dhcprelay/dhcprelayTest.py:dhcprelay_exchange.test_dhcpRelay_1request
Chetan Gaonkercc19ac42016-05-04 17:21:50 -070038echo "Running IGMP join verify test"
A R Karthickb03cecd2016-07-27 10:27:55 -070039docker 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 -070040echo "Running VROUTER test with 5 routes"
A R Karthickb03cecd2016-07-27 10:27:55 -070041docker 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 -070042echo "Running CORD subscriber tests"
ChetanGaonker055d7f72016-11-07 02:11:23 -080043docker exec $cnt nosetests -v /root/test/src/test/cordSubscriber/cordSubscriberTest.py:subscriber_exchange.test_cord_subscriber_join_recv