blob: f2ea543a16d51804ce3842ece69b75be4d083635 [file] [log] [blame]
#!/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_ndnpeekpoke(unittest.TestCase):
"""Test case for the ndnpeek and ndnpoke applications"""
def setUp(self):
print "\nTesting ndnpeek and ndnpoke"
print "***************************"
os.chdir("test_ndnpeekpoke")
def tearDown(self):
print "***************************"
os.chdir("..")
def test_ndnpeekpoke(self):
ret = subprocess.call(["./ndnpeekpoke-test.sh"], shell=True)
print "Test script return value:", ret
errormsg = {
1 : "ndnpeek did not receive a Data packet satisfying its Interest",
2 : "ndnpoke did not exit after sending a Data packet",
}
if (ret != 0):
self.fail(errormsg[ret])