| #!/usr/bin/python2 |
| # -*- Mode:python; c-file-style:"gnu"; indent-tabs-mode:nil -*- */ |
| # |
| # Copyright (C) 2014-2018 Arizona Board of Regents. |
| # Author: Jerald Paul Abraham <jeraldabraham@email.arizona.edu> |
| # Author: Eric Newberry <enewberry@cs.arizona.edu> |
| # See COPYING for copyright and distribution information. |
| # |
| |
| import os |
| import unittest |
| import subprocess |
| |
| class test_fib_matching(unittest.TestCase): |
| """Test case for testing FIB matching""" |
| |
| def setUp(self): |
| print "\nTesting FIB Matching" |
| print "********************" |
| os.chdir("test_fib_matching") |
| |
| def tearDown(self): |
| print "********************" |
| os.chdir("..") |
| |
| def test_fib_matching(self): |
| ret = subprocess.call(["./fib-matching-test.sh"]) |
| print "Test script return value:", ret |
| errormsg = { |
| 1 : "Traffic Client did not receive Data or received Data did not contain expected content", |
| } |
| if ret != 0: |
| self.fail(errormsg[ret]) |