Hila Ben Abraham | 4c850f8 | 2014-06-22 20:24:34 -0500 | [diff] [blame] | 1 | #!/usr/bin/python2 |
| 2 | # -*- Mode:python; c-file-style:"gnu"; indent-tabs-mode:nil -*- */ |
| 3 | # |
| 4 | # Copyright (C) 2014 Washington University in St. Louis |
| 5 | # Author: Hila Ben Abraham <hila@wustl.edu> |
| 6 | # See COPYING for copyright and distribution information. |
| 7 | # |
| 8 | |
| 9 | import os |
| 10 | import unittest |
| 11 | import subprocess |
| 12 | |
| 13 | class test_hub_discovery(unittest.TestCase): |
| 14 | """Test case for testing NDN Hub Discovery NDN hub discovery procedure""" |
| 15 | |
| 16 | def setUp(self): |
| 17 | print "\nTesting NDN hub discovery procedure" |
| 18 | print "*****************************" |
| 19 | os.chdir("test_hub_discovery") |
| 20 | os.system("mkdir -p logs") |
| 21 | |
| 22 | def tearDown(self): |
| 23 | print "********************************" |
| 24 | os.chdir("..") |
| 25 | |
| 26 | def test_hub_discovery(self): |
| 27 | print ">>> test hub discovery procedure <<<" |
| 28 | ret = subprocess.call(["./hub-discovery-test.sh"], shell=True) |
| 29 | if (ret != 0): |
| 30 | self.fail(" >> TEST HUB DISCOVEY PROCEDURE FAILED") |
| 31 | else: |
| 32 | print ">> TEST HUB DISCOVEY PROCEDURE PASSED SUCCESSFULLY" |