Yi Huang | 9906f8e | 2014-04-17 13:28:03 -0700 | [diff] [blame] | 1 | #!/usr/bin/python2 |
| 2 | # -*- Mode:python; c-file-style:"gnu"; indent-tabs-mode:nil -*- */ |
| 3 | # |
Eric Newberry | c22afde | 2018-06-19 01:28:31 -0700 | [diff] [blame] | 4 | # Copyright (C) 2014 Arizona Board of Regents. |
Yi Huang | 9906f8e | 2014-04-17 13:28:03 -0700 | [diff] [blame] | 5 | # Author: Yi Huang <ltr120@email.arizona.edu> |
| 6 | # See COPYING for copyright and distribution information. |
| 7 | # |
| 8 | |
| 9 | import os |
| 10 | import unittest |
| 11 | import subprocess |
| 12 | |
| 13 | class test_unixface(unittest.TestCase): |
| 14 | """Test case for testing unix face""" |
| 15 | |
| 16 | def setUp(self): |
| 17 | print "\nTesting unix face" |
| 18 | print "*****************************" |
| 19 | os.chdir("test_unixface") |
| 20 | |
| 21 | def tearDown(self): |
| 22 | print "*****************************" |
| 23 | os.chdir("..") |
| 24 | |
| 25 | def test_unixface(self): |
| 26 | ret = subprocess.call(["./unix-face-test.sh"], shell=True) |
| 27 | print "Test script return value:", ret |
| 28 | errormsg = { |
Davide Pesavento | 15af8b5 | 2019-01-27 14:06:54 -0500 | [diff] [blame] | 29 | 1 : "ndn-traffic-client did not end normally. See logs/client.log", |
Yi Huang | 9906f8e | 2014-04-17 13:28:03 -0700 | [diff] [blame] | 30 | 2 : "Data loss detected", |
| 31 | } |
| 32 | if (ret != 0): |
| 33 | self.fail(errormsg[ret]) |