diff --git a/configure.ac b/configure.ac index dec4bccc9..96589a05e 100644 --- a/configure.ac +++ b/configure.ac @@ -568,6 +568,7 @@ examples/platforms/Makefile examples/platforms/cc2538/Makefile examples/platforms/posix/Makefile tools/Makefile +tools/harness-automation/Makefile tools/spi-hdlc-adapter/Makefile tests/Makefile tests/scripts/Makefile diff --git a/tools/Makefile.am b/tools/Makefile.am index 1ec9adb6f..fabc789ed 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -31,6 +31,7 @@ include $(abs_top_nlbuild_autotools_dir)/automake/pre.am # Always package (e.g. for 'make dist') these subdirectories. DIST_SUBDIRS = \ + harness-automation \ spi-hdlc-adapter \ $(NULL) diff --git a/tools/harness-automation/Makefile.am b/tools/harness-automation/Makefile.am new file mode 100644 index 000000000..ee7094908 --- /dev/null +++ b/tools/harness-automation/Makefile.am @@ -0,0 +1,41 @@ +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + +include $(abs_top_nlbuild_autotools_dir)/automake/pre.am + +EXTRA_DIST = \ + autothreadharness \ + cases \ + doc \ + requirements.txt \ + README.rst \ + start.bat \ + start.sh \ + $(NULL) + +include $(abs_top_nlbuild_autotools_dir)/automake/post.am diff --git a/tools/harness-automation/README.rst b/tools/harness-automation/README.rst new file mode 100644 index 000000000..c365b860e --- /dev/null +++ b/tools/harness-automation/README.rst @@ -0,0 +1,64 @@ +======================= +Harness Automation Tool +======================= + +This is a tool to automate testing openthread with GRL Thread-Test-Harness1.1-Alpha v1.0-Release_13.0. + +----------- +Quick Start +----------- + +Follow the `Quick Start `_ + +------ +Syntax +------ + +:: + + ./start.sh [-h] [--pattern PATTERN] [--delete-blacklist] [--skip SKIP] + [--dry-run] [--result-file RESULT_FILE] + [--list-file LIST_FILE] [--continue-from CONTINUE_FROM] + [--auto-reboot] [--manual-reset] [--list-devices] + [NAME [NAME ...]] + +------- +Options +------- + +If ``-l`` is given, ``NAME`` is the serial port device name. Otherwise ``NAME`` is test case name. This enables running single or multiple test cases directly. + +Other options:: + + -h, --help + Show help message and exit. + + --pattern PATTERN, -p PATTERN + File name pattern, Default to all python files. + + --delete-blacklist, -d + Clear blacklist on startup. By default, golden devices failed to be connected are kept in a blacklist automatically. Add this option to clear blacklist on startup. + + --skip SKIP, -k SKIP + Type of test case status to skip. ``e`` for error, ``f`` for fail, ``p`` for pass. Default to "efp". If test case names are given by ``NAME``, this option will not work. + + --dry-run, -n + Just show what test case will be run. + + --result-file RESULT_FILE, -o RESULT_FILE + File to store and read current status. + + --list-file LIST_FILE, -i LIST_FILE + File to list cases names to test. + + --continue-from CONTINUE_FROM, -c CONTINUE_FROM + First case to test. + + --auto-reboot, -a + Restart system when harness cannot recover. This is a walk around to some issues, such as golden devices may not work after long time running and have to restart system. + + --manual-reset, -m + Reset devices manually, in case no PDU available so that reset golden devices have to be done manually. + + --list-devices, -l + List devices, including their version information. diff --git a/tools/harness-automation/autothreadharness/__init__.py b/tools/harness-automation/autothreadharness/__init__.py new file mode 100644 index 000000000..fb2815d2e --- /dev/null +++ b/tools/harness-automation/autothreadharness/__init__.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + + diff --git a/tools/harness-automation/autothreadharness/apc_pdu_controller.py b/tools/harness-automation/autothreadharness/apc_pdu_controller.py new file mode 100644 index 000000000..6f6a2356a --- /dev/null +++ b/tools/harness-automation/autothreadharness/apc_pdu_controller.py @@ -0,0 +1,122 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import logging +import telnetlib +import time +import re + +logger = logging.getLogger(__name__) + +class ApcPduController(object): + def __init__(self, ip, port=23): + """Create APC PDU controller + + Args: + ip (str), ip address or hostname + port (int), port number + """ + self.port = port + self.ip = ip + self.tn = None + self._init() + + def __del__(self): + self.close() + + def _init(self): + """Initialize the telnet connection + """ + self.tn = telnetlib.Telnet(self.ip, self.port) + self.tn.read_until('User Name') + self.tn.write('apc\r\n') + self.tn.read_until('Password') + self.tn.write('apc\r\n') + self.until_done() + + def close(self): + """Close telnet connection""" + logger.info('closing telnet') + if self.tn: + self.tn.close() + + def until_done(self): + """Wait until the prompt encountered + """ + self.until(r'^>') + + def until(self, regex): + """Wait until the regex encountered + """ + logger.debug('waiting for %s', regex) + r = re.compile(regex, re.M) + self.tn.expect([r]) + + def reboot(self, outlet=1): + """Reboot outlet + """ + # main menu + self.tn.write('\x1b\r\n') + self.until_done() + # Device Manager + self.tn.write('1\r\n') + self.until_done() + # Outlet Management + self.tn.write('2\r\n') + self.until_done() + # Outlet Control + self.tn.write('1\r\n') + self.until_done() + # Select outlet + self.tn.write('%d\r\n' % outlet) + self.until_done() + # Control + self.tn.write('1\r\n') + self.until_done() + # off + self.tn.write('2\r\n') + self.until('to cancel') + self.tn.write('YES\r\n') + self.until('to continue') + self.tn.write('\r\n') + self.until_done() + + time.sleep(5) + # on + self.tn.write('1\r\n') + self.until('to cancel') + self.tn.write('YES\r\n') + self.until('to continue') + self.tn.write('\r\n') + self.until_done() + +if __name__ == '__main__': + apc = ApcPduController('192.168.1.88') + apc.reboot() diff --git a/tools/harness-automation/autothreadharness/harness_case.py b/tools/harness-automation/autothreadharness/harness_case.py new file mode 100644 index 000000000..a0dc0a9b7 --- /dev/null +++ b/tools/harness-automation/autothreadharness/harness_case.py @@ -0,0 +1,713 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +from selenium import webdriver +from selenium.webdriver import ActionChains +from selenium.webdriver.support.ui import Select +from selenium.common.exceptions import UnexpectedAlertPresentException + +import json +import logging +import os +import re +import time +import unittest + +from autothreadharness import settings +from autothreadharness.apc_pdu_controller import ApcPduController +from autothreadharness.harness_controller import HarnessController +from autothreadharness.helpers import HistoryHelper +from autothreadharness.open_thread_controller import OpenThreadController + +logger = logging.getLogger(__name__) + +THREAD_CHANNEL_MAX = 26 +"""Maximum channel number of thread protocol""" + +THREAD_CHANNEL_MIN = 11 +"""Minimum channel number of thread protocol""" + +class HarnessCase(unittest.TestCase): + """This is the case class of all automation test cases. + + All test case classes MUST define properties `suite`, `case` and `golden_devices_needed` + """ + + channel = settings.THREAD_CHANNEL + """int: Thread channel. + + Thread channel ranges from 11 to 26. + """ + suite = None + """int: Suite id. + + 1 + Leader + 2 + Router + 4 + Sleepy end device + 16 + Router eligible end device + 32 + End device + + """ + + case = None + """str: Case id, e.g. '6 5 1'. + """ + + golden_devices_needed = 0 + """int: Golden devices needed to finish the test + """ + + child_timeout = settings.THREAD_CHILD_TIMEOUT + """int: Child timeout in seconds + """ + + manual_reset = False + """bool: whether reset manually""" + + def wait_until(self, what, times=-1): + """Wait until `what` return True + + Args: + what (Callable[bool]): Call `wait()` again and again until it returns True + times (int): Maximum times of trials before giving up + + Returns: + True if success, False if times threshold reached + + """ + while times: + try: + if what() is True: + return True + except: + logger.exception('Wait failed') + else: + logger.warning('Trial[%d] failed', times) + times -= 1 + time.sleep(1) + + return False + + def __init__(self, *args, **kwargs): + self.dut = None + self._browser = None + self._hc = None + self.result_dir = '%s\\%s' % (settings.OUTPUT_PATH, self.__class__.__name__) + # create directory + if self.__class__ is not HarnessCase: + os.system('mkdir %s' % self.result_dir) + + super(HarnessCase, self).__init__(*args, **kwargs) + + def _init_devices(self): + """Reboot all usb devices. + + Note: + If APC_HOST is not valid, usb devices is not rebooted. + """ + if self.manual_reset: + raw_input('Reset golden devices and press enter to continue..') + return + elif not settings.APC_HOST: + return + + tries = 3 + while True: + try: + apc = ApcPduController(settings.APC_HOST) + except EOFError: + logger.warning('Failed to connect to telnet') + tries = tries - 1 + if tries: + time.sleep(10) + continue + else: + logger.error('Fatal error: cannot connect to apc') + raise + else: + apc.reboot(settings.APC_OUTLET) + apc.close() + break + + time.sleep(20) + + def _init_harness(self): + """Restart harness backend service. + + Please start the harness controller before running the cases, otherwise, nothing happens + """ + self._hc = HarnessController(self.result_dir) + self._hc.stop() + time.sleep(1) + self._hc.start() + time.sleep(2) + + def _destroy_harness(self): + """Stop harness backend service + + Stop harness service. + """ + self._hc.stop() + time.sleep(2) + + def _init_dut(self): + """Initialize the DUT. + + DUT will be restarted. and openthread will started. + """ + dut_port = settings.DUT_DEVICE + dut = OpenThreadController(dut_port) + self.dut = dut + + if not settings.APC_HOST or self.manual_reset: + self.dut.reset() + + def _destroy_dut(self): + self.dut = None + + def _init_browser(self): + """Open harness web page. + + Open a quiet chrome which: + 1. disables extensions, + 2. ignore certificate errors and + 3. always allow notifications. + """ + chrome_options = webdriver.ChromeOptions() + chrome_options.add_argument('--disable-extensions') + chrome_options.add_argument('--ignore-certificate-errors') + chrome_options.add_experimental_option('prefs', { + 'profile.managed_default_content_settings.notifications': 1 + }) + + browser = webdriver.Chrome(chrome_options=chrome_options) + browser.set_page_load_timeout(10) + browser.implicitly_wait(1) + browser.maximize_window() + browser.get(settings.HARNESS_URL) + self._browser = browser + self.assertIn('Thread', browser.title) + + def _destroy_browser(self): + """Close the browser. + """ + self._browser.close() + self._browser = None + + def setUp(self): + """Prepare to run test case. + + Start harness service, init golden devices, reset DUT and open browser. + """ + if self.__class__ is HarnessCase: + return + + logger.info('Setting up') + # clear files + logger.info('Deleting all .pdf') + os.system('del /q "%HOMEDRIVE%%HOMEPATH%\\Downloads\\NewPdf_*.pdf"') + logger.info('Deleting all .xlsx') + os.system('del /q "%HOMEDRIVE%%HOMEPATH%\\Downloads\\ExcelReport*.xlsx"') + logger.info('Deleting all .pcapng') + os.system('del /q "%s\\Captures\\*.pcapng"' % settings.HARNESS_HOME) + + # using temp files to fix excel downloading fail + logger.info('Empty files in temps') + os.system('del /q "%s\\Thread_Harness\\temp\\*.*"' % settings.HARNESS_HOME) + + self._init_harness() + self._init_devices() + self._init_dut() + + def tearDown(self): + """Clean up after each case. + + Stop harness service, close browser and close DUT. + """ + if self.__class__ is HarnessCase: + return + + logger.info('Tearing down') + self._destroy_harness() + self._destroy_browser() + self._destroy_dut() + + def _setup_page(self): + """Do sniffer settings and general settings + """ + # Detect Sniffer + try: + dialog = self._browser.find_element_by_id('capture-Setup-modal') + except: + logger.exception('Failed to get dialog.') + else: + if dialog and dialog.get_attribute('aria-hidden') == 'false': + times = 100 # FIXME better to be a more meaningful value + while times: + status = dialog.find_element_by_class_name('status-notify').text + if 'Searching' in status: + logger.info('Still detecting..') + elif 'Not' in status: + logger.warning('Sniffer device not verified!') + button = dialog.find_element_by_id('snifferAutoDetectBtn') + button.click() + elif 'Verified' in status: + logger.info('Verified!') + button = dialog.find_element_by_id('saveCaptureSettings') + button.click() + break + else: + logger.warning('Unexpected sniffer verification status') + + times = times - 1 + time.sleep(1) + + if not times: + raise Exception('Unable to detect sniffer device') + + time.sleep(1) + + try: + next_button = self._browser.find_element_by_id('nextButton') + except: + logger.exception('Failed to finish setup') + return + + if not next_button.is_enabled(): + logger.info('Harness is still not ready') + return + + # General Setup + try: + button = self._browser.find_element_by_id('general-Setup') + button.click() + time.sleep(2) + + dialog = self._browser.find_element_by_id('general-Setup-modal') + if dialog.get_attribute('aria-hidden') != 'false': + raise Exception('Missing General Setup dialog') + + field = dialog.find_element_by_id('inp_general_child_update_wait_time') + field.clear() + field.send_keys(str(self.child_timeout)) + + field = dialog.find_element_by_id('inp_general_sed_polling_rate') + field.clear() + field.send_keys(str(settings.THREAD_SED_POLLING_INTERVAL)) + + button = dialog.find_element_by_id('saveGeneralSettings') + button.click() + time.sleep(1) + + except: + logger.exception('Failed to do general setup') + return + + # Finish this page + next_button.click() + time.sleep(1) + + def _connect_devices(self): + connect_all = self._browser.find_element_by_link_text('Connect All') + connect_all.click() + + def _test_bed(self): + """Set up the test bed. + + Connect number of golden devices required by each case. + """ + browser = self._browser + test_bed = browser.find_element_by_id('test-bed') + time.sleep(3) + history = HistoryHelper() + selected_hw_set = test_bed.find_elements_by_class_name('selected-hw') + selected_hw_num = len(selected_hw_set) + + while selected_hw_num: + remove_button = selected_hw_set[selected_hw_num - 1].find_element_by_class_name( + 'removeSelectedDevice') + remove_button.click() + selected_hw_num = selected_hw_num - 1 + + devices = filter(lambda port: not history.is_bad_golden_device(port), + settings.GOLDEN_DEVICES) + logger.info('Available golden devices: %s', json.dumps(devices, indent=2)) + if len(devices) < self.golden_devices_required: + raise Exception('Golden devices is not enough') + golden_devices_required = self.golden_devices_required + while golden_devices_required: + golden_device = browser.find_element_by_id(settings.GOLDEN_DEVICE_TYPE) + # drag + action_chains = ActionChains(browser) + action_chains.click_and_hold(golden_device) + action_chains.move_to_element(test_bed).perform() + time.sleep(1) + + # drop + drop_hw = browser.find_element_by_class_name('drop-hw') + action_chains = ActionChains(browser) + action_chains.move_to_element(drop_hw) + action_chains.release(drop_hw).perform() + + time.sleep(0.5) + golden_devices_required = golden_devices_required - 1 + + selected_hw_set = test_bed.find_elements_by_class_name('selected-hw') + for selected_hw in selected_hw_set: + form_inputs = selected_hw.find_elements_by_tag_name('input') + form_port = form_inputs[0] + form_port.clear() + device = devices.pop() + form_port.send_keys(device) + + while True: + try: + self._connect_devices() + elem = browser.find_element_by_id('nextBtn') + if not self.wait_until(lambda: 'disabled' not in elem.get_attribute('class'), + times=60): + for selected_hw in selected_hw_set: + form_inputs = selected_hw.find_elements_by_tag_name('input') + form_port = form_inputs[0] + if form_port.is_enabled(): + port = form_port.get_attribute('value').encode('utf8') + history.mark_bad_golden_device(port) + if devices: + device = devices.pop() + form_port.clear() + form_port.send_keys(device) + else: + devices = None + + if devices is None: + logger.warning('Golden devices not enough') + raise SystemExit() + else: + logger.info('Try again with new golden devices') + continue + + elem.click() + except SystemExit: + raise + except: + logger.exception('Unexpected error') + else: + break + + def _select_case(self, suite, case): + """Select the test case. + """ + # select the case + elem = Select(self._browser.find_element_by_id('select-dut')) + elem.select_by_value(str(suite)) + time.sleep(1) + + checkbox = None + elems = self._browser.find_elements_by_css_selector('.tree-node .tree-title') + for elem in elems: + action_chains = ActionChains(self._browser) + action_chains.move_to_element(elem) + action_chains.perform() + logger.debug(elem.text) + if elem.text.startswith(case): + parent = elem.find_element_by_xpath('..') + checkbox = parent.find_element_by_class_name('tree-checkbox') + break + + if not checkbox: + time.sleep(5) + raise Exception('Failed to find the case') + + checkbox.click() + time.sleep(1) + + elem = self._browser.find_element_by_id('runTest') + elem.click() + if not self.wait_until(lambda: self._browser.find_element_by_id('stopTest') and True, 10): + raise Exception('Failed to start test case') + + def _collect_result(self): + """Collect test result. + + Generate PDF, excel and pcap file + """ + # generate pdf + self._browser.find_element_by_class_name('save-pdf').click() + time.sleep(1) + try: + dialog = self._browser.find_element_by_id('Testinfo') + except: + logger.exception('Failed to get test info dialog.') + else: + if dialog.get_attribute('aria-hidden') != 'false': + raise Exception('Test information dialog not ready') + + dialog.find_element_by_id('inp_dut_manufacturer').send_keys(settings.DUT_MANUFACTURER) + dialog.find_element_by_id('inp_dut_firmware_version').send_keys(self.dut.version) + dialog.find_element_by_id('inp_tester_name').send_keys(settings.TESTER_NAME) + dialog.find_element_by_id('inp_remarks').send_keys(settings.TESTER_REMARKS) + dialog.find_element_by_id('generatePdf').click() + + time.sleep(1) + main_window = self._browser.current_window_handle + + # generate excel + self._browser.find_element_by_class_name('save-excel').click() + time.sleep(1) + for wh in self._browser.window_handles: + if wh != main_window: + self._browser.switch_to.window(wh) + self._browser.close() + self._browser.switch_to.window(main_window) + + # save pcap + self._browser.find_element_by_class_name('save-wireshark').click() + time.sleep(1) + for wh in self._browser.window_handles: + if wh != main_window: + self._browser.switch_to.window(wh) + self._browser.close() + self._browser.switch_to.window(main_window) + + timestamp = time.strftime('%Y%m%d%H%M%S') + os.system('move "%%HOMEPATH%%\\Downloads\\NewPdf_*.pdf" %s\\%s-%s.pdf' + % (self.result_dir, self.__class__.__name__, timestamp)) + os.system('move "%%HOMEPATH%%\\Downloads\\ExcelReport*.xlsx" %s\\%s-%s.xlsx' + % (self.result_dir, self.__class__.__name__, timestamp)) + os.system('move "%s\\Captures\\*.pcapng" %s\\%s-%s.pcapng' + % (settings.HARNESS_HOME, self.result_dir, self.__class__.__name__, timestamp)) + os.system('copy "%s\\Thread_Harness\\temp\\*.*" "%s"' + % (settings.HARNESS_HOME, self.result_dir)) + + def _wait_dialog(self): + """Wait for dialogs and handle them until done. + """ + logger.debug('waiting for dialog') + done = False + error = False + while not done: + try: + dialog = self._browser.find_element_by_id('RemoteConfirm') + except: + logger.exception('Failed to get dialog.') + else: + if dialog and dialog.get_attribute('aria-hidden') == 'false': + title = dialog.find_element_by_class_name('modal-title').text + time.sleep(1) + logger.info('Handling dialog[%s]', title) + + try: + done = self._handle_dialog(dialog, title) + except: + logger.exception('Error handling dialog: %s' % title) + error = True + + if done is None: + raise Exception('Unexpected dialog occurred') + + dialog.find_element_by_id('ConfirmOk').click() + + time.sleep(1) + + try: + stop_button = self._browser.find_element_by_id('stopTest') + if done: + stop_button.click() + # wait for stop procedure end + time.sleep(10) + except: + logger.exception('Test stopped') + time.sleep(5) + done = True + + time.sleep(5) + + if error: + raise Exception('Fail for previous exceptions') + + def _handle_dialog(self, dialog, title): + """Handle a dialog. + + Returns: + bool True if no more dialogs expected, + False if more dialogs needed, and + None if not handled + """ + done = self.on_dialog(dialog, title) + if isinstance(done, bool): + return done + + if title.startswith('Start DUT'): + body = dialog.find_element_by_id('cnfrmMsg').text + if 'Sleepy End Device' in body: + self.dut.mode = 's' + self.dut.child_timeout = self.child_timeout + elif 'End Device' in body: + self.dut.mode = 'rsn' + self.dut.child_timeout = self.child_timeout + else: + self.dut.mode = 'rsdn' + + if 'at channel' in body: + self.channel = int(body.split(':')[1]) + + self.dut.channel = self.channel + self.dut.panid = settings.THREAD_PANID + self.dut.networkname = settings.THREAD_NETWORKNAME + self.dut.extpanid = settings.THREAD_EXTPANID + self.dut.start() + + elif (title.startswith('MAC Address Required') + or title.startswith('DUT Random Extended MAC Address Required')): + mac = self.dut.mac + inp = dialog.find_element_by_id('cnfrmInpText') + inp.clear() + inp.send_keys('0x%s' % mac) + + elif title.startswith('LL64 Address'): + ll64 = None + for addr in self.dut.addrs: + addr = addr.lower() + if addr.startswith('fe80') and not re.match('.+ff:fe00:[0-9a-f]{0,4}$', addr): + ll64 = addr + break + + if not ll64: + raise Exception('No link local address found') + + logger.info('Link local address is %s', ll64) + inp = dialog.find_element_by_id('cnfrmInpText') + inp.clear() + inp.send_keys(ll64) + + elif title.startswith('Enter Channel'): + self.dut.channel = self.channel + inp = dialog.find_element_by_id('cnfrmInpText') + inp.clear() + inp.send_keys(str(self.dut.channel)) + + elif title.startswith('User Action Needed'): + body = dialog.find_element_by_id('cnfrmMsg').text + if body.startswith('Power Down the DUT'): + self.dut.stop() + return True + + elif title.startswith('Short Address'): + short_addr = '0x%s' % self.dut.short_addr + inp = dialog.find_element_by_id('cnfrmInpText') + inp.clear() + inp.send_keys(short_addr) + + elif title.startswith('ML64 Address'): + ml64 = None + for addr in self.dut.addrs: + if addr.startswith('fd') and not re.match('.+ff:fe00:[0-9a-f]{0,4}$', addr): + ml64 = addr + break + + if not ml64: + raise Exception('No mesh local address found') + + logger.info('Mesh local address is %s', ml64) + inp = dialog.find_element_by_id('cnfrmInpText') + inp.clear() + inp.send_keys(ml64) + + elif title.startswith('Sheild DUT'): + # FIXME should find better way to simulate + self.dut.channel = (self.channel == THREAD_CHANNEL_MAX + and THREAD_CHANNEL_MIN) or (self.channel + 1) + + elif title.startswith('Bring DUT Back to network'): + self.dut.channel = self.channel + + elif title.startswith('Configure Prefix on DUT'): + body = dialog.find_element_by_id('cnfrmMsg').text + body = body.split(': ')[1] + params = reduce(lambda params, param: params.update(((param[0].strip(' '), param[1]),)) or params, + map(lambda it: it.split('='), body.split(', ')), {}) + prefix = params['P_Prefix'].strip('\0\r\n\t ') + flags = [] + if params.get('P_slaac_preferred', 0) == '1': + flags.append('p') + flags.append('ao') + if params.get('P_stable', 0) == '1': + flags.append('s') + if params.get('P_default', 0) == '1': + flags.append('r') + prf = 'high' + self.dut.add_prefix(prefix, ''.join(flags), prf) + + return False + + def test(self): + """This method will only start test case in child class""" + if self.__class__ is HarnessCase: + logger.warning('Skip this harness itself') + return + + logger.info('Testing suite[%d] case[%s]', self.suite, self.case) + try: + self._init_browser() + # prepare test case + while True: + url = self._browser.current_url + if url.endswith('SetupPage.html'): + self._setup_page() + elif url.endswith('TestBed.html'): + self._test_bed() + elif url.endswith('TestExecution.html'): + logger.info('Ready to handle dialogs') + break + time.sleep(2) + except UnexpectedAlertPresentException: + logger.exception('Failed to connect to harness server') + raise SystemExit() + + self._select_case(self.suite, self.case) + + self._wait_dialog() + + try: + self._collect_result() + except: + logger.exception('Failed to collect results') + raise + + # get case result + status = self._browser.find_element_by_class_name('title-test').text + logger.info(status) + success = 'Fail' not in status + self.assertTrue(success) diff --git a/tools/harness-automation/autothreadharness/harness_controller.py b/tools/harness-automation/autothreadharness/harness_controller.py new file mode 100644 index 000000000..055b320f3 --- /dev/null +++ b/tools/harness-automation/autothreadharness/harness_controller.py @@ -0,0 +1,107 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import logging +import os +import subprocess +import time + +from autothreadharness import settings + +logger = logging.getLogger(__name__) + +class HarnessController(object): + """Harness service control + + This controls harness service, including the harness back-end and front-end. + """ + harness = None + """harness back-end""" + + miniweb = None + """harness front-end""" + + def __init__(self, result_dir=None): + self.result_dir = result_dir + + def start(self): + logger.info('Starting harness service') + if self.harness: + logger.warning('Harness already started') + else: + env = dict(os.environ, PYTHONPATH='%s\\Thread_Harness;%s\\ThirdParty\\hsdk-python\\src' + % (settings.HARNESS_HOME, settings.HARNESS_HOME)) + with open('%s\\harness-%s.log' % (self.result_dir, time.strftime('%Y%m%d%H%M%S')), 'w') as fout: + self.harness = subprocess.Popen([settings.HARNESS_HOME + '\\Python27\\python.exe', + settings.HARNESS_HOME + '\\Thread_Harness\\Run.py'], + cwd=settings.HARNESS_HOME, + stdout=fout, + stderr=fout, + env=env) + + if self.miniweb: + logger.warning('Miniweb already started') + else: + self.miniweb = subprocess.Popen([settings.HARNESS_HOME + '\\miniweb\\miniweb.exe'], + cwd=settings.HARNESS_HOME + '\\miniweb') + + def stop(self): + logger.info('Stopping harness service') + + if self.harness: + self._try_kill(self.harness) + self.harness = None + else: + logger.warning('Harness not started yet') + + if self.miniweb: + self._try_kill(self.miniweb) + self.miniweb = None + else: + logger.warning('Miniweb not started yet') + + def _try_kill(self, proc): + logger.info('Try kill process') + times = 3 + proc.kill() + while proc.poll() is None: + logger.info('Trial %d failed', times) + if times == 0: + raise SystemExit() + else: + times = times - 1 + time.sleep(5) + proc.kill() + + def __del__(self): + self.stop() + +if __name__ == '__main__': + hc = HarnessController() diff --git a/tools/harness-automation/autothreadharness/helpers.py b/tools/harness-automation/autothreadharness/helpers.py new file mode 100644 index 000000000..181dbb316 --- /dev/null +++ b/tools/harness-automation/autothreadharness/helpers.py @@ -0,0 +1,58 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import json +import logging + + +class HistoryHelper(object): + logger = logging.getLogger(__name__) + + def __init__(self, filename='./history.json'): + self.filename = filename + try: + self.data = json.load(open(filename, 'r')) + except Exception: + self.logger.exception('file may not exists') + self.data = { + 'golden_device_black_list': [] + } + self.save() + + def save(self): + json.dump(self.data, open(self.filename, 'w'), indent=2) + + def mark_bad_golden_device(self, port): + self.logger.warning('mark serial port[%s] as bad', port) + self.data['golden_device_black_list'].append(port) + self.save() + + def is_bad_golden_device(self, port): + return port in self.data['golden_device_black_list'] diff --git a/tools/harness-automation/autothreadharness/open_thread_controller.py b/tools/harness-automation/autothreadharness/open_thread_controller.py new file mode 100644 index 000000000..85966d246 --- /dev/null +++ b/tools/harness-automation/autothreadharness/open_thread_controller.py @@ -0,0 +1,220 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import logging +import time + +import serial + +from pexpect_serial import SerialSpawn + +__all__ = ['OpenThreadController'] +logger = logging.getLogger(__name__) + +class OpenThreadController(object): + """This is an simple wrapper to communicate with openthread""" + def __init__(self, port): + """Initialize the controller + + Args: + port (str): serial port's path or name(windows) + """ + self.port = port + self.ss = None + self._init() + + def _init(self): + ser = serial.Serial(self.port, 115200, timeout=2) + self.ss = SerialSpawn(ser, timeout=2) + + def __del__(self): + if self.ss: + self.ss.close() + + def is_started(self): + """check if openthread is started + + Returns: + bool: started or not + """ + state = self._req('state')[0] + return state != 'disabled' + + def start(self): + """Start openthread + """ + self._req('ifconfig up') + self._req('thread start') + + def stop(self): + """Stop openthread + """ + self._req('thread stop') + self._req('ifconfig down') + + def reset(self): + """Reset openthread device, not equivalent to stop and start + """ + self.ss.sendline('reset') + time.sleep(1) + self.ss.close() + time.sleep(1) + self._init() + + def _req(self, req): + """Send command and wait for response. + + The command will be repeated 3 times at most in case data loss of serial port. + + Args: + req (str): Command to send, please do not include new line in the end. + + Returns: + [str]: The output lines + """ + logger.info('DUT> %s', req) + times = 3 + + while times: + times = times - 1 + try: + self.ss.sendline(req) + self.ss.expect(req + self.ss.linesep) + except: + logger.exception('Failed to send command') + else: + break + + line = None + res = [] + + while True: + line = self.ss.readline().strip('\0\r\n\t ') + logger.debug(line) + + if line: + if line == 'Done': + break + res.append(line) + + return res + + @property + def networkname(self): + """str: Thread network name.""" + return self._req('networkname')[0] + + @networkname.setter + def networkname(self, value): + self._req('networkname %s' % value) + + @property + def mode(self): + """str: Thread mode.""" + return self._req('mode')[0] + + @mode.setter + def mode(self, value): + self._req('mode %s' % value) + + @property + def mac(self): + """str: MAC address of the device""" + return self._req('extaddr')[0] + + @property + def addrs(self): + """[str]: IP addresses of the devices""" + return self._req('ipaddr') + + @property + def short_addr(self): + """str: Short address""" + return self._req('rloc16')[0] + + @property + def channel(self): + """int: Channel number of openthread""" + return int(self._req('channel')[0]) + + @channel.setter + def channel(self, value): + self._req('channel %d' % value) + + @property + def panid(self): + """str: Thread panid""" + return self._req('panid')[0] + + @panid.setter + def panid(self, value): + self._req('panid %s' % value) + + @property + def extpanid(self): + """str: Thread extpanid""" + return self._req('extpanid')[0] + + @extpanid.setter + def extpanid(self, value): + self._req('extpanid %s' % value) + + @property + def child_timeout(self): + """str: Thread child timeout in seconds""" + return self._req('childtimeout')[0] + + @child_timeout.setter + def child_timeout(self, value): + self._req('childtimeout %d' % value) + + @property + def version(self): + """str: Open thread version""" + return self._req('version')[0] + + def add_prefix(self, prefix, flags, prf): + """Add network prefix. + + Args: + prefix (str): network prefix. + flags (str): network prefix flags, please refer thread documentation for details + prf (str): network prf, please refer thread documentation for details + """ + self._req('prefix add %s %s %s' % (prefix, flags, prf)) + time.sleep(1) + self._req('netdataregister') + + def remove_prefix(self, prefix): + """Remove network prefix. + """ + self._req('prefix remove %s' % prefix) + time.sleep(1) + self._req('netdataregister') diff --git a/tools/harness-automation/autothreadharness/runner.py b/tools/harness-automation/autothreadharness/runner.py new file mode 100644 index 000000000..40f8f7e4a --- /dev/null +++ b/tools/harness-automation/autothreadharness/runner.py @@ -0,0 +1,277 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import argparse +import logging +import json +import os +import sys +import time +import unittest +from collections import OrderedDict + +from autothreadharness.harness_case import HarnessCase +from autothreadharness.open_thread_controller import OpenThreadController +from autothreadharness import settings + +logging.basicConfig(level=logging.INFO) + +logger = logging.getLogger() +'''Logger: The global logger''' + +logger.setLevel(logging.INFO) + +RESUME_SCRIPT_PATH = '%appdata%\\Microsoft\\Windows\\Start Menu\\Programs\\' \ + 'Startup\\continue_harness.bat' + +class SimpleTestResult(unittest.TestResult): + def __init__(self, path, auto_reboot_args=None, manual_reset=False): + '''Record test results in json file + + Args: + path (str): File path to record the results + auto_reboot (bool): Whether reboot when harness die + ''' + super(SimpleTestResult, self).__init__() + self.path = path + self.manual_reset = manual_reset + self.auto_reboot_args = auto_reboot_args + self.result = json.load(open(self.path, 'r')) + self.log_handler = None + self.started = None + logger.info('Initial state is %s', json.dumps(self.result, indent=2)) + + def startTest(self, test): + logger.info('\n========================================\n%s\n========================================', test.__class__.__name__) + + # create start up script if auto reboot enabled + if self.auto_reboot_args: + test.auto_reboot = True + os.system('echo %s > "%s"' + % (' '.join(self.auto_reboot_args + ['-c', test.__class__.__name__]), + RESUME_SCRIPT_PATH)) + + # record start timestamp + self.started = time.strftime('%Y-%m-%dT%H:%M:%S') + + # manual reset + test.manual_reset = self.manual_reset + self.log_handler = logging.FileHandler('%s\\auto-%s.log' % (test.result_dir, time.strftime('%Y%m%d%H%M%S'))) + self.log_handler.setLevel(logging.DEBUG) + self.log_handler.setFormatter(logging.Formatter('%(asctime)s %(levelname)s %(message)s')) + logger.addHandler(self.log_handler) + + def add_result(self, test, passed, error=None): + '''Record test result into json file + + Args: + test (TestCase): The test just run + passed (bool): Whether the case is passed + ''' + self.result[unicode(test.__class__.__name__)] = { + 'started': self.started, + 'stopped': time.strftime('%Y-%m-%dT%H:%M:%S'), + 'passed': passed, + 'error': error + } + if self.auto_reboot_args: + os.system('del "%s"' % RESUME_SCRIPT_PATH) + + json.dump(OrderedDict(sorted(self.result.items(), key=lambda t: t[0])), + open(self.path, 'w'), indent=2) + + # save logs + logger.removeHandler(self.log_handler) + self.log_handler.close() + self.log_handler = None + time.sleep(2) + + def addSuccess(self, test): + logger.info('case[%s] pass', test.__class__.__name__) + super(SimpleTestResult, self).addSuccess(test) + self.add_result(test, True) + + def addFailure(self, test, err): + logger.warning('case[%s] fail', test.__class__.__name__) + super(SimpleTestResult, self).addFailure(test, err) + self.add_result(test, False) + + def addError(self, test, err): + logger.error('case[%s] error', test.__class__.__name__, exc_info=err) + + if err and err[0] is SystemExit: + if self.auto_reboot_args: + logger.warning('rebooting..') + os.system('shutdown /r /t 1') + else: + logger.warning('exiting..') + sys.exit(1) + + super(SimpleTestResult, self).addError(test, err) + self.add_result(test, None, str(err[1])) + +def discover(names=None, pattern='*.py', skip='efp', dry_run=False, + manual_reset=False, delete_blacklist=False, list_devices=False, + continue_from=None, result_file='./result.json', auto_reboot=False): + '''Discover all test cases and skip those passed + + Args: + pattern (str): Pattern to match case modules, refer python's unittest + documentation for more details + skip (str): types cases to skip + ''' + + if list_devices: + for port in names or settings.GOLDEN_DEVICES: + print('%s: %s' % (port, OpenThreadController(port).version)) + return + + log = None + if os.path.isfile(result_file): + try: + log = json.load(open(result_file, 'r')) + except: + pass + + if not log: + log = {} + json.dump(log, open(result_file, 'w'), indent=2) + + suite = unittest.TestSuite() + discovered = unittest.defaultTestLoader.discover('cases', pattern) + + for s1 in discovered: + for s2 in s1: + for case in s2: + if case.__class__ is HarnessCase: + continue + case_name = unicode(case.__class__.__name__) + + # whitelist + if len(names): + if case_name in names: + suite.addTest(case) + logger.info('case[%s] added', case_name) + + # skip cases + else: + if case_name in log.keys(): + if (log[case_name]['passed'] and ('p' in skip)) \ + or (log[case_name]['passed'] is False and ('f' in skip)) \ + or (log[case_name]['passed'] is None and ('e' in skip)): + logger.warning('case[%s] skipped', case_name) + continue + + # continue from + if continue_from: + if continue_from != case_name: + logger.warning('case[%s] skipped', case_name) + continue + else: + continue_from = None + + suite.addTest(case) + logger.info('case[%s] added', case_name) + + if auto_reboot: + argv = [] + argv.append('"%s"' % os.sep.join([os.getcwd(), 'start.bat'])) + argv.extend(['-p', pattern]) + argv.extend(['-k', skip]) + argv.extend(['-o', result_file]) + argv.append('-a') + + if manual_reset: + argv.append('-m') + + if delete_blacklist: + argv.append('-d') + + auto_reboot_args = argv + names + else: + auto_reboot_args = None + os.system('del "%s"' % RESUME_SCRIPT_PATH) + + result = SimpleTestResult(result_file, auto_reboot_args, manual_reset) + for case in suite: + logger.info(case.__class__.__name__) + + if dry_run: + return + + os.system('del history.json') + suite.run(result) + +def main(): + parser = argparse.ArgumentParser(description='Thread harness test case runner') + parser.add_argument('names', metavar='NAME', type=str, nargs='*', default=None, + help='test case name, omit to test all') + parser.add_argument('--pattern', '-p', metavar='PATTERN', type=str, + help='file name pattern, default to "*.py"', default='*.py') + parser.add_argument('--delete-blacklist', '-d', action='store_true', default=False, + help='clear blacklist on startup') + parser.add_argument('--skip', '-k', metavar='SKIP', type=str, + help='type of results to skip.' \ + 'e for error, f for fail, p for pass. default to "efp"', + default='efp') + parser.add_argument('--dry-run', '-n', action='store_true', default=False, + help='just show what to run') + parser.add_argument('--result-file', '-o', type=str, default=settings.OUTPUT_PATH + '\\result.json', + help='file to store and read current status') + parser.add_argument('--list-file', '-i', type=str, default=None, + help='file to list cases names to test') + parser.add_argument('--continue-from', '-c', type=str, default=None, + help='first case to test') + parser.add_argument('--auto-reboot', '-a', action='store_true', default=False, + help='restart system when harness service die') + parser.add_argument('--manual-reset', '-m', action='store_true', default=False, + help='reset devices manually') + parser.add_argument('--list-devices', '-l', action='store_true', default=False, + help='list devices') + + args = vars(parser.parse_args()) + + if args['list_file']: + try: + names = filter(lambda line: not line.startswith('#'), + map(lambda line: line.strip('\n'), + open(args['list_file'], 'r').readlines())) + except: + logger.exception('Failed to open test case list file') + raise + else: + args['names'] = args['names'] + names + + + args.pop('list_file') + discover(**args) + +if __name__ == '__main__': + main() diff --git a/tools/harness-automation/autothreadharness/settings_sample.py b/tools/harness-automation/autothreadharness/settings_sample.py new file mode 100644 index 000000000..49b1adfe4 --- /dev/null +++ b/tools/harness-automation/autothreadharness/settings_sample.py @@ -0,0 +1,86 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +DUT_DEVICE = 'COM16' +"""str: Serial port of the DUT""" + +DUT_MANUFACTURER = 'Open Thread' +"""str: Manufacturer of the DUT""" + +THREAD_CHANNEL = 18 +"""int: Thread channel""" + +THREAD_PANID = '0xface' +"""str: Thread PAN ID""" + +THREAD_NETWORKNAME = 'GRL' +"""str: Thread network name""" + +THREAD_EXTPANID = '000db80000000000' +"""str: Thread extended PAN ID""" + +THREAD_CHILD_TIMEOUT = 100 +"""int: Child timeout in seconds""" + +THREAD_SED_POLLING_INTERVAL = 100 +"""int: SED polling interval in seconds""" + +HARNESS_HOME = 'C:\\GRL\\Thread1.1' +"""str: Harness installation path""" + +HARNESS_URL = 'http://127.0.0.1:8000' +"""str: Harness front-end url""" + +APC_HOST = None +"""str: PDU controller host. + +Keep this None if no APC PDU available. +""" + +APC_OUTLET = 1 +"""int: PDU outlet""" + +TESTER_NAME = 'Thread Open' +"""str: Who are you""" + +TESTER_REMARKS = 'OpenThread is great' +"""str: Any comments in the final PDF""" + +GOLDEN_DEVICE_TYPE = 'ARM' +"""str: Golden device type""" + +GOLDEN_DEVICES = [] +"""[str]: Golden devices list. + +It should be something like ['COM1', 'COM2'] on Windows +""" + +OUTPUT_PATH = '.\\output' +"""str: Path to store results and logs""" diff --git a/tools/harness-automation/cases/__init__.py b/tools/harness-automation/cases/__init__.py new file mode 100644 index 000000000..fdd8913b4 --- /dev/null +++ b/tools/harness-automation/cases/__init__.py @@ -0,0 +1,30 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + diff --git a/tools/harness-automation/cases/ed_6_1_1.py b/tools/harness-automation/cases/ed_6_1_1.py new file mode 100644 index 000000000..98409555a --- /dev/null +++ b/tools/harness-automation/cases/ed_6_1_1.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class ED_6_1_1(HarnessCase): + suite = 32 + case = '6 1 1' + golden_devices_required = 1 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/ed_6_1_2.py b/tools/harness-automation/cases/ed_6_1_2.py new file mode 100644 index 000000000..469795e18 --- /dev/null +++ b/tools/harness-automation/cases/ed_6_1_2.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class ED_6_1_2(HarnessCase): + suite = 32 + case = '6 1 2' + golden_devices_required = 2 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/ed_6_1_3.py b/tools/harness-automation/cases/ed_6_1_3.py new file mode 100644 index 000000000..c089ba72d --- /dev/null +++ b/tools/harness-automation/cases/ed_6_1_3.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class ED_6_1_3(HarnessCase): + suite = 32 + case = '6 1 3' + golden_devices_required = 4 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/ed_6_1_4.py b/tools/harness-automation/cases/ed_6_1_4.py new file mode 100644 index 000000000..3f7289582 --- /dev/null +++ b/tools/harness-automation/cases/ed_6_1_4.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class ED_6_1_4(HarnessCase): + suite = 32 + case = '6 1 4' + golden_devices_required = 4 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/ed_6_1_5.py b/tools/harness-automation/cases/ed_6_1_5.py new file mode 100644 index 000000000..883a8c375 --- /dev/null +++ b/tools/harness-automation/cases/ed_6_1_5.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class ED_6_1_5(HarnessCase): + suite = 32 + case = '6 1 5' + golden_devices_required = 3 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/ed_6_1_6.py b/tools/harness-automation/cases/ed_6_1_6.py new file mode 100644 index 000000000..94deaba9b --- /dev/null +++ b/tools/harness-automation/cases/ed_6_1_6.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class ED_6_1_6(HarnessCase): + suite = 32 + case = '6 1 6' + golden_devices_required = 3 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/ed_6_1_7.py b/tools/harness-automation/cases/ed_6_1_7.py new file mode 100644 index 000000000..32aebaac5 --- /dev/null +++ b/tools/harness-automation/cases/ed_6_1_7.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class ED_6_1_7(HarnessCase): + suite = 32 + case = '6 1 7' + golden_devices_required = 4 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/ed_6_2_1.py b/tools/harness-automation/cases/ed_6_2_1.py new file mode 100644 index 000000000..222fbe34a --- /dev/null +++ b/tools/harness-automation/cases/ed_6_2_1.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class ED_6_2_1(HarnessCase): + suite = 32 + case = '6 2 1' + golden_devices_required = 2 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/ed_6_2_2.py b/tools/harness-automation/cases/ed_6_2_2.py new file mode 100644 index 000000000..907611d5b --- /dev/null +++ b/tools/harness-automation/cases/ed_6_2_2.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class ED_6_2_2(HarnessCase): + suite = 32 + case = '6 2 2' + golden_devices_required = 3 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/ed_6_3_1.py b/tools/harness-automation/cases/ed_6_3_1.py new file mode 100644 index 000000000..9a3da6e83 --- /dev/null +++ b/tools/harness-automation/cases/ed_6_3_1.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class ED_6_3_1(HarnessCase): + suite = 32 + case = '6 3 1' + golden_devices_required = 2 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/ed_6_3_2.py b/tools/harness-automation/cases/ed_6_3_2.py new file mode 100644 index 000000000..68879a2cd --- /dev/null +++ b/tools/harness-automation/cases/ed_6_3_2.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class ED_6_3_2(HarnessCase): + suite = 32 + case = '6 3 2' + golden_devices_required = 1 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/ed_6_4_1.py b/tools/harness-automation/cases/ed_6_4_1.py new file mode 100644 index 000000000..f18d6345f --- /dev/null +++ b/tools/harness-automation/cases/ed_6_4_1.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class ED_6_4_1(HarnessCase): + suite = 32 + case = '6 4 1' + golden_devices_required = 1 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/ed_6_4_2.py b/tools/harness-automation/cases/ed_6_4_2.py new file mode 100644 index 000000000..a9895a64b --- /dev/null +++ b/tools/harness-automation/cases/ed_6_4_2.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class ED_6_4_2(HarnessCase): + suite = 32 + case = '6 4 2' + golden_devices_required = 2 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/ed_6_5_1.py b/tools/harness-automation/cases/ed_6_5_1.py new file mode 100644 index 000000000..95ea99d7f --- /dev/null +++ b/tools/harness-automation/cases/ed_6_5_1.py @@ -0,0 +1,48 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest +import time + +from autothreadharness.harness_case import HarnessCase + +class ED_6_5_1(HarnessCase): + suite = 32 + case = '6 5 1' + golden_devices_required = 1 + def on_dialog(self, dialog, title): + if title.startswith('Reset DUT'): + self.dut.stop() + time.sleep(self.child_timeout + 10) + self.dut.start() + return False + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/ed_6_5_2.py b/tools/harness-automation/cases/ed_6_5_2.py new file mode 100644 index 000000000..1f4c4ddf6 --- /dev/null +++ b/tools/harness-automation/cases/ed_6_5_2.py @@ -0,0 +1,52 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import time +import unittest +import re + +from autothreadharness.harness_case import HarnessCase + +class ED_6_5_2(HarnessCase): + suite = 32 + case = '6 5 2' + golden_devices_required = 2 + def on_dialog(self, dialog, title): + if title.startswith('Reset DUT'): + self.dut.stop() + return False + + elif title.startswith('Rejoin Now'): + self.dut.start() + return False + + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/ed_6_5_3.py b/tools/harness-automation/cases/ed_6_5_3.py new file mode 100644 index 000000000..ed160a2ec --- /dev/null +++ b/tools/harness-automation/cases/ed_6_5_3.py @@ -0,0 +1,50 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import time +import unittest + +from autothreadharness.harness_case import HarnessCase + +class ED_6_5_3(HarnessCase): + suite = 32 + case = '6 5 3' + golden_devices_required = 2 + def on_dialog(self, dialog, title): + if title.startswith('Reset DUT'): + self.dut.stop() + return False + + elif title.startswith('Rejoin Now'): + self.dut.start() + return False + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/ed_6_6_1.py b/tools/harness-automation/cases/ed_6_6_1.py new file mode 100644 index 000000000..773626021 --- /dev/null +++ b/tools/harness-automation/cases/ed_6_6_1.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class ED_6_6_1(HarnessCase): + suite = 32 + case = '6 6 1' + golden_devices_required = 1 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/ed_6_6_2.py b/tools/harness-automation/cases/ed_6_6_2.py new file mode 100644 index 000000000..9a34a5f71 --- /dev/null +++ b/tools/harness-automation/cases/ed_6_6_2.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class ED_6_6_2(HarnessCase): + suite = 32 + case = '6 6 2' + golden_devices_required = 1 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/leader_5_1_1.py b/tools/harness-automation/cases/leader_5_1_1.py new file mode 100644 index 000000000..6bbf6a0ed --- /dev/null +++ b/tools/harness-automation/cases/leader_5_1_1.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class Leader_5_1_1(HarnessCase): + suite = 1 + case = '5 1 1' + golden_devices_required = 1 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/leader_5_1_13.py b/tools/harness-automation/cases/leader_5_1_13.py new file mode 100644 index 000000000..1ba1a30fe --- /dev/null +++ b/tools/harness-automation/cases/leader_5_1_13.py @@ -0,0 +1,48 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +from autothreadharness.harness_case import HarnessCase +import unittest + +class Leader_5_1_13(HarnessCase): + suite = 1 + case = '5 1 13' + golden_devices_required = 1 + def on_dialog(self, dialog, title): + if title.startswith('User Input Required'): + #body = dialog.find_element_by_id('cnfrmMsg').text + #if body.startswith('Reset Leader'): + self.dut.stop() + time.sleep(1) + self.dut.start() + return False + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/leader_5_1_5.py b/tools/harness-automation/cases/leader_5_1_5.py new file mode 100644 index 000000000..4f3fee8e3 --- /dev/null +++ b/tools/harness-automation/cases/leader_5_1_5.py @@ -0,0 +1,42 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +from autothreadharness.harness_case import HarnessCase +import unittest + +class Leader_5_1_5(HarnessCase): + suite = 1 + case = '5 1 5' + golden_devices_required = 1 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/leader_5_2_2.py b/tools/harness-automation/cases/leader_5_2_2.py new file mode 100644 index 000000000..1ceb89a80 --- /dev/null +++ b/tools/harness-automation/cases/leader_5_2_2.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class Leader_5_2_2(HarnessCase): + suite = 1 + case = '5 2 2' + golden_devices_required = 32 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/leader_5_2_3.py b/tools/harness-automation/cases/leader_5_2_3.py new file mode 100644 index 000000000..d9bf70cb3 --- /dev/null +++ b/tools/harness-automation/cases/leader_5_2_3.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class Leader_5_2_3(HarnessCase): + suite = 1 + case = '5 2 3' + golden_devices_required = 32 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/leader_5_3_6.py b/tools/harness-automation/cases/leader_5_3_6.py new file mode 100644 index 000000000..6f501e643 --- /dev/null +++ b/tools/harness-automation/cases/leader_5_3_6.py @@ -0,0 +1,42 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +from autothreadharness.harness_case import HarnessCase +import unittest + +class Leader_5_3_6(HarnessCase): + suite = 1 + case = '5 3 6' + golden_devices_required = 2 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/leader_5_3_7.py b/tools/harness-automation/cases/leader_5_3_7.py new file mode 100644 index 000000000..ccaf82073 --- /dev/null +++ b/tools/harness-automation/cases/leader_5_3_7.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class Leader_5_3_7(HarnessCase): + suite = 1 + case = '5 3 7' + golden_devices_required = 5 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/leader_5_3_8.py b/tools/harness-automation/cases/leader_5_3_8.py new file mode 100644 index 000000000..a3ad440ea --- /dev/null +++ b/tools/harness-automation/cases/leader_5_3_8.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class Leader_5_3_8(HarnessCase): + suite = 1 + case = '5 3 8' + golden_devices_required = 4 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/leader_5_5_1.py b/tools/harness-automation/cases/leader_5_5_1.py new file mode 100644 index 000000000..5e2260e80 --- /dev/null +++ b/tools/harness-automation/cases/leader_5_5_1.py @@ -0,0 +1,55 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import re +import time +import unittest + +from autothreadharness.harness_case import HarnessCase + +class Leader_5_5_1(HarnessCase): + suite = 1 + case = '5 5 1' + golden_devices_required = 1 + def on_dialog(self, dialog, title): + if title.startswith('User Input Required'): + body = dialog.find_element_by_id('cnfrmMsg').text + match = re.search(r'(?<=Leader Timeout\[)\d+(?= Seconds\])', body) + if match: + timeout = int(match.group(0)) / 2 + else: + timeout = 10 + self.dut.stop() + time.sleep(timeout) + self.dut.start() + return False + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/leader_5_5_2.py b/tools/harness-automation/cases/leader_5_5_2.py new file mode 100644 index 000000000..1d76e4dcb --- /dev/null +++ b/tools/harness-automation/cases/leader_5_5_2.py @@ -0,0 +1,48 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import time +import unittest + +from autothreadharness.harness_case import HarnessCase + +class Leader_5_5_2(HarnessCase): + suite = 1 + case = '5 5 2' + golden_devices_required = 2 + def on_dialog(self, dialog, title): + if title.startswith('User Input Required'): + self.dut.stop() + time.sleep(1) + self.dut.start() + return False + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/leader_5_5_3.py b/tools/harness-automation/cases/leader_5_5_3.py new file mode 100644 index 000000000..53ee2ad7b --- /dev/null +++ b/tools/harness-automation/cases/leader_5_5_3.py @@ -0,0 +1,50 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import time +import unittest + +from autothreadharness.harness_case import HarnessCase + +class Leader_5_5_3(HarnessCase): + suite = 1 + case = '5 5 3' + golden_devices_required = 5 + def on_dialog(self, dialog, title): + if title.startswith('Reset DUT'): + self.dut.stop() + return False + + elif title.startswith('Rejoin'): + self.dut.start() + return False + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/leader_5_5_4.py b/tools/harness-automation/cases/leader_5_5_4.py new file mode 100644 index 000000000..d1421c8a6 --- /dev/null +++ b/tools/harness-automation/cases/leader_5_5_4.py @@ -0,0 +1,50 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import time +import unittest + +from autothreadharness.harness_case import HarnessCase + +class Leader_5_5_4(HarnessCase): + suite = 1 + case = '5 5 4' + golden_devices_required = 5 + def on_dialog(self, dialog, title): + if title.startswith('Reset DUT'): + self.dut.stop() + return False + + elif title.startswith('Rejoin Now'): + self.dut.start() + return False + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/leader_5_5_7.py b/tools/harness-automation/cases/leader_5_5_7.py new file mode 100644 index 000000000..ac17e626e --- /dev/null +++ b/tools/harness-automation/cases/leader_5_5_7.py @@ -0,0 +1,50 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +from autothreadharness.harness_case import HarnessCase + +import time +import unittest + +class Leader_5_5_7(HarnessCase): + suite = 1 + case = '5 5 7' + golden_devices_required = 3 + def on_dialog(self, dialog, title): + if title.startswith('Reset DUT'): + self.dut.stop() + return False + + elif title.startswith('Rejoin Now'): + self.dut.start() + return False + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/leader_5_6_2.py b/tools/harness-automation/cases/leader_5_6_2.py new file mode 100644 index 000000000..b1ae41bb7 --- /dev/null +++ b/tools/harness-automation/cases/leader_5_6_2.py @@ -0,0 +1,42 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +from autothreadharness.harness_case import HarnessCase +import unittest + +class Leader_5_6_2(HarnessCase): + suite = 1 + case = '5 6 2' + golden_devices_required = 3 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/leader_5_6_4.py b/tools/harness-automation/cases/leader_5_6_4.py new file mode 100644 index 000000000..5c0abdf36 --- /dev/null +++ b/tools/harness-automation/cases/leader_5_6_4.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class Leader_5_6_4(HarnessCase): + suite = 1 + case = '5 6 4' + golden_devices_required = 3 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/leader_5_6_5.py b/tools/harness-automation/cases/leader_5_6_5.py new file mode 100644 index 000000000..9699fd9ad --- /dev/null +++ b/tools/harness-automation/cases/leader_5_6_5.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class Leader_5_6_5(HarnessCase): + suite = 1 + case = '5 6 5' + golden_devices_required = 3 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/leader_5_6_6.py b/tools/harness-automation/cases/leader_5_6_6.py new file mode 100644 index 000000000..1f28659ff --- /dev/null +++ b/tools/harness-automation/cases/leader_5_6_6.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class Leader_5_6_6(HarnessCase): + suite = 1 + case = '5 6 6' + golden_devices_required = 3 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/leader_5_6_8.py b/tools/harness-automation/cases/leader_5_6_8.py new file mode 100644 index 000000000..253bd97a4 --- /dev/null +++ b/tools/harness-automation/cases/leader_5_6_8.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class Leader_5_6_8(HarnessCase): + suite = 1 + case = '5 6 8' + golden_devices_required = 3 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/leader_5_7_1.py b/tools/harness-automation/cases/leader_5_7_1.py new file mode 100644 index 000000000..a313997a0 --- /dev/null +++ b/tools/harness-automation/cases/leader_5_7_1.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class Leader_5_7_1(HarnessCase): + suite = 1 + case = '5 7 1' + golden_devices_required = 4 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/leader_5_8_1.py b/tools/harness-automation/cases/leader_5_8_1.py new file mode 100644 index 000000000..70843594b --- /dev/null +++ b/tools/harness-automation/cases/leader_5_8_1.py @@ -0,0 +1,41 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +from autothreadharness.harness_case import HarnessCase +import unittest +class Leader_5_8_1(HarnessCase): + suite = 1 + case = '5 8 1' + golden_devices_required = 1 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/leader_7_1_1.py b/tools/harness-automation/cases/leader_7_1_1.py new file mode 100644 index 000000000..ee6b6c424 --- /dev/null +++ b/tools/harness-automation/cases/leader_7_1_1.py @@ -0,0 +1,42 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +from autothreadharness.harness_case import HarnessCase +import unittest + +class Leader_7_1_1(HarnessCase): + suite = 1 + case = '7 1 1' + golden_devices_required = 3 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/leader_7_1_3.py b/tools/harness-automation/cases/leader_7_1_3.py new file mode 100644 index 000000000..01a709249 --- /dev/null +++ b/tools/harness-automation/cases/leader_7_1_3.py @@ -0,0 +1,42 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +from autothreadharness.harness_case import HarnessCase +import unittest + +class Leader_7_1_3(HarnessCase): + suite = 1 + case = '7 1 3' + golden_devices_required = 3 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/reed_5_2_4.py b/tools/harness-automation/cases/reed_5_2_4.py new file mode 100644 index 000000000..151fa67c0 --- /dev/null +++ b/tools/harness-automation/cases/reed_5_2_4.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class REED_5_2_4(HarnessCase): + suite = 16 + case = '5 2 4' + golden_devices_required = 17 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/reed_5_2_5.py b/tools/harness-automation/cases/reed_5_2_5.py new file mode 100644 index 000000000..4784925c8 --- /dev/null +++ b/tools/harness-automation/cases/reed_5_2_5.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class REED_5_2_5(HarnessCase): + suite = 16 + case = '5 2 5' + golden_devices_required = 17 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/reed_5_2_7.py b/tools/harness-automation/cases/reed_5_2_7.py new file mode 100644 index 000000000..2894c42ac --- /dev/null +++ b/tools/harness-automation/cases/reed_5_2_7.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class REED_5_2_7(HarnessCase): + suite = 16 + case = '5 2 7' + golden_devices_required = 16 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/reed_5_5_5.py b/tools/harness-automation/cases/reed_5_5_5.py new file mode 100644 index 000000000..f5326fa88 --- /dev/null +++ b/tools/harness-automation/cases/reed_5_5_5.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class REED_5_5_5(HarnessCase): + suite = 16 + case = '5 5 5' + golden_devices_required = 16 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/reed_5_6_7.py b/tools/harness-automation/cases/reed_5_6_7.py new file mode 100644 index 000000000..d1f12ba44 --- /dev/null +++ b/tools/harness-automation/cases/reed_5_6_7.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class REED_5_6_7(HarnessCase): + suite = 16 + case = '5 6 7' + golden_devices_required = 16 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/router_5_1_1.py b/tools/harness-automation/cases/router_5_1_1.py new file mode 100644 index 000000000..9b4cc840c --- /dev/null +++ b/tools/harness-automation/cases/router_5_1_1.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class Router_5_1_1(HarnessCase): + suite = 2 + case = '5 1 1' + golden_devices_required = 1 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/router_5_1_10.py b/tools/harness-automation/cases/router_5_1_10.py new file mode 100644 index 000000000..5b91b0cba --- /dev/null +++ b/tools/harness-automation/cases/router_5_1_10.py @@ -0,0 +1,44 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class Router_5_1_10(HarnessCase): + suite = 2 + case = '5 1 10' + golden_devices_required = 3 + def on_dialog(self, dialog, title): + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/router_5_1_11.py b/tools/harness-automation/cases/router_5_1_11.py new file mode 100644 index 000000000..cea6155ca --- /dev/null +++ b/tools/harness-automation/cases/router_5_1_11.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class Router_5_1_11(HarnessCase): + suite = 2 + case = '5 1 11' + golden_devices_required = 3 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/router_5_1_12.py b/tools/harness-automation/cases/router_5_1_12.py new file mode 100644 index 000000000..056a0e8e1 --- /dev/null +++ b/tools/harness-automation/cases/router_5_1_12.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class Router_5_1_12(HarnessCase): + suite = 2 + case = '5 1 12' + golden_devices_required = 2 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/router_5_1_13.py b/tools/harness-automation/cases/router_5_1_13.py new file mode 100644 index 000000000..034853a79 --- /dev/null +++ b/tools/harness-automation/cases/router_5_1_13.py @@ -0,0 +1,50 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest +import time + +from autothreadharness.harness_case import HarnessCase + +class Router_5_1_13(HarnessCase): + suite = 2 + case = '5 1 13' + golden_devices_required = 1 + def on_dialog(self, dialog, title): + if title.startswith('Reset DUT'): + self.dut.stop() + return False + + elif title.startswith('Rejoin Now'): + self.dut.start() + return False + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/router_5_1_2.py b/tools/harness-automation/cases/router_5_1_2.py new file mode 100644 index 000000000..f45115d48 --- /dev/null +++ b/tools/harness-automation/cases/router_5_1_2.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class Router_5_1_2(HarnessCase): + suite = 2 + case = '5 1 2' + golden_devices_required = 3 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/router_5_1_3.py b/tools/harness-automation/cases/router_5_1_3.py new file mode 100644 index 000000000..44f79cf32 --- /dev/null +++ b/tools/harness-automation/cases/router_5_1_3.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class Router_5_1_3(HarnessCase): + suite = 2 + case = '5 1 3' + golden_devices_required = 2 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/router_5_1_4.py b/tools/harness-automation/cases/router_5_1_4.py new file mode 100644 index 000000000..a13db5281 --- /dev/null +++ b/tools/harness-automation/cases/router_5_1_4.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class Router_5_1_4(HarnessCase): + suite = 2 + case = '5 1 4' + golden_devices_required = 2 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/router_5_1_6.py b/tools/harness-automation/cases/router_5_1_6.py new file mode 100644 index 000000000..d051e0abb --- /dev/null +++ b/tools/harness-automation/cases/router_5_1_6.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class Router_5_1_6(HarnessCase): + suite = 2 + case = '5 1 6' + golden_devices_required = 1 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/router_5_1_7.py b/tools/harness-automation/cases/router_5_1_7.py new file mode 100644 index 000000000..0a5903cbf --- /dev/null +++ b/tools/harness-automation/cases/router_5_1_7.py @@ -0,0 +1,47 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class Router_5_1_7(HarnessCase): + suite = 2 + case = '5 1 7' + golden_devices_required = 7 + def on_dialog(self, dialog, title): + if title.startswith('Enter Router Max Child Count'): + inp = dialog.find_element_by_id('cnfrmInpText') + inp.clear() + inp.send_keys('5') + return False + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/router_5_1_8.py b/tools/harness-automation/cases/router_5_1_8.py new file mode 100644 index 000000000..b83b831c0 --- /dev/null +++ b/tools/harness-automation/cases/router_5_1_8.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class Router_5_1_8(HarnessCase): + suite = 2 + case = '5 1 8' + golden_devices_required = 4 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/router_5_1_9.py b/tools/harness-automation/cases/router_5_1_9.py new file mode 100644 index 000000000..23e9e26ca --- /dev/null +++ b/tools/harness-automation/cases/router_5_1_9.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class Router_5_1_9(HarnessCase): + suite = 2 + case = '5 1 9' + golden_devices_required = 4 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/router_5_2_1.py b/tools/harness-automation/cases/router_5_2_1.py new file mode 100644 index 000000000..4aef4e9ad --- /dev/null +++ b/tools/harness-automation/cases/router_5_2_1.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class Router_5_2_1(HarnessCase): + suite = 2 + case = '5 2 1' + golden_devices_required = 3 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/router_5_2_6.py b/tools/harness-automation/cases/router_5_2_6.py new file mode 100644 index 000000000..3ab164225 --- /dev/null +++ b/tools/harness-automation/cases/router_5_2_6.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class Router_5_2_6(HarnessCase): + suite = 2 + case = '5 2 6' + golden_devices_required = 23 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/router_5_2_7.py b/tools/harness-automation/cases/router_5_2_7.py new file mode 100644 index 000000000..075fc68b7 --- /dev/null +++ b/tools/harness-automation/cases/router_5_2_7.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class Router_5_2_7(HarnessCase): + suite = 2 + case = '5 2 7' + golden_devices_required = 16 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/router_5_3_1.py b/tools/harness-automation/cases/router_5_3_1.py new file mode 100644 index 000000000..7f38a6302 --- /dev/null +++ b/tools/harness-automation/cases/router_5_3_1.py @@ -0,0 +1,41 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +from autothreadharness.harness_case import HarnessCase +import unittest + +class Router_5_3_1(HarnessCase): + suite = 2 + case = '5 3 1' + golden_devices_required = 1 + def on_dialog(self, dialog, title): + pass +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/router_5_3_10.py b/tools/harness-automation/cases/router_5_3_10.py new file mode 100644 index 000000000..3b4ba3cc6 --- /dev/null +++ b/tools/harness-automation/cases/router_5_3_10.py @@ -0,0 +1,41 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +from autothreadharness.harness_case import HarnessCase +import unittest + +class Router_5_3_10(HarnessCase): + suite = 2 + case = '5 3 10' + golden_devices_required = 4 + def on_dialog(self, dialog, title): + pass +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/router_5_3_2.py b/tools/harness-automation/cases/router_5_3_2.py new file mode 100644 index 000000000..7a2040401 --- /dev/null +++ b/tools/harness-automation/cases/router_5_3_2.py @@ -0,0 +1,41 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +from autothreadharness.harness_case import HarnessCase +import unittest + +class Router_5_3_2(HarnessCase): + suite = 2 + case = '5 3 2' + golden_devices_required = 3 + def on_dialog(self, dialog, title): + pass +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/router_5_3_3.py b/tools/harness-automation/cases/router_5_3_3.py new file mode 100644 index 000000000..a6aa2816f --- /dev/null +++ b/tools/harness-automation/cases/router_5_3_3.py @@ -0,0 +1,41 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +from autothreadharness.harness_case import HarnessCase +import unittest + +class Router_5_3_3(HarnessCase): + suite = 2 + case = '5 3 3' + golden_devices_required = 4 + def on_dialog(self, dialog, title): + pass +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/router_5_3_4.py b/tools/harness-automation/cases/router_5_3_4.py new file mode 100644 index 000000000..8bdcbbea8 --- /dev/null +++ b/tools/harness-automation/cases/router_5_3_4.py @@ -0,0 +1,41 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +from autothreadharness.harness_case import HarnessCase +import unittest + +class Router_5_3_4(HarnessCase): + suite = 2 + case = '5 3 4' + golden_devices_required = 6 + def on_dialog(self, dialog, title): + pass +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/router_5_3_5.py b/tools/harness-automation/cases/router_5_3_5.py new file mode 100644 index 000000000..e7e789eec --- /dev/null +++ b/tools/harness-automation/cases/router_5_3_5.py @@ -0,0 +1,42 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +from autothreadharness.harness_case import HarnessCase +import unittest + +class Router_5_3_5(HarnessCase): + suite = 2 + case = '5 3 5' + golden_devices_required = 3 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/router_5_3_9.py b/tools/harness-automation/cases/router_5_3_9.py new file mode 100644 index 000000000..ce2696665 --- /dev/null +++ b/tools/harness-automation/cases/router_5_3_9.py @@ -0,0 +1,41 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +from autothreadharness.harness_case import HarnessCase +import unittest + +class Router_5_3_9(HarnessCase): + suite = 2 + case = '5 3 9' + golden_devices_required = 4 + def on_dialog(self, dialog, title): + pass +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/router_5_5_1.py b/tools/harness-automation/cases/router_5_5_1.py new file mode 100644 index 000000000..56fabc2c9 --- /dev/null +++ b/tools/harness-automation/cases/router_5_5_1.py @@ -0,0 +1,42 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +from autothreadharness.harness_case import HarnessCase +import unittest + +class Router_5_5_1(HarnessCase): + suite = 2 + case = '5 5 1' + golden_devices_required = 1 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/router_5_5_2.py b/tools/harness-automation/cases/router_5_5_2.py new file mode 100644 index 000000000..a321fd2dd --- /dev/null +++ b/tools/harness-automation/cases/router_5_5_2.py @@ -0,0 +1,42 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +from autothreadharness.harness_case import HarnessCase +import unittest + +class Router_5_5_2(HarnessCase): + suite = 2 + case = '5 5 2' + golden_devices_required = 2 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/router_5_5_3.py b/tools/harness-automation/cases/router_5_5_3.py new file mode 100644 index 000000000..4215dd9a5 --- /dev/null +++ b/tools/harness-automation/cases/router_5_5_3.py @@ -0,0 +1,42 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +from autothreadharness.harness_case import HarnessCase +import unittest + +class Router_5_5_3(HarnessCase): + suite = 2 + case = '5 5 3' + golden_devices_required = 5 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/router_5_5_4.py b/tools/harness-automation/cases/router_5_5_4.py new file mode 100644 index 000000000..acc642dd4 --- /dev/null +++ b/tools/harness-automation/cases/router_5_5_4.py @@ -0,0 +1,42 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +from autothreadharness.harness_case import HarnessCase +import unittest + +class Router_5_5_4(HarnessCase): + suite = 2 + case = '5 5 4' + golden_devices_required = 5 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/router_5_5_7.py b/tools/harness-automation/cases/router_5_5_7.py new file mode 100644 index 000000000..4d2bf055a --- /dev/null +++ b/tools/harness-automation/cases/router_5_5_7.py @@ -0,0 +1,42 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +from autothreadharness.harness_case import HarnessCase +import unittest + +class Router_5_5_7(HarnessCase): + suite = 2 + case = '5 5 7' + golden_devices_required = 3 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/router_5_5_8.py b/tools/harness-automation/cases/router_5_5_8.py new file mode 100644 index 000000000..cabfa4eff --- /dev/null +++ b/tools/harness-automation/cases/router_5_5_8.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class Router_5_5_8(HarnessCase): + suite = 2 + case = '5 5 8' + golden_devices_required = 4 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/router_5_6_1.py b/tools/harness-automation/cases/router_5_6_1.py new file mode 100644 index 000000000..138828e27 --- /dev/null +++ b/tools/harness-automation/cases/router_5_6_1.py @@ -0,0 +1,42 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +from autothreadharness.harness_case import HarnessCase +import unittest + +class Router_5_6_1(HarnessCase): + suite = 2 + case = '5 6 1' + golden_devices_required = 3 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/router_5_6_3.py b/tools/harness-automation/cases/router_5_6_3.py new file mode 100644 index 000000000..f74ad23c4 --- /dev/null +++ b/tools/harness-automation/cases/router_5_6_3.py @@ -0,0 +1,42 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +from autothreadharness.harness_case import HarnessCase +import unittest + +class Router_5_6_3(HarnessCase): + suite = 2 + case = '5 6 3' + golden_devices_required = 3 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/router_5_6_9.py b/tools/harness-automation/cases/router_5_6_9.py new file mode 100644 index 000000000..ed5ec343e --- /dev/null +++ b/tools/harness-automation/cases/router_5_6_9.py @@ -0,0 +1,42 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +from autothreadharness.harness_case import HarnessCase +import unittest + +class Router_5_6_9(HarnessCase): + suite = 2 + case = '5 6 9' + golden_devices_required = 4 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/router_5_8_2.py b/tools/harness-automation/cases/router_5_8_2.py new file mode 100644 index 000000000..9597a832a --- /dev/null +++ b/tools/harness-automation/cases/router_5_8_2.py @@ -0,0 +1,41 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +from autothreadharness.harness_case import HarnessCase +import unittest +class Router_5_8_2(HarnessCase): + suite = 2 + case = '5 8 2' + golden_devices_required = 1 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/router_5_8_3.py b/tools/harness-automation/cases/router_5_8_3.py new file mode 100644 index 000000000..078ee7c44 --- /dev/null +++ b/tools/harness-automation/cases/router_5_8_3.py @@ -0,0 +1,41 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +from autothreadharness.harness_case import HarnessCase +import unittest +class Router_5_8_3(HarnessCase): + suite = 2 + case = '5 8 3' + golden_devices_required = 1 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/router_7_1_2.py b/tools/harness-automation/cases/router_7_1_2.py new file mode 100644 index 000000000..71a3c34cd --- /dev/null +++ b/tools/harness-automation/cases/router_7_1_2.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class Router_7_1_2(HarnessCase): + suite = 2 + case = '7 1 2' + golden_devices_required = 3 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/router_7_1_4.py b/tools/harness-automation/cases/router_7_1_4.py new file mode 100644 index 000000000..0fb36115a --- /dev/null +++ b/tools/harness-automation/cases/router_7_1_4.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class Router_7_1_4(HarnessCase): + suite = 2 + case = '7 1 4' + golden_devices_required = 3 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/router_7_1_5.py b/tools/harness-automation/cases/router_7_1_5.py new file mode 100644 index 000000000..6ddc2040c --- /dev/null +++ b/tools/harness-automation/cases/router_7_1_5.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class Router_7_1_5(HarnessCase): + suite = 2 + case = '7 1 5' + golden_devices_required = 3 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/router_7_1_6.py b/tools/harness-automation/cases/router_7_1_6.py new file mode 100644 index 000000000..53fd06dc1 --- /dev/null +++ b/tools/harness-automation/cases/router_7_1_6.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class Router_7_1_6(HarnessCase): + suite = 2 + case = '7 1 6' + golden_devices_required = 3 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/router_7_1_7.py b/tools/harness-automation/cases/router_7_1_7.py new file mode 100644 index 000000000..338d2f185 --- /dev/null +++ b/tools/harness-automation/cases/router_7_1_7.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class Router_7_1_7(HarnessCase): + suite = 2 + case = '7 1 7' + golden_devices_required = 3 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/router_7_1_8.py b/tools/harness-automation/cases/router_7_1_8.py new file mode 100644 index 000000000..d0046eb03 --- /dev/null +++ b/tools/harness-automation/cases/router_7_1_8.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class Router_7_1_8(HarnessCase): + suite = 2 + case = '7 1 8' + golden_devices_required = 3 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/sed_6_1_1.py b/tools/harness-automation/cases/sed_6_1_1.py new file mode 100644 index 000000000..c183baccb --- /dev/null +++ b/tools/harness-automation/cases/sed_6_1_1.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class SED_6_1_1(HarnessCase): + suite = 4 + case = '6 1 1' + golden_devices_required = 1 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/sed_6_1_2.py b/tools/harness-automation/cases/sed_6_1_2.py new file mode 100644 index 000000000..031a02199 --- /dev/null +++ b/tools/harness-automation/cases/sed_6_1_2.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class SED_6_1_2(HarnessCase): + suite = 4 + case = '6 1 2' + golden_devices_required = 2 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/sed_6_1_3.py b/tools/harness-automation/cases/sed_6_1_3.py new file mode 100644 index 000000000..44a80520a --- /dev/null +++ b/tools/harness-automation/cases/sed_6_1_3.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class SED_6_1_3(HarnessCase): + suite = 4 + case = '6 1 3' + golden_devices_required = 4 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/sed_6_1_4.py b/tools/harness-automation/cases/sed_6_1_4.py new file mode 100644 index 000000000..9b5b79d06 --- /dev/null +++ b/tools/harness-automation/cases/sed_6_1_4.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class SED_6_1_4(HarnessCase): + suite = 4 + case = '6 1 4' + golden_devices_required = 4 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/sed_6_1_5.py b/tools/harness-automation/cases/sed_6_1_5.py new file mode 100644 index 000000000..95d4323ae --- /dev/null +++ b/tools/harness-automation/cases/sed_6_1_5.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class SED_6_1_5(HarnessCase): + suite = 4 + case = '6 1 5' + golden_devices_required = 3 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/sed_6_1_6.py b/tools/harness-automation/cases/sed_6_1_6.py new file mode 100644 index 000000000..e4d0ca52c --- /dev/null +++ b/tools/harness-automation/cases/sed_6_1_6.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class SED_6_1_6(HarnessCase): + suite = 4 + case = '6 1 6' + golden_devices_required = 3 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/sed_6_2_1.py b/tools/harness-automation/cases/sed_6_2_1.py new file mode 100644 index 000000000..135d3f0d8 --- /dev/null +++ b/tools/harness-automation/cases/sed_6_2_1.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class SED_6_2_1(HarnessCase): + suite = 4 + case = '6 2 1' + golden_devices_required = 2 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/sed_6_2_2.py b/tools/harness-automation/cases/sed_6_2_2.py new file mode 100644 index 000000000..ef2e2ac9b --- /dev/null +++ b/tools/harness-automation/cases/sed_6_2_2.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class SED_6_2_2(HarnessCase): + suite = 4 + case = '6 2 2' + golden_devices_required = 3 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/sed_6_3_1.py b/tools/harness-automation/cases/sed_6_3_1.py new file mode 100644 index 000000000..531f5c2d1 --- /dev/null +++ b/tools/harness-automation/cases/sed_6_3_1.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class SED_6_3_1(HarnessCase): + suite = 4 + case = '6 3 1' + golden_devices_required = 2 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/sed_6_3_2.py b/tools/harness-automation/cases/sed_6_3_2.py new file mode 100644 index 000000000..22676fe8d --- /dev/null +++ b/tools/harness-automation/cases/sed_6_3_2.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class SED_6_3_2(HarnessCase): + suite = 4 + case = '6 3 2' + golden_devices_required = 1 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/sed_6_4_1.py b/tools/harness-automation/cases/sed_6_4_1.py new file mode 100644 index 000000000..85c52fa8e --- /dev/null +++ b/tools/harness-automation/cases/sed_6_4_1.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class SED_6_4_1(HarnessCase): + suite = 4 + case = '6 4 1' + golden_devices_required = 1 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/sed_6_4_2.py b/tools/harness-automation/cases/sed_6_4_2.py new file mode 100644 index 000000000..8849a5663 --- /dev/null +++ b/tools/harness-automation/cases/sed_6_4_2.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class SED_6_4_2(HarnessCase): + suite = 4 + case = '6 4 2' + golden_devices_required = 2 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/sed_6_5_1.py b/tools/harness-automation/cases/sed_6_5_1.py new file mode 100644 index 000000000..b0c660421 --- /dev/null +++ b/tools/harness-automation/cases/sed_6_5_1.py @@ -0,0 +1,49 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import time +import unittest + +from autothreadharness.harness_case import HarnessCase + +class SED_6_5_1(HarnessCase): + suite = 4 + case = '6 5 1' + golden_devices_required = 1 + def on_dialog(self, dialog, title): + if title.startswith('Reset DUT'): + time.sleep(self.child_timeout + 5) + self.dut.stop() + time.sleep(1) + self.dut.start() + return False + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/sed_6_5_2.py b/tools/harness-automation/cases/sed_6_5_2.py new file mode 100644 index 000000000..6646ba79b --- /dev/null +++ b/tools/harness-automation/cases/sed_6_5_2.py @@ -0,0 +1,50 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import time +import unittest + +from autothreadharness.harness_case import HarnessCase + +class SED_6_5_2(HarnessCase): + suite = 4 + case = '6 5 2' + golden_devices_required = 2 + def on_dialog(self, dialog, title): + if title.startswith('Reset DUT'): + self.dut.stop() + return False + + elif title.startswith('Rejoin Now'): + self.dut.start() + return False + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/sed_6_5_3.py b/tools/harness-automation/cases/sed_6_5_3.py new file mode 100644 index 000000000..d7485010d --- /dev/null +++ b/tools/harness-automation/cases/sed_6_5_3.py @@ -0,0 +1,50 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import time +import unittest + +from autothreadharness.harness_case import HarnessCase + +class SED_6_5_3(HarnessCase): + suite = 4 + case = '6 5 3' + golden_devices_required = 2 + def on_dialog(self, dialog, title): + if title.startswith('Reset DUT'): + self.dut.stop() + return False + + elif title.startswith('Rejoin Now'): + self.dut.start() + return False + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/sed_6_6_1.py b/tools/harness-automation/cases/sed_6_6_1.py new file mode 100644 index 000000000..db9ce0613 --- /dev/null +++ b/tools/harness-automation/cases/sed_6_6_1.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class SED_6_6_1(HarnessCase): + suite = 4 + case = '6 6 1' + golden_devices_required = 1 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/cases/sed_6_6_2.py b/tools/harness-automation/cases/sed_6_6_2.py new file mode 100644 index 000000000..38ed80843 --- /dev/null +++ b/tools/harness-automation/cases/sed_6_6_2.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +import unittest + +from autothreadharness.harness_case import HarnessCase + +class SED_6_6_2(HarnessCase): + suite = 4 + case = '6 6 2' + golden_devices_required = 1 + def on_dialog(self, dialog, title): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/tools/harness-automation/doc/components.gv b/tools/harness-automation/doc/components.gv new file mode 100644 index 000000000..dd49c9ffc --- /dev/null +++ b/tools/harness-automation/doc/components.gv @@ -0,0 +1,18 @@ +digraph G { + subgraph cluster_os { + style=filled; + color=grey; + label="Windows"; + + subgraph cluster_python { + label="Automation Tool/Python"; + color=lightgrey; + HarnessCase -> HarnessController; + HarnessCase -> OpenThreadController; + } + + HarnessCase -> Chrome [label="selenium"]; + HarnessController -> "Thread Harness"; + } + OpenThreadController -> DUT [label="serial port"]; +} diff --git a/tools/harness-automation/doc/components.png b/tools/harness-automation/doc/components.png new file mode 100644 index 000000000..6756a174f Binary files /dev/null and b/tools/harness-automation/doc/components.png differ diff --git a/tools/harness-automation/doc/conf.py b/tools/harness-automation/doc/conf.py new file mode 100644 index 000000000..342070978 --- /dev/null +++ b/tools/harness-automation/doc/conf.py @@ -0,0 +1,368 @@ +# -*- coding: utf-8 -*- +# +# Copyright (c) 2016, Nest Labs, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + + +# +# Thread Harness Automation documentation build configuration file, created by +# sphinx-quickstart on Wed Jun 29 15:18:24 2016. +# +# This file is execfile()d with the current directory set to its +# containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +import os +import sys +import sphinx_rtd_theme + +sys.path.insert(0, os.path.abspath('..')) + +# -- General configuration ------------------------------------------------ + +# If your documentation needs a minimal Sphinx version, state it here. +# +# needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ + 'sphinx.ext.autodoc', + 'sphinxcontrib.napoleon' +] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix(es) of source filenames. +# You can specify multiple suffix as a list of string: +# +# source_suffix = ['.rst', '.md'] +source_suffix = '.rst' + +# The encoding of source files. +# +# source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'Thread Harness Automation' +copyright = u'2016, Yakun Xu' +author = u'Yakun Xu' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +version = u'0.5' +# The full version, including alpha/beta/rc tags. +release = u'0.5' + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set "language" from the command line for these cases. +language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +# +# today = '' +# +# Else, today_fmt is used as the format for a strftime call. +# +# today_fmt = '%B %d, %Y' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This patterns also effect to html_static_path and html_extra_path +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] + +# The reST default role (used for this markup: `text`) to use for all +# documents. +# +# default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +# +# add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +# +# add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +# +# show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# A list of ignored prefixes for module index sorting. +# modindex_common_prefix = [] + +# If true, keep warnings as "system message" paragraphs in the built documents. +# keep_warnings = False + +# If true, `todo` and `todoList` produce output, else they produce nothing. +todo_include_todos = False + + +# -- Options for HTML output ---------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +#html_theme = 'alabaster' +html_theme = 'sphinx_rtd_theme' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +# +# html_theme_options = {} + +# Add any paths that contain custom themes here, relative to this directory. +# html_theme_path = [] +html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] + +# The name for this set of Sphinx documents. +# " v documentation" by default. +# +# html_title = u'Thread Harness Automation v0.5' + +# A shorter title for the navigation bar. Default is the same as html_title. +# +# html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +# +# html_logo = None + +# The name of an image file (relative to this directory) to use as a favicon of +# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +# +# html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# Add any extra paths that contain custom files (such as robots.txt or +# .htaccess) here, relative to this directory. These files are copied +# directly to the root of the documentation. +# +# html_extra_path = [] + +# If not None, a 'Last updated on:' timestamp is inserted at every page +# bottom, using the given strftime format. +# The empty string is equivalent to '%b %d, %Y'. +# +# html_last_updated_fmt = None + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +# +# html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +# +# html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +# +# html_additional_pages = {} + +# If false, no module index is generated. +# +# html_domain_indices = True + +# If false, no index is generated. +# +# html_use_index = True + +# If true, the index is split into individual pages for each letter. +# +# html_split_index = False + +# If true, links to the reST sources are added to the pages. +# +# html_show_sourcelink = True + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +# +# html_show_sphinx = True + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +# +# html_show_copyright = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +# +# html_use_opensearch = '' + +# This is the file name suffix for HTML files (e.g. ".xhtml"). +# html_file_suffix = None + +# Language to be used for generating the HTML full-text search index. +# Sphinx supports the following languages: +# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja' +# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr', 'zh' +# +# html_search_language = 'en' + +# A dictionary with options for the search language support, empty by default. +# 'ja' uses this config value. +# 'zh' user can custom change `jieba` dictionary path. +# +# html_search_options = {'type': 'default'} + +# The name of a javascript file (relative to the configuration directory) that +# implements a search results scorer. If empty, the default will be used. +# +# html_search_scorer = 'scorer.js' + +# Output file base name for HTML help builder. +htmlhelp_basename = 'ThreadHarnessAutomationdoc' + +# -- Options for LaTeX output --------------------------------------------- + +latex_elements = { + # The paper size ('letterpaper' or 'a4paper'). + # + # 'papersize': 'letterpaper', + + # The font size ('10pt', '11pt' or '12pt'). + # + # 'pointsize': '10pt', + + # Additional stuff for the LaTeX preamble. + # + # 'preamble': '', + + # Latex figure (float) alignment + # + # 'figure_align': 'htbp', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, +# author, documentclass [howto, manual, or own class]). +latex_documents = [ + (master_doc, 'ThreadHarnessAutomation.tex', u'Thread Harness Automation Documentation', + u'Yakun Xu', 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +# +# latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +# +# latex_use_parts = False + +# If true, show page references after internal links. +# +# latex_show_pagerefs = False + +# If true, show URL addresses after external links. +# +# latex_show_urls = False + +# Documents to append as an appendix to all manuals. +# +# latex_appendices = [] + +# If false, no module index is generated. +# +# latex_domain_indices = True + + +# -- Options for manual page output --------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + (master_doc, 'threadharnessautomation', u'Thread Harness Automation Documentation', + [author], 1) +] + +# If true, show URL addresses after external links. +# +# man_show_urls = False + + +# -- Options for Texinfo output ------------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + (master_doc, 'ThreadHarnessAutomation', u'Thread Harness Automation Documentation', + author, 'ThreadHarnessAutomation', 'One line description of project.', + 'Miscellaneous'), +] + +# Documents to append as an appendix to all manuals. +# +# texinfo_appendices = [] + +# If false, no module index is generated. +# +# texinfo_domain_indices = True + +# How to display URL addresses: 'footnote', 'no', or 'inline'. +# +# texinfo_show_urls = 'footnote' + +# If true, do not generate a @detailmenu in the "Top" node's menu. +# +# texinfo_no_detailmenu = False diff --git a/tools/harness-automation/doc/index.rst b/tools/harness-automation/doc/index.rst new file mode 100644 index 000000000..6f91db9ee --- /dev/null +++ b/tools/harness-automation/doc/index.rst @@ -0,0 +1,25 @@ +.. Thread Harness Automation documentation master file, created by + sphinx-quickstart on Wed Jun 29 15:18:24 2016. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to Thread Harness Automation's documentation! +===================================================== + +Contents: + +.. toctree:: + :maxdepth: 2 + + quickstart + api/modules + + + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` + diff --git a/tools/harness-automation/doc/quickstart.rst b/tools/harness-automation/doc/quickstart.rst new file mode 100644 index 000000000..10a0ca450 --- /dev/null +++ b/tools/harness-automation/doc/quickstart.rst @@ -0,0 +1,91 @@ +Thread Harness Automation Quick Start +===================================== + +Setup +----- + +#. Install Thread-Test-Harness1.1-Alpha v1.0-Release_13.0 +#. Install python 2.7 +#. Get OpenThread and switch to the harness automation path:: + + git clone https://github.com/openthread/openthread.git + cd openthread/tools/harness-automation + +#. Install python libraries dependencies:: + + pip install -r requirements.txt + +#. Update settings. + + Just copy the sample and modify:: + + cp autothreadharness/settings_sample.py autothreadharness/settings.py + + APC_HOST + MUST be set to None if no APC PDU available. + + GOLDEN_DEVICES + can be found on Windows Device Manager. You have to filter out the ports of sniffer device and DUT by yourself. + + OUTPUT_PATH + MUST be set to a writable directory. + + HARNESS_HOME + MUST be set to Thread Harness installation directory. e.g. ``C:\GRL\Thread`` + +Run single case +--------------- + +:: + + # bash + ./start.sh Router_5_1_1 + + # windows command line + start.bat Router_5_1_1 + +Run all cases +------------- + +:: + + # bash + ./start.sh + + # windows command line + start.bat + +This will record the results in result.json, so that you can continue running cases once broken. You can also get help information with argument -h or --help. + +List devices +------------ + +:: + + # bash + ./start.sh -l + + # windows command line + start.bat -l + +Check single device +------------------- + +:: + + # bash + ./start.sh -l COM28 + + # windows command line + start.bat -l COM28 + +Get Help +--------- + +:: + + # bash + ./start.sh -h + + # windows command line + start.bat -h diff --git a/tools/harness-automation/requirements.txt b/tools/harness-automation/requirements.txt new file mode 100644 index 000000000..98725daf1 --- /dev/null +++ b/tools/harness-automation/requirements.txt @@ -0,0 +1,4 @@ +pyserial +pexpect +pexpect_serial +selenium diff --git a/tools/harness-automation/start.bat b/tools/harness-automation/start.bat new file mode 100644 index 000000000..b1a9ee639 --- /dev/null +++ b/tools/harness-automation/start.bat @@ -0,0 +1,2 @@ +cd %~dp0 +python -u -m autothreadharness.runner %* diff --git a/tools/harness-automation/start.sh b/tools/harness-automation/start.sh new file mode 100755 index 000000000..b1fe2e8ad --- /dev/null +++ b/tools/harness-automation/start.sh @@ -0,0 +1,2 @@ +#!/bin/sh +python -u -m autothreadharness.runner $@