| #!/usr/bin/python2 |
| # -*- Mode:python; c-file-style:"gnu"; indent-tabs-mode:nil -*- */ |
| # |
| # Copyright (C) 2014 Arizona Board of Regents. |
| # Author: Yi Huang <ltr120@email.arizona.edu> |
| # See COPYING for copyright and distribution information. |
| # |
| |
| import os |
| import unittest |
| import subprocess |
| |
| class test_unixface(unittest.TestCase): |
| """Test case for testing unix face""" |
| |
| def setUp(self): |
| print "\nTesting unix face" |
| print "*****************************" |
| os.chdir("test_unixface") |
| |
| def tearDown(self): |
| print "*****************************" |
| os.chdir("..") |
| |
| def test_unixface(self): |
| ret = subprocess.call(["./unix-face-test.sh"], shell=True) |
| print "Test script return value:", ret |
| errormsg = { |
| 1 : "ndn-traffic-client did not end normally. See logs/client.log", |
| 2 : "Data loss detected", |
| } |
| if (ret != 0): |
| self.fail(errormsg[ret]) |