summaryrefslogtreecommitdiff
path: root/cesar/test_general
diff options
context:
space:
mode:
authorlaranjeiro2010-07-29 13:23:21 +0000
committerlaranjeiro2010-07-29 13:23:21 +0000
commit0ee12a43abd3fb4905c68e9c07af666060f4d8c3 (patch)
tree96be1a4e26b720b0198e60b66d1eb8640fad19b4 /cesar/test_general
parent54df478f38d3f83f5e9a3835406b48ada50a5fc5 (diff)
cesar/test_general/station/cco0/s2: This test is invalid.
The handover is only done if the CCo receives an mac stop order from linux. git-svn-id: svn+ssh://pessac/svn/cesar/trunk@7336 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cesar/test_general')
-rw-r--r--cesar/test_general/station/cco0/s2/py/sc07_handover_exceptions.py109
1 files changed, 0 insertions, 109 deletions
diff --git a/cesar/test_general/station/cco0/s2/py/sc07_handover_exceptions.py b/cesar/test_general/station/cco0/s2/py/sc07_handover_exceptions.py
deleted file mode 100644
index be78aee268..0000000000
--- a/cesar/test_general/station/cco0/s2/py/sc07_handover_exceptions.py
+++ /dev/null
@@ -1,109 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-# #
-# The handover shall only occur when no other countdown is active. #
-# This test verifies it by activating a SNID collision on the AVLNS at #
-# the same time as the CCo should handover. #
-# #
-# One AVLNs, 3 stations. #
-# AVLN 1 contains three stations. #
-# #
-# Result expected: The handover should only occur after the SNID changed. #
-# #
-# Some others test will be done for the hybrid mode. #
-#############################################################################
-
-import unittest
-import sys
-sys.path.append ('../../../../maximus/python/tools/csi/')
-sys.path.append ('../../../../maximus/python/obj/')
-sys.path.append ('../../../../maximus/python/')
-sys.path.append ('../../../../maximus/python/lib/cesar')
-
-from csicore import *
-from beacon import *
-
-csi = csiCore (1234)
-
-# Creating an AVLN.
-avln1 = csi.avln_add ("Homeplug_AVLN1", "AVLN1")
-
-avln1_sta1_debug = False
-avln1_sta2_debug = False
-avln1_sta3_debug = False
-
-# Adding the stations.
-avln1_stas = list ()
-avln1_stas.append (avln1.sta_add ("00:00:00:00:01:01", False, False,
- "HomePlug_AVLN1_Station1", "av1_spc300_sta1", "avln1_station1", 1,
- avln1_sta1_debug))
-avln1_stas.append (avln1.sta_add ("00:00:00:00:01:02", False, False,
- "HomePlug_AVLN1_Station2", "av1_spc300_sta2", "avln1_station2", 1,
- avln1_sta2_debug))
-
-csi.process_init (sys.argv + ['-e', 'obj/cco0s2.elf'])
-csi.process_avlns_launch ()
-csi.process_wait_association (15)
-csi.process_wait_authentication (15)
-
-print "Association status on AVLN1"
-csi.authentication_status (avln1)
-
-class TestHandover (unittest.TestCase):
-
- def setUp (self):
- pass
-
- def tearDown (self):
- pass
-
- def test01HandoverWhileSNIDChange (self):
- """Tries to launch a handover during a SNID change in progress, the
- handover should not occur."""
- print ""
-
- # Get the snid of the first AVLN.
- own = Station_own_data ()
- own.get_data (csi.get_maximus (), avln1_stas[1].get_sta_cesar())
- avln1_snid = own.snid
- own = None
- print "AVLN 1 SNID : ", avln1_snid
-
- avln1_stas.append (avln1.sta_add ("00:00:00:00:01:03", False, False,
- "HomePlug_AVLN1_Station3", "av1_spc300_sta3", "avln1_station3", 1,
- avln1_sta3_debug))
- csi.process_sta_start (avln1_stas[2])
-
- csi.process_wait_association ()
- csi.process_wait_authentication ()
-
- while (csi.get_maximus().get_date () < 391000000):
- csi.process_wait_sec (0.04)
- print "Handover should start now and the station 3 should become the CCo"
- print "but the SNID change will start before and the station 1 should"
- print "stay CCo at the end of the test."
-
- # Cause a SNID conflict by changing the SNID of the first AVLN.
- fcall = csi.get_maximus().create_fcall ("fc_cco_change_snid")
- fcall.set_sta (avln1_stas[0].get_sta_cesar().get())
- fcall.add_param_ushort ('snid', avln1_snid + 1)
- fcall.send()
- csi.process_wait_sec (0.2)
-
- # Get the snid of the first AVLN.
- own = Station_own_data ()
- own.get_data (csi.get_maximus (), avln1_stas[0].get_sta_cesar())
- avln1_snid_new = own.snid
- print "AVLN 1 old SNID : ", avln1_snid, " New SNID : ", avln1_snid_new
-
- self.failUnless (own.is_cco == True)
- print "No handover done during the SNID change"
-
-suite = unittest.TestLoader().loadTestsFromTestCase(TestHandover)
-testResult = unittest.TextTestRunner(verbosity=2).run(suite)
-
-csi.process_avlns_remove ()
-
-# For nightly build errors
-sys.exit ((1, 0)[testResult.wasSuccessful ()])