Skip to content

Commit

Permalink
Merge pull request #710 from bocon13/travisci
Browse files Browse the repository at this point in the history
Setting up .travis.yml for automated builds on Travis CI
  • Loading branch information
bocon13 committed Jan 13, 2017
2 parents 2e9a79a + 335cb1b commit fef7e05
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 4 deletions.
15 changes: 15 additions & 0 deletions .travis.yml
@@ -0,0 +1,15 @@
language: python
sudo: required
dist: trusty

before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq vlan

install:
- sudo util/install.sh -fnvw

script:
- sudo mn --test pingall
- sudo python mininet/test/runner.py -v -quick
- sudo python examples/test/runner.py -v -quick
1 change: 1 addition & 0 deletions README.md
@@ -1,5 +1,6 @@
Mininet: Rapid Prototyping for Software Defined Networks
========================================================
[![Build Status](https://travis-ci.org/mininet/mininet.svg?branch=master)](https://travis-ci.org/mininet/mininet)

*The best way to emulate almost any network on your laptop!*

Expand Down
3 changes: 2 additions & 1 deletion examples/test/runner.py
Expand Up @@ -32,7 +32,8 @@ def runTests( testDir, verbosity=1 ):
# discover all tests in testDir
testSuite = unittest.defaultTestLoader.discover( testDir )
# run tests
MininetTestRunner( verbosity=verbosity ).run( testSuite )
success = MininetTestRunner( verbosity=verbosity ).run( testSuite ).wasSuccessful()
sys.exit( 0 if success else 1 )

if __name__ == '__main__':
# get the directory containing example tests
Expand Down
4 changes: 2 additions & 2 deletions examples/test/test_hwintf.py
Expand Up @@ -57,8 +57,8 @@ def testExternalPing( self ):
p.wait()

def tearDown( self ):
self.h3.terminate()
self.n0.terminate()
self.h3.stop( deleteIntfs=True )
self.n0.stop( deleteIntfs=True )

if __name__ == '__main__':
setLogLevel( 'warning' )
Expand Down
3 changes: 2 additions & 1 deletion mininet/test/runner.py
Expand Up @@ -21,7 +21,8 @@ def runTests( testDir, verbosity=1 ):
# discover all tests in testDir
testSuite = defaultTestLoader.discover( testDir )
# run tests
TextTestRunner( verbosity=verbosity ).run( testSuite )
success = TextTestRunner( verbosity=verbosity ).run( testSuite ).wasSuccessful()
sys.exit( 0 if success else 1 )

if __name__ == '__main__':
setLogLevel( 'warning' )
Expand Down

0 comments on commit fef7e05

Please sign in to comment.