blob: a0810766b7ef0a15a308c7e9fe2e85ba41ad412f [file] [log] [blame]
Yi Huang9906f8e2014-04-17 13:28:03 -07001#!/usr/bin/python2
2# -*- Mode:python; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
3#
Eric Newberryc22afde2018-06-19 01:28:31 -07004# Copyright (C) 2014 Arizona Board of Regents.
Yi Huang9906f8e2014-04-17 13:28:03 -07005# Author: Yi Huang <ltr120@email.arizona.edu>
6# See COPYING for copyright and distribution information.
7#
8
9import os
10import unittest
11import subprocess
12
13class 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 Pesavento15af8b52019-01-27 14:06:54 -050029 1 : "ndn-traffic-client did not end normally. See logs/client.log",
Yi Huang9906f8e2014-04-17 13:28:03 -070030 2 : "Data loss detected",
31 }
32 if (ret != 0):
33 self.fail(errormsg[ret])