2 ##############################################################################
3 # Copyright (c) 2016 Red Hat Inc. and others.
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
13 echo "==============================="
15 echo executing on machine `uname -a`
19 echo run BuildAndTest -h for help
22 while getopts "dg:hkp:u:v" opt; do
38 OVS_REPO_URL=${OPTARG}
59 mkdir -p $HOME/rpmbuild/RPMS
60 mkdir -p $HOME/rpmbuild/SOURCES
61 mkdir -p $HOME/rpmbuild/SPECS
62 mkdir -p $HOME/rpmbuild/SRPMS
66 echo " Testing installation of kmod RPM"
67 if [ ! -z $kmod ]; then
68 echo "Install kernel module"
69 sudo rpm -ivh $RPMDIR/RPMS/x86_64/openvswitch-kmod*.rpm
70 echo " Kernel RPM installed."
72 echo "Testing User Space RPM"
73 sudo rpm -ivh $RPMDIR/RPMS/x86_64/openvswitch-2*.rpm
75 sudo service openvswitch start
78 sudo ovs-vsctl add-br br1
79 sudo ovs-ofctl dump-flows br1