#!/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])
