From ac9554d6dc4647f30ed0c7449d791b991993ba5e Mon Sep 17 00:00:00 2001 From: Bob Lantz Date: Wed, 3 Feb 2010 15:29:07 -0800 Subject: [PATCH] Renamed mn_run.py -> mn, mn_clean.py -> mnclean; updated Makefle It's possible that mn_clean is a bit easier to read; mnclean may be easier to type, however. Added variables to Makefile so that source files are listed in a single location. --- Makefile | 17 +++++++++++------ bin/{mn_run.py => mn} | 0 bin/{mn_clean.py => mnclean} | 0 custom/README | 4 ++-- setup.py | 2 +- 5 files changed, 14 insertions(+), 9 deletions(-) rename bin/{mn_run.py => mn} (100%) rename bin/{mn_clean.py => mnclean} (100%) diff --git a/Makefile b/Makefile index 9ebaa0e..184c532 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,17 @@ all: codecheck test clean: - rm -rf build dist build *.egg-info *.pyc + rm -rf build dist *.egg-info *.pyc -codecheck: mininet/*.py mininet/test/*.py - pyflakes mininet/*.py mininet/test/*.py bin/*.py - pylint --rcfile=.pylint mininet/*.py mininet/test/*.py bin/*.py - pep8 --ignore=E251 mininet/*.py mininet/test/*.py bin/*.py +MININET = mininet/*.py +TEST = mininet/test/*.py +BIN = bin/mn bin/mnclean +PYSRC = $(MININET) $(TEST) $(BIN) -test: mininet/*.py mininet/test/*.py +codecheck: $(PYSRC) + pyflakes $(PYSRC) + pylint --rcfile=.pylint $(PYSRC) + pep8 --ignore=E251 $(PYSRC) + +test: $(MININET) $(TEST) mininet/test/test_nets.py diff --git a/bin/mn_run.py b/bin/mn similarity index 100% rename from bin/mn_run.py rename to bin/mn diff --git a/bin/mn_clean.py b/bin/mnclean similarity index 100% rename from bin/mn_clean.py rename to bin/mnclean diff --git a/custom/README b/custom/README index 45b06e2..a7e8b51 100644 --- a/custom/README +++ b/custom/README @@ -1,9 +1,9 @@ This directory should hold configuration files for custom mininets. -See custom_example.py, which loads the default minimal topology. The advantage of defining a mininet in a separate file is that you then use the --custom option in mn_run.py to run the CLI or specific tests with it. +See custom_example.py, which loads the default minimal topology. The advantage of defining a mininet in a separate file is that you then use the --custom option in mn to run the CLI or specific tests with it. Each custom file must define a Mininet object for an 'mn' variable. To start up a mininet with this custom topology, do: - sudo mn_run.py --custom custom_example.py + sudo mn --custom custom_example.py diff --git a/setup.py b/setup.py index 6807a33..2a41d05 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ from setuptools import setup, find_packages from os.path import join scripts = [join('bin', filename) for filename in - ['mn_run.py', 'mn_clean.py']] + ['mn', 'mnclean']] modname = distname = 'mininet'