blob: eb0bb0c5046a847e84fe8562cd253eb38c9b0c81 [file] [log] [blame]
#!/usr/bin/python2
# -*- Mode:python; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
import os
import unittest
import subprocess
class test_multicast_strategy(unittest.TestCase):
"""Test suite for MulticastStrategy"""
def setUp(self):
print "\nTesting MulticastStrategy scenario"
print "**************************"
os.chdir("test_multicast_strategy")
def tearDown(self):
print "**************************"
os.chdir("..")
def test_strategy(self):
ret = subprocess.call(["./test.sh"], shell=True)
print "Test script return value:", ret
errormsg = {
1 : "B did not receive at least 80 Interests.",
2 : "C did not receive at least 80 Interests.",
3 : "Incoming Data packets in D exceeded 120.",
}
if ret != 0:
self.fail(errormsg[ret])