Added install to Makefile
Updated README
Updated doc for test_spec
diff --git a/README b/README
index d718f0a..b069afb 100644
--- a/README
+++ b/README
@@ -30,33 +30,23 @@
This places files in <oftest>/src/python/oftest/src
3. Install with setup (currently not required)
- * TBD
+ * make install
+ This runs setuptools on the generated source. It requires
+ that setuptools be installed and the user have sudo rights.
4. Edit configuration
- Edit <oftest>/src/python/oftest/oft_config.py. The only
- important variables right now are:
-
- # The platform targetted; currently ignored outside this file
- platform = <string>
-
- # The association of OF port number to interface name
- interface_ofport_map = {
- <of_port_number> : <os_interface_name>,
- ...
- }
- controller_port = <port number on which to listen>
- controller_host = <ip address on which to listen>
- debug_level_default = <desired debug level>
+ Starting from remote.py as a simple example, you can add your
+ own <platform>.py file and then have it imported with
+ --platform=<platform> on the command line.
5. Start the switch to test
The switch must be running and actively attempting to
connect to the controller at the host/port specified above.
- 6. Run basic.py
- See Warning above
+ 6. Run oft
+ See Warning above; requires sudo to control the dataplane
* cd <oftest>/tests
- * sudo python basic.py
-
+ * sudo ./oft --help
Overview
++++++++
diff --git a/tests/oft b/tests/oft
index 32c1b85..a4fb8f7 100755
--- a/tests/oft
+++ b/tests/oft
@@ -187,14 +187,20 @@
plat_help = """Set the platform type. Valid values include:
local: User space virtual ethernet pair setup
remote: Remote embedded Broadcom based switch
+ Create a new_plat.py file and use --platform=new_plat on the command line
"""
parser.add_option("-P", "--platform", help=plat_help)
parser.add_option("-H", "--host", dest="controller_host",
help="The IP/name of the test controller host")
parser.add_option("-p", "--port", dest="controller_port",
type="int", help="Port number of the test controller")
- parser.add_option("--test-spec", "--test-list",
- help="Indicate tests to run (TBD)")
+ test_list_help = """Indicate tests to run. Valid entries are "all" (the
+ default) or a comma separated list of:
+ module Run all tests in the named module
+ testcase Run tests in all modules with the name testcase
+ module.testcase Run the specific test case
+ """
+ parser.add_option("--test-spec", "--test-list", help=test_list_help)
parser.add_option("--log-file",
help="Name of log file, empty string to log to console")
parser.add_option("--debug",
diff --git a/tools/munger/Makefile b/tools/munger/Makefile
index 491c451..31f3423 100644
--- a/tools/munger/Makefile
+++ b/tools/munger/Makefile
@@ -12,6 +12,7 @@
PYLIBOF_DIR = ${TOOLS_DIR}/pylibopenflow
TARGET_DIR = ${TOP_DIR}/src/python/oftest
+SETUP_DIR = ${TOP_DIR}/src/python/
# Relative to pyopenflow-pythonize exec location
OF_HEADER = include/openflow.h
@@ -40,6 +41,9 @@
all: ${GEN_FILES}
+install: all
+ (cd ${SETUP_DIR} && sudo python setup.py install)
+
# The core OpenFlow libraries generated from openflow.h
${TARGET_DIR}/cstruct.py: ${CSTRUCT_DEP}
${CSTRUCT_GEN_CMD} > ${CSTRUCT_AUX_INFO}
@@ -76,10 +80,11 @@
@echo " make local: Generate files and put in src/"
@echo
@echo "Targets:"
- @echo " all: Puts generated .py in ${TARGET_DIR}"
- @echo " lint: Puts error report in lint/*.log"
- @echo " doc: Runs doxygen on generated files in ../../doc"
- @echo " clean: Removes generated files"
+ @echo " all: Puts generated .py in ${TARGET_DIR}"
+ @echo " lint: Puts error report in lint/*.log"
+ @echo " doc: Runs doxygen on generated files in ../../doc"
+ @echo " install: Run setup tools for generated python source"
+ @echo " clean: Removes generated files"
@echo
@echo "Debug info:"
@echo