blob: eb0bb0c5046a847e84fe8562cd253eb38c9b0c81 [file] [log] [blame]
Junxiao Shif9ecac22015-08-28 10:02:51 -07001#!/usr/bin/python2
2# -*- Mode:python; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
3
4import os
5import unittest
6import subprocess
7
8class test_multicast_strategy(unittest.TestCase):
9 """Test suite for MulticastStrategy"""
10
11 def setUp(self):
12 print "\nTesting MulticastStrategy scenario"
13 print "**************************"
14 os.chdir("test_multicast_strategy")
15
16 def tearDown(self):
17 print "**************************"
18 os.chdir("..")
19
20 def test_strategy(self):
21 ret = subprocess.call(["./test.sh"], shell=True)
22 print "Test script return value:", ret
23 errormsg = {
24 1 : "B did not receive at least 80 Interests.",
25 2 : "C did not receive at least 80 Interests.",
26 3 : "Incoming Data packets in D exceeded 120.",
27 }
28 if ret != 0:
29 self.fail(errormsg[ret])