summaryrefslogtreecommitdiff
path: root/cesar/test_general
diff options
context:
space:
mode:
authordufour2009-10-05 15:28:30 +0000
committerdufour2009-10-05 15:28:30 +0000
commit28aedd4a3219addbce8321635849dbb823618465 (patch)
tree347e7171f2ae7119bc2f3e1f769042f286a3946b /cesar/test_general
parentf80f4d362376170551b3433ed105efafdf4cdaf9 (diff)
cesar/test_general/cco0_s2: correctly handle '--revert' argument
In simple connect scenario, the revert argument to choose which station will do the SC add (i.e. simulate the button connect pressed) is now correctly supported (which was not previously done correctly because of the new usage of Startup class introduced by r5498). git-svn-id: svn+ssh://pessac/svn/cesar/trunk@5924 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cesar/test_general')
-rw-r--r--cesar/test_general/station/cco0/s2/py/sc08_sc_one_sc_join_one_sc_add.py14
1 files changed, 4 insertions, 10 deletions
diff --git a/cesar/test_general/station/cco0/s2/py/sc08_sc_one_sc_join_one_sc_add.py b/cesar/test_general/station/cco0/s2/py/sc08_sc_one_sc_join_one_sc_add.py
index 053129e621..cd0f9ad29b 100644
--- a/cesar/test_general/station/cco0/s2/py/sc08_sc_one_sc_join_one_sc_add.py
+++ b/cesar/test_general/station/cco0/s2/py/sc08_sc_one_sc_join_one_sc_add.py
@@ -19,6 +19,8 @@ startup = Startup (base_path = base_path,
executable = sys.path[0] + '/../obj/cco0s2.elf')
startup.add_option ('-g', '--gdb', action = 'store_true',
default = False, help = 'launch the test in debug mode')
+startup.add_option ('-r', '--revert', action = 'store_false',
+ default = True, help = 'revert which STA will do the SC_ADD')
argv, proto, options = startup.parse ()
from csicore import csiCore, csiSta, csiPacket
@@ -27,16 +29,8 @@ from drv import *
from own_data import Station_own_data
import unittest
-# By default, SC_JOIN is done by STA1
-sc_join_sta1 = True
-
-# Extract which of STA or CCo will do the SC_ADD.
-for i in range(len(sys.argv)):
- if sys.argv[i] != '-':
- arg = sys.argv[i].lower()
- if arg == 'revert':
- sc_join_sta1 = False
- del sys.argv[i]
+# Set which STA is doing the SC_ADD.
+sc_join_sta1 = options.revert
class TestAuthentication(unittest.TestCase):
def setUp(self):