diff options
author | Donghoon Shin <dhs.shin@samsung.com> | 2017-02-02 12:47:48 +0900 |
---|---|---|
committer | Donghoon Shin <dhs.shin@samsung.com> | 2017-02-02 12:47:48 +0900 |
commit | aac1e6264c540bec928493b8ca7ff0cb115556a6 (patch) | |
tree | 1e1589c5c923dc6575358939725eb9add7608008 | |
parent | 275092c7e574e5edc5e874d8e86718d104c8567b (diff) | |
download | litmus-aac1e6264c540bec928493b8ca7ff0cb115556a6.tar.gz litmus-aac1e6264c540bec928493b8ca7ff0cb115556a6.tar.bz2 litmus-aac1e6264c540bec928493b8ca7ff0cb115556a6.zip |
Sync up upstream
Change-Id: I765a5f675b9744a68b395a8bac301e9412abf12a
59 files changed, 205 insertions, 610 deletions
diff --git a/CHANGES.txt b/CHANGES.txt deleted file mode 100644 index d928568..0000000 --- a/CHANGES.txt +++ /dev/null @@ -1,50 +0,0 @@ -====================== - litmus Release Notes -====================== - -Version 0.1.0 09 Jun 2016 ---------------------------- -- Initial Version - -Version 0.1.1 27 Jun 2016 ---------------------------- -- Add ttyS0 in uarts list -- Release global lock at exception of device.on() function -- Turn off device if keyboard interrupt is raised while flashing or turning on device -- Add timeout for all call/check_output to avoid hang issue - -Version 0.2.0 09 Sep 2016 ---------------------------- -- Remove acmlock routine to improve test performance -- Support flash function for standalone device type -- Update test helper functions - -Version 0.2.1 09 Sep 2016 ---------------------------- -- Update import command to use shell-like path expansions -- Update standalone device type to avoid sdb error -- Update default templates for u3 and xu3 - -Version 0.3.0 21 Sep 2016 ---------------------------- -- Update projects/topology file location -- Add projects/topology param at command prompt -- Support multiple standalone devices in topology -- Add global lock for standalone device type - -Version 0.3.1 22 Sep 2016 ---------------------------- -- Update cmd_rm handler - -Version 0.3.2 07 Oct 2016 ---------------------------- -- Support artik and more standalone device types - -Version 0.3.3 11 Oct 2016 ---------------------------- -- Support device.screenshot() API - -Version 0.3.4 21 Oct 2016 ---------------------------- -- Update flash method for tw1 to skip passing parameter 'flasher' -- Change private function _sdb_root_on to public function sdb_root_on diff --git a/MANIFEST.in b/MANIFEST.in index 07fcd5a..a9648a1 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -15,7 +15,6 @@ include AUTHORS include README.md include LICENSE.APLv2 -include CHANGES.txt include MANIFEST.in include setup.py recursive-include litmus/templates * @@ -1,8 +1,7 @@ Litmus is an automated testing tool for tizen arm devices. -Prerequisite ---------------------- +# Prerequisite Litmus uses sdb to communicate with device. sdb is not released on download.tizen.org/tools but you can find it from sdk. @@ -10,51 +9,52 @@ sdb is not released on download.tizen.org/tools but you can find it from sdk. Install sdb from tizen sdk or download binary from below url. 32bit: -http://download.tizen.org/sdk/tizenstudio/official/binary/sdb_2.2.89_ubuntu-32.zip + https://download.tizen.org/sdk/tizenstudio/official/binary/sdb_2.3.0_ubuntu-32.zip 64bit: -http://download.tizen.org/sdk/tizenstudio/official/binary/sdb_2.2.89_ubuntu-64.zip + https://download.tizen.org/sdk/tizenstudio/official/binary/sdb_2.3.0_ubuntu-64.zip Unzip this package and copy sdb binary to /usr/bin + $ wget http://download.tizen.org/sdk/tizenstudio/official/binary/sdb_2.3.0_ubuntu-64.zip \ + && unzip sdb_2.3.0_ubuntu-64.zip -d ~/temp \ + && cp ~/temp/data/tools/sdb /usr/bin \ + && rm -f sdb_2.3.0_ubuntu-64.zip \ + && rm -rf ~/temp -Buliding & installing ---------------------- -1. Clone this project +# Buliding & installing - $ git clone https://github.com/dhs-shine/litmus - -1. Build a deb package with debuild +Clone this project - $ cd litmus + $ git clone https://github.com/dhs-shine/litmus - $ debuild +Build a deb package with debuild -2. Install the deb package by using dpkg + $ cd litmus + $ debuild - $ cd .. - - $ sudo dpkg -i litmus_0.3.4-1_amd64.deb +Install the deb package by using dpkg + + $ cd .. + $ sudo dpkg -i litmus_0.3.5-1_amd64.deb Getting started --------------- -1. Create a litmus project: +Create a litmus project: - $ litmus mk [project_name] + $ litmus mk [project_name] -2. Modify [project_path]/userscript.py and [project_path]/conf.yaml +Modify [project_path]/userscript.py and [project_path]/conf.yaml -3. Run the litmus project +Run the litmus project - $ litmus run [project_name] + $ litmus run [project_name] Please refer to litmus wiki for more details. - -https://github.com/dhs-shine/litmus/wiki - -https://wiki.tizen.org/wiki/Litmus + https://github.com/dhs-shine/litmus/wiki + https://wiki.tizen.org/wiki/Litmus diff --git a/debian/changelog b/debian/changelog index bda0fa9..84dca2b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,12 @@ +litmus (0.3.5-1) unstable; urgency=low + + * Create a working directory if it does not exist (for -d option) + + -- Donghoon Shin <dhs.shin@samsung.com> Thu, 1 Feb 2017 09:17:00 +0900 + litmus (0.3.4-1) unstable; urgency=low * Update flash method for tw1 to skip passing parameter 'flasher' - * Change private function _sdb_root_on to public function sdb_root_on -- Donghoon Shin <dhs.shin@samsung.com> Fri, 21 Oct 2016 11:36:00 +0900 diff --git a/debian/docs b/debian/docs index a18c7d9..b43bf86 100644 --- a/debian/docs +++ b/debian/docs @@ -1,2 +1 @@ -CHANGES.txt README.md diff --git a/litmus/__init__.py b/litmus/__init__.py index 9f1fca6..c3e61e5 100644 --- a/litmus/__init__.py +++ b/litmus/__init__.py @@ -14,7 +14,7 @@ # limitations under the License. import os -__version__ = '0.3.4' +__version__ = '0.3.5' _homedir_ = os.path.expanduser('~') _confdir_ = os.path.join(_homedir_, '.litmus') _duts_ = os.path.join(_confdir_, 'topology') diff --git a/litmus/cmds/__init__.py b/litmus/cmds/__init__.py index 4852a96..6fa3183 100644 --- a/litmus/cmds/__init__.py +++ b/litmus/cmds/__init__.py @@ -14,6 +14,7 @@ # limitations under the License. from configparser import RawConfigParser +from litmus.core.util import call def load_project_list(projects): @@ -27,3 +28,11 @@ def load_project_list(projects): item['name'] = section project_list.append(item) return project_list + +def sdb_does_exist(): + help_url = 'https://github.com/dhs-shine/litmus#prerequisite' + try: + call('sdb version', timeout=10) + except FileNotFoundError: + raise Exception('Please install sdb. Refer to {}'.format(help_url)) + return diff --git a/litmus/cmds/cmd_adhoc.py b/litmus/cmds/cmd_adhoc.py index a1de8e6..46dd1c3 100755 --- a/litmus/cmds/cmd_adhoc.py +++ b/litmus/cmds/cmd_adhoc.py @@ -16,10 +16,12 @@ import os import sys from litmus.core.util import call +from litmus.cmd import sdb_does_exist def main(args): """docstring for main""" + sdb_does_exist() project_path = os.path.abspath(args.project_path) sys.path.append(project_path) diff --git a/litmus/cmds/cmd_run.py b/litmus/cmds/cmd_run.py index 6332d6f..fd01765 100755 --- a/litmus/cmds/cmd_run.py +++ b/litmus/cmds/cmd_run.py @@ -14,11 +14,12 @@ # limitations under the License. import sys -from litmus.cmds import load_project_list +from litmus.cmds import load_project_list, sdb_does_exist def main(args): """docstring for main""" + sdb_does_exist() prj_list = load_project_list(args.projects) project = next((prj for prj in prj_list if prj['name'] == args.project), None) diff --git a/litmus/core/manager.py b/litmus/core/manager.py index 1de68aa..15f21cb 100644 --- a/litmus/core/manager.py +++ b/litmus/core/manager.py @@ -277,6 +277,8 @@ Lightweight test manager for tizen automated testing try: self._backup_cwd = os.getcwd() if self._workingdir: + if not os.path.exists(self._workingdir): + os.mkdir(self._workingdir) os.chdir(self._workingdir) else: workingdir_name = str((hashlib.sha1(str(datetime.now()) diff --git a/litmus/helper/helper.py b/litmus/helper/helper.py index 0b4eac3..8a965cb 100644 --- a/litmus/helper/helper.py +++ b/litmus/helper/helper.py @@ -141,41 +141,11 @@ def tizen_snapshot_downloader(url, pattern_bin='tar.gz$', return filenames -def install_plugin(dut, script, waiting=5, timeout=180): - """ - Install tizen plugins on device. - This helper function turn on device and turn off device automatically. - - :param device dut: device instance - :param str script: script path to install plugins on device - :param float waiting: wait time before installing plugins - :param float timeout: timeout - - Example: - >>> from litmus.helper.helper import install_plugin - >>> install_plugin(dut, - script='install-set/setup') - """ - logging.debug('================Install plugins=================') - dut.on() - - script_path = '/'.join(script.split('/')[:-1]) - script_name = script.split('/')[-1] - - call('cp -R {0}/* .'.format(script_path), shell=True) - - time.sleep(waiting) - - call('sh {0} {1}'.format(script_name, dut.get_id()).split(), - timeout=timeout) - - dut.off() - - import tempfile import shutil from subprocess import DEVNULL + def install_plugin_from_git(dut, url, branch, script, waiting=5, timeout=180, commitid=None): """ diff --git a/litmus/templates/artik10/conf.yaml b/litmus/templates/artik10/conf_iot.yaml index 5b81875..5b81875 100644 --- a/litmus/templates/artik10/conf.yaml +++ b/litmus/templates/artik10/conf_iot.yaml diff --git a/litmus/templates/artik10/misc/autoinput b/litmus/templates/artik10/misc/autoinput Binary files differdeleted file mode 100755 index 88d78e3..0000000 --- a/litmus/templates/artik10/misc/autoinput +++ /dev/null diff --git a/litmus/templates/artik10/misc/getevent b/litmus/templates/artik10/misc/getevent Binary files differdeleted file mode 100755 index 66e2c2a..0000000 --- a/litmus/templates/artik10/misc/getevent +++ /dev/null diff --git a/litmus/templates/artik10/tc.yaml b/litmus/templates/artik10/tc_iot.yaml index abaa181..abaa181 100644 --- a/litmus/templates/artik10/tc.yaml +++ b/litmus/templates/artik10/tc_iot.yaml diff --git a/litmus/templates/artik10/userscript.py b/litmus/templates/artik10/userscript.py index be6c41a..a4636fb 100755 --- a/litmus/templates/artik10/userscript.py +++ b/litmus/templates/artik10/userscript.py @@ -16,7 +16,7 @@ def main(*args, **kwargs): mgr.init_workingdir() # get projectinfo - project_info = load_yaml('conf.yaml') + project_info = load_yaml('conf_iot.yaml') username = project_info['username'] password = project_info['password'] @@ -24,6 +24,9 @@ def main(*args, **kwargs): plugin_info = project_info['plugin_info'] # get version from parameter + # ex) 20160923.3 + # you can customize params from litmus (adhoc|run) -p option + # Nth arg : kwargs['param'][N] try: version = kwargs['param'][0] except (IndexError, TypeError): @@ -38,6 +41,13 @@ def main(*args, **kwargs): version=version)) # get an available device for testing. + # Please set up topology before acquiring device. + # Example) + # ~/.litmus/topology + # [ARTIK10_001] + # dev_type = artik10 + # uart_port = /dev/ttyUSB0 + dut = mgr.acquire_dut('artik10', max_retry_times=180) # flashing binaries to device. @@ -56,7 +66,7 @@ def main(*args, **kwargs): if not os.path.exists('result'): os.mkdir('result') - testcases = load_yaml('tc.yaml') + testcases = load_yaml('tc_iot.yaml') add_test_helper(dut, testcases) dut.run_tests() diff --git a/litmus/templates/artik5/conf.yaml b/litmus/templates/artik5/conf_iot.yaml index 7e90ffe..7e90ffe 100644 --- a/litmus/templates/artik5/conf.yaml +++ b/litmus/templates/artik5/conf_iot.yaml diff --git a/litmus/templates/artik5/misc/autoinput b/litmus/templates/artik5/misc/autoinput Binary files differdeleted file mode 100755 index 88d78e3..0000000 --- a/litmus/templates/artik5/misc/autoinput +++ /dev/null diff --git a/litmus/templates/artik5/misc/getevent b/litmus/templates/artik5/misc/getevent Binary files differdeleted file mode 100755 index 66e2c2a..0000000 --- a/litmus/templates/artik5/misc/getevent +++ /dev/null diff --git a/litmus/templates/artik5/tc.yaml b/litmus/templates/artik5/tc_iot.yaml index abaa181..abaa181 100644 --- a/litmus/templates/artik5/tc.yaml +++ b/litmus/templates/artik5/tc_iot.yaml diff --git a/litmus/templates/artik5/userscript.py b/litmus/templates/artik5/userscript.py index ccfb88e..fb7f9c1 100755 --- a/litmus/templates/artik5/userscript.py +++ b/litmus/templates/artik5/userscript.py @@ -16,7 +16,7 @@ def main(*args, **kwargs): mgr.init_workingdir() # get projectinfo - project_info = load_yaml('conf.yaml') + project_info = load_yaml('conf_iot.yaml') username = project_info['username'] password = project_info['password'] @@ -24,6 +24,9 @@ def main(*args, **kwargs): plugin_info = project_info['plugin_info'] # get version from parameter + # ex) 20160923.3 + # you can customize params from litmus (adhoc|run) -p option + # Nth arg : kwargs['param'][N] try: version = kwargs['param'][0] except (IndexError, TypeError): @@ -38,6 +41,13 @@ def main(*args, **kwargs): version=version)) # get an available device for testing. + # Please set up topology before acquiring device. + # Example) + # ~/.litmus/topology + # [ARTIK5_001] + # dev_type = artik5 + # uart_port = /dev/ttyUSB0 + dut = mgr.acquire_dut('artik5', max_retry_times=180) # flashing binaries to device. @@ -56,7 +66,7 @@ def main(*args, **kwargs): if not os.path.exists('result'): os.mkdir('result') - testcases = load_yaml('tc.yaml') + testcases = load_yaml('tc_iot.yaml') add_test_helper(dut, testcases) dut.run_tests() diff --git a/litmus/templates/standalone_tm1/conf_mobile.yaml b/litmus/templates/standalone_tm1/conf_mobile.yaml index 072e0d7..2530c5c 100644 --- a/litmus/templates/standalone_tm1/conf_mobile.yaml +++ b/litmus/templates/standalone_tm1/conf_mobile.yaml @@ -1,4 +1,4 @@ binary_urls: - - http://download.tizen.org/snapshots/tizen/mobile/latest/images/target-TM1/mobile-wayland-armv7l-tm1/ + - http://download.tizen.org/snapshots/tizen/mobile/latest/images/target-TM1/mobile-wayland-armv7l-tm1/ username: <username> password: <password> diff --git a/litmus/templates/standalone_tm1/conf_tv.yaml b/litmus/templates/standalone_tm1/conf_tv.yaml deleted file mode 100644 index 43a1164..0000000 --- a/litmus/templates/standalone_tm1/conf_tv.yaml +++ /dev/null @@ -1,5 +0,0 @@ -binary_urls: - - http://download.tizen.org/snapshots/tizen/tv/latest/images/arm-wayland/tv-boot-armv7l-odroidxu3/ - - http://download.tizen.org/snapshots/tizen/tv/latest/images/arm-wayland/tv-wayland-armv7l-odroidu3/ -username: <username> -password: <password> diff --git a/litmus/templates/standalone_tm1/conf_wearable.yaml b/litmus/templates/standalone_tm1/conf_wearable.yaml deleted file mode 100644 index eb9cbca..0000000 --- a/litmus/templates/standalone_tm1/conf_wearable.yaml +++ /dev/null @@ -1,4 +0,0 @@ -binary_urls: - - http://download.tizen.org/snapshots/tizen/wearable/latest/images/target-circle/wearable-wayland-armv7l-circle/ -username: <username> -password: <password> diff --git a/litmus/templates/standalone_tm1/tc_wearable.yaml b/litmus/templates/standalone_tm1/tc_wearable.yaml deleted file mode 100644 index f1c099f..0000000 --- a/litmus/templates/standalone_tm1/tc_wearable.yaml +++ /dev/null @@ -1,50 +0,0 @@ -testcases: - - name: verify_process_is_running - from: litmus.helper.tests - result_dir: result - plan: - - name: dbus_is_running - param: dbus - pattern: .*/usr/bin/dbus-daemon.* - - name: enlightenment_is_running - param: enlightenment - pattern: .*/usr/bin/enlightenment.* - - name: sensord_is_running - param: sensord - pattern: .*/usr/bin/sensord.* - - name: deviced_is_running - param: deviced - pattern: .*/usr/bin/deviced.* - - name: pulseaudio_is_running - param: pulseaudio - pattern: .*/usr/bin/pulseaudio.* - - name: sdbd_is_running - param: sdbd - pattern: .*/usr/sbin/sdbd.* - - name: msg-server_is_running - param: msg-server - pattern: .*/usr/bin/msg-server.* - - name: connmand_is_running - param: connmand - pattern: .*/usr/sbin/connmand.* - - name: alarm-server_is_running - param: alarm-server - pattern: .*/usr/bin/alarm-server.* - - name: sound_server_is_running - param: sound_server - pattern: .*/usr/bin/sound_server.* - - name: media-server_is_running - param: media-server - pattern: .*/usr/bin/media-server.* - - name: verify_dmesg - from: litmus.helper.tests - result_dir: result - plan: - - name: panel_is_alive - param: panel - pattern: .*panel is dead.* - - name: verify_wifi_is_working - from: litmus.helper.tests - wifi_apname: setup - wifi_password: - result_dir: result diff --git a/litmus/templates/standalone_tm1/userscript.py b/litmus/templates/standalone_tm1/userscript.py index 0ef6126..267e5dd 100755 --- a/litmus/templates/standalone_tm1/userscript.py +++ b/litmus/templates/standalone_tm1/userscript.py @@ -23,6 +23,8 @@ def main(*args, **kwargs): # get version from parameter # ex) 20160923.3 + # you can customize params from litmus (adhoc|run) -p option + # Nth arg : kwargs['param'][N] try: version = kwargs['param'][0] except (IndexError, TypeError): @@ -37,6 +39,13 @@ def main(*args, **kwargs): version=version)) # get an available device for testing. + # Please set up topology before acquiring device. + # Example) + # ~/.litmus/topology + # [TM1_001] + # dev_type = standalone_tm1 + # serialno = 01234TEST + dut = mgr.acquire_dut('standalone_tm1', max_retry_times=180) # flashing binaries to device. diff --git a/litmus/templates/standalone_tm2/conf_mobile.yaml b/litmus/templates/standalone_tm2/conf_mobile.yaml index 1a6b53d..62b7a52 100644 --- a/litmus/templates/standalone_tm2/conf_mobile.yaml +++ b/litmus/templates/standalone_tm2/conf_mobile.yaml @@ -1,4 +1,4 @@ binary_urls: - - http://download.tizen.org/snapshots/tizen/mobile/latest/images/arm64-wayland/mobile-wayland-arm64-tm2/ + - http://download.tizen.org/snapshots/tizen/mobile/latest/images/arm64-wayland/mobile-wayland-arm64-tm2/ username: <username> password: <password> diff --git a/litmus/templates/standalone_tm2/conf_tv.yaml b/litmus/templates/standalone_tm2/conf_tv.yaml deleted file mode 100644 index 43a1164..0000000 --- a/litmus/templates/standalone_tm2/conf_tv.yaml +++ /dev/null @@ -1,5 +0,0 @@ -binary_urls: - - http://download.tizen.org/snapshots/tizen/tv/latest/images/arm-wayland/tv-boot-armv7l-odroidxu3/ - - http://download.tizen.org/snapshots/tizen/tv/latest/images/arm-wayland/tv-wayland-armv7l-odroidu3/ -username: <username> -password: <password> diff --git a/litmus/templates/standalone_tm2/conf_wearable.yaml b/litmus/templates/standalone_tm2/conf_wearable.yaml deleted file mode 100644 index eb9cbca..0000000 --- a/litmus/templates/standalone_tm2/conf_wearable.yaml +++ /dev/null @@ -1,4 +0,0 @@ -binary_urls: - - http://download.tizen.org/snapshots/tizen/wearable/latest/images/target-circle/wearable-wayland-armv7l-circle/ -username: <username> -password: <password> diff --git a/litmus/templates/standalone_tm2/tc_wearable.yaml b/litmus/templates/standalone_tm2/tc_wearable.yaml deleted file mode 100644 index f1c099f..0000000 --- a/litmus/templates/standalone_tm2/tc_wearable.yaml +++ /dev/null @@ -1,50 +0,0 @@ -testcases: - - name: verify_process_is_running - from: litmus.helper.tests - result_dir: result - plan: - - name: dbus_is_running - param: dbus - pattern: .*/usr/bin/dbus-daemon.* - - name: enlightenment_is_running - param: enlightenment - pattern: .*/usr/bin/enlightenment.* - - name: sensord_is_running - param: sensord - pattern: .*/usr/bin/sensord.* - - name: deviced_is_running - param: deviced - pattern: .*/usr/bin/deviced.* - - name: pulseaudio_is_running - param: pulseaudio - pattern: .*/usr/bin/pulseaudio.* - - name: sdbd_is_running - param: sdbd - pattern: .*/usr/sbin/sdbd.* - - name: msg-server_is_running - param: msg-server - pattern: .*/usr/bin/msg-server.* - - name: connmand_is_running - param: connmand - pattern: .*/usr/sbin/connmand.* - - name: alarm-server_is_running - param: alarm-server - pattern: .*/usr/bin/alarm-server.* - - name: sound_server_is_running - param: sound_server - pattern: .*/usr/bin/sound_server.* - - name: media-server_is_running - param: media-server - pattern: .*/usr/bin/media-server.* - - name: verify_dmesg - from: litmus.helper.tests - result_dir: result - plan: - - name: panel_is_alive - param: panel - pattern: .*panel is dead.* - - name: verify_wifi_is_working - from: litmus.helper.tests - wifi_apname: setup - wifi_password: - result_dir: result diff --git a/litmus/templates/standalone_tm2/userscript.py b/litmus/templates/standalone_tm2/userscript.py index 77a09c1..58b4bbb 100755 --- a/litmus/templates/standalone_tm2/userscript.py +++ b/litmus/templates/standalone_tm2/userscript.py @@ -23,6 +23,8 @@ def main(*args, **kwargs): # get version from parameter # ex) 20160923.3 + # you can customize params from litmus (adhoc|run) -p option + # Nth arg : kwargs['param'][N] try: version = kwargs['param'][0] except (IndexError, TypeError): @@ -37,6 +39,13 @@ def main(*args, **kwargs): version=version)) # get an available device for testing. + # Please set up topology before acquiring device. + # Example) + # ~/.litmus/topology + # [TM2_001] + # dev_type = standalone_tm2 + # serialno = 01234TEST + dut = mgr.acquire_dut('standalone_tm2', max_retry_times=180) # flashing binaries to device. diff --git a/litmus/templates/standalone_tw1/conf_mobile.yaml b/litmus/templates/standalone_tw1/conf_mobile.yaml deleted file mode 100644 index 072e0d7..0000000 --- a/litmus/templates/standalone_tw1/conf_mobile.yaml +++ /dev/null @@ -1,4 +0,0 @@ -binary_urls: - - http://download.tizen.org/snapshots/tizen/mobile/latest/images/target-TM1/mobile-wayland-armv7l-tm1/ -username: <username> -password: <password> diff --git a/litmus/templates/standalone_tw1/conf_tv.yaml b/litmus/templates/standalone_tw1/conf_tv.yaml deleted file mode 100644 index 43a1164..0000000 --- a/litmus/templates/standalone_tw1/conf_tv.yaml +++ /dev/null @@ -1,5 +0,0 @@ -binary_urls: - - http://download.tizen.org/snapshots/tizen/tv/latest/images/arm-wayland/tv-boot-armv7l-odroidxu3/ - - http://download.tizen.org/snapshots/tizen/tv/latest/images/arm-wayland/tv-wayland-armv7l-odroidu3/ -username: <username> -password: <password> diff --git a/litmus/templates/standalone_tw1/conf_wearable.yaml b/litmus/templates/standalone_tw1/conf_wearable.yaml index eb9cbca..4bc27e3 100644 --- a/litmus/templates/standalone_tw1/conf_wearable.yaml +++ b/litmus/templates/standalone_tw1/conf_wearable.yaml @@ -1,4 +1,4 @@ binary_urls: - - http://download.tizen.org/snapshots/tizen/wearable/latest/images/target-circle/wearable-wayland-armv7l-circle/ + - http://download.tizen.org/snapshots/tizen/wearable/latest/images/target-circle/wearable-wayland-armv7l-circle/ username: <username> password: <password> diff --git a/litmus/templates/standalone_tw1/tc_mobile.yaml b/litmus/templates/standalone_tw1/tc_mobile.yaml deleted file mode 100644 index 7932170..0000000 --- a/litmus/templates/standalone_tw1/tc_mobile.yaml +++ /dev/null @@ -1,50 +0,0 @@ -testcases: - - name: verify_process_is_running - from: litmus.helper.tests - result_dir: result - plan: - - name: dbus_is_running - param: dbus - pattern: .*/usr/bin/dbus-daemon.* - - name: enlightenment_is_running - param: enlightenment - pattern: .*/usr/bin/enlightenment.* - - name: sensord_is_running - param: sensord - pattern: .*/usr/bin/sensord.* - - name: deviced_is_running - param: deviced - pattern: .*/usr/bin/deviced.* - - name: pulseaudio_is_running - param: pulseaudio - pattern: .*/usr/bin/pulseaudio.* - - name: sdbd_is_running - param: sdbd - pattern: .*/usr/sbin/sdbd.* - - name: msg-server_is_running - param: msg-server - pattern: .*/usr/bin/msg-server.* - - name: connmand_is_running - param: connmand - pattern: .*/usr/sbin/connmand.* - - name: callmgrd_is_running - param: callmgrd - pattern: .*/usr/bin/callmgrd.* - - name: alarm-server_is_running - param: alarm-server - pattern: .*/usr/bin/alarm-server.* - - name: media-server_is_running - param: media-server - pattern: .*/usr/bin/media-server.* - - name: verify_dmesg - from: litmus.helper.tests - result_dir: result - plan: - - name: panel_is_alive - param: panel - pattern: .*panel is dead.* - - name: verify_wifi_is_working - from: litmus.helper.tests - wifi_apname: setup - wifi_password: - result_dir: result diff --git a/litmus/templates/standalone_tw1/tc_tv.yaml b/litmus/templates/standalone_tw1/tc_tv.yaml deleted file mode 100644 index 44ed8a2..0000000 --- a/litmus/templates/standalone_tw1/tc_tv.yaml +++ /dev/null @@ -1,23 +0,0 @@ -testcases: - - name: verify_process_is_running - from: litmus.helper.tests - result_dir: result - plan: - - name: enlightenment_is_running - param: enlightenment - pattern: .*/usr/bin/enlightenment.* - - name: deviced_is_running - param: deviced - pattern: .*/usr/bin/deviced.* - - name: pulseaudio_is_running - param: pulseaudio - pattern: .*/usr/bin/pulseaudio.* - - name: sdbd_is_running - param: sdbd - pattern: .*/usr/sbin/sdbd.* - - name: alarm-server_is_running - param: alarm-server - pattern: .*/usr/bin/alarm-server.* - - name: media-server_is_running - param: media-server - pattern: .*/usr/bin/media-server.* diff --git a/litmus/templates/standalone_tw1/userscript.py b/litmus/templates/standalone_tw1/userscript.py index e20d6dc..203720c 100755 --- a/litmus/templates/standalone_tw1/userscript.py +++ b/litmus/templates/standalone_tw1/userscript.py @@ -23,6 +23,8 @@ def main(*args, **kwargs): # get version from parameter # ex) 20160923.3 + # you can customize params from litmus (adhoc|run) -p option + # Nth arg : kwargs['param'][N] try: version = kwargs['param'][0] except (IndexError, TypeError): @@ -37,6 +39,13 @@ def main(*args, **kwargs): version=version)) # get an available device for testing. + # Please set up topology before acquiring device. + # Example) + # ~/.litmus/topology + # [TW1_001] + # dev_type = standalone_tw1 + # serialno = 01234TEST + dut = mgr.acquire_dut('standalone_tw1', max_retry_times=180) # flashing binaries to device. diff --git a/litmus/templates/standalone_u3/conf_mobile.yaml b/litmus/templates/standalone_u3/conf_mobile.yaml deleted file mode 100644 index 072e0d7..0000000 --- a/litmus/templates/standalone_u3/conf_mobile.yaml +++ /dev/null @@ -1,4 +0,0 @@ -binary_urls: - - http://download.tizen.org/snapshots/tizen/mobile/latest/images/target-TM1/mobile-wayland-armv7l-tm1/ -username: <username> -password: <password> diff --git a/litmus/templates/standalone_u3/conf_tv.yaml b/litmus/templates/standalone_u3/conf_tv.yaml index 43a1164..ef4322c 100644 --- a/litmus/templates/standalone_u3/conf_tv.yaml +++ b/litmus/templates/standalone_u3/conf_tv.yaml @@ -1,5 +1,5 @@ binary_urls: - - http://download.tizen.org/snapshots/tizen/tv/latest/images/arm-wayland/tv-boot-armv7l-odroidxu3/ - - http://download.tizen.org/snapshots/tizen/tv/latest/images/arm-wayland/tv-wayland-armv7l-odroidu3/ + - http://download.tizen.org/snapshots/tizen/tv/latest/images/arm-wayland/tv-boot-armv7l-odroidxu3/ + - http://download.tizen.org/snapshots/tizen/tv/latest/images/arm-wayland/tv-wayland-armv7l-odroidu3/ username: <username> password: <password> diff --git a/litmus/templates/standalone_u3/conf_wearable.yaml b/litmus/templates/standalone_u3/conf_wearable.yaml deleted file mode 100644 index eb9cbca..0000000 --- a/litmus/templates/standalone_u3/conf_wearable.yaml +++ /dev/null @@ -1,4 +0,0 @@ -binary_urls: - - http://download.tizen.org/snapshots/tizen/wearable/latest/images/target-circle/wearable-wayland-armv7l-circle/ -username: <username> -password: <password> diff --git a/litmus/templates/standalone_u3/tc_mobile.yaml b/litmus/templates/standalone_u3/tc_mobile.yaml deleted file mode 100644 index 7932170..0000000 --- a/litmus/templates/standalone_u3/tc_mobile.yaml +++ /dev/null @@ -1,50 +0,0 @@ -testcases: - - name: verify_process_is_running - from: litmus.helper.tests - result_dir: result - plan: - - name: dbus_is_running - param: dbus - pattern: .*/usr/bin/dbus-daemon.* - - name: enlightenment_is_running - param: enlightenment - pattern: .*/usr/bin/enlightenment.* - - name: sensord_is_running - param: sensord - pattern: .*/usr/bin/sensord.* - - name: deviced_is_running - param: deviced - pattern: .*/usr/bin/deviced.* - - name: pulseaudio_is_running - param: pulseaudio - pattern: .*/usr/bin/pulseaudio.* - - name: sdbd_is_running - param: sdbd - pattern: .*/usr/sbin/sdbd.* - - name: msg-server_is_running - param: msg-server - pattern: .*/usr/bin/msg-server.* - - name: connmand_is_running - param: connmand - pattern: .*/usr/sbin/connmand.* - - name: callmgrd_is_running - param: callmgrd - pattern: .*/usr/bin/callmgrd.* - - name: alarm-server_is_running - param: alarm-server - pattern: .*/usr/bin/alarm-server.* - - name: media-server_is_running - param: media-server - pattern: .*/usr/bin/media-server.* - - name: verify_dmesg - from: litmus.helper.tests - result_dir: result - plan: - - name: panel_is_alive - param: panel - pattern: .*panel is dead.* - - name: verify_wifi_is_working - from: litmus.helper.tests - wifi_apname: setup - wifi_password: - result_dir: result diff --git a/litmus/templates/standalone_u3/tc_wearable.yaml b/litmus/templates/standalone_u3/tc_wearable.yaml deleted file mode 100644 index f1c099f..0000000 --- a/litmus/templates/standalone_u3/tc_wearable.yaml +++ /dev/null @@ -1,50 +0,0 @@ -testcases: - - name: verify_process_is_running - from: litmus.helper.tests - result_dir: result - plan: - - name: dbus_is_running - param: dbus - pattern: .*/usr/bin/dbus-daemon.* - - name: enlightenment_is_running - param: enlightenment - pattern: .*/usr/bin/enlightenment.* - - name: sensord_is_running - param: sensord - pattern: .*/usr/bin/sensord.* - - name: deviced_is_running - param: deviced - pattern: .*/usr/bin/deviced.* - - name: pulseaudio_is_running - param: pulseaudio - pattern: .*/usr/bin/pulseaudio.* - - name: sdbd_is_running - param: sdbd - pattern: .*/usr/sbin/sdbd.* - - name: msg-server_is_running - param: msg-server - pattern: .*/usr/bin/msg-server.* - - name: connmand_is_running - param: connmand - pattern: .*/usr/sbin/connmand.* - - name: alarm-server_is_running - param: alarm-server - pattern: .*/usr/bin/alarm-server.* - - name: sound_server_is_running - param: sound_server - pattern: .*/usr/bin/sound_server.* - - name: media-server_is_running - param: media-server - pattern: .*/usr/bin/media-server.* - - name: verify_dmesg - from: litmus.helper.tests - result_dir: result - plan: - - name: panel_is_alive - param: panel - pattern: .*panel is dead.* - - name: verify_wifi_is_working - from: litmus.helper.tests - wifi_apname: setup - wifi_password: - result_dir: result diff --git a/litmus/templates/standalone_u3/userscript.py b/litmus/templates/standalone_u3/userscript.py index f577e40..7d2e798 100755 --- a/litmus/templates/standalone_u3/userscript.py +++ b/litmus/templates/standalone_u3/userscript.py @@ -23,6 +23,8 @@ def main(*args, **kwargs): # get version from parameter # ex) 20160923.3 + # you can customize params from litmus (adhoc|run) -p option + # Nth arg : kwargs['param'][N] try: version = kwargs['param'][0] except (IndexError, TypeError): @@ -37,6 +39,13 @@ def main(*args, **kwargs): version=version)) # get an available device for testing. + # Please set up topology before acquiring device. + # Example) + # ~/.litmus/topology + # [U3_001] + # dev_type = standalone_u3 + # serialno = 01234TEST + dut = mgr.acquire_dut('standalone_u3', max_retry_times=180) # flashing binaries to device. diff --git a/litmus/templates/standalone_xu3/conf_mobile.yaml b/litmus/templates/standalone_xu3/conf_mobile.yaml deleted file mode 100644 index 072e0d7..0000000 --- a/litmus/templates/standalone_xu3/conf_mobile.yaml +++ /dev/null @@ -1,4 +0,0 @@ -binary_urls: - - http://download.tizen.org/snapshots/tizen/mobile/latest/images/target-TM1/mobile-wayland-armv7l-tm1/ -username: <username> -password: <password> diff --git a/litmus/templates/standalone_xu3/conf_tv.yaml b/litmus/templates/standalone_xu3/conf_tv.yaml index 43a1164..ef4322c 100644 --- a/litmus/templates/standalone_xu3/conf_tv.yaml +++ b/litmus/templates/standalone_xu3/conf_tv.yaml @@ -1,5 +1,5 @@ binary_urls: - - http://download.tizen.org/snapshots/tizen/tv/latest/images/arm-wayland/tv-boot-armv7l-odroidxu3/ - - http://download.tizen.org/snapshots/tizen/tv/latest/images/arm-wayland/tv-wayland-armv7l-odroidu3/ + - http://download.tizen.org/snapshots/tizen/tv/latest/images/arm-wayland/tv-boot-armv7l-odroidxu3/ + - http://download.tizen.org/snapshots/tizen/tv/latest/images/arm-wayland/tv-wayland-armv7l-odroidu3/ username: <username> password: <password> diff --git a/litmus/templates/standalone_xu3/conf_wearable.yaml b/litmus/templates/standalone_xu3/conf_wearable.yaml deleted file mode 100644 index eb9cbca..0000000 --- a/litmus/templates/standalone_xu3/conf_wearable.yaml +++ /dev/null @@ -1,4 +0,0 @@ -binary_urls: - - http://download.tizen.org/snapshots/tizen/wearable/latest/images/target-circle/wearable-wayland-armv7l-circle/ -username: <username> -password: <password> diff --git a/litmus/templates/standalone_xu3/tc_mobile.yaml b/litmus/templates/standalone_xu3/tc_mobile.yaml deleted file mode 100644 index 7932170..0000000 --- a/litmus/templates/standalone_xu3/tc_mobile.yaml +++ /dev/null @@ -1,50 +0,0 @@ -testcases: - - name: verify_process_is_running - from: litmus.helper.tests - result_dir: result - plan: - - name: dbus_is_running - param: dbus - pattern: .*/usr/bin/dbus-daemon.* - - name: enlightenment_is_running - param: enlightenment - pattern: .*/usr/bin/enlightenment.* - - name: sensord_is_running - param: sensord - pattern: .*/usr/bin/sensord.* - - name: deviced_is_running - param: deviced - pattern: .*/usr/bin/deviced.* - - name: pulseaudio_is_running - param: pulseaudio - pattern: .*/usr/bin/pulseaudio.* - - name: sdbd_is_running - param: sdbd - pattern: .*/usr/sbin/sdbd.* - - name: msg-server_is_running - param: msg-server - pattern: .*/usr/bin/msg-server.* - - name: connmand_is_running - param: connmand - pattern: .*/usr/sbin/connmand.* - - name: callmgrd_is_running - param: callmgrd - pattern: .*/usr/bin/callmgrd.* - - name: alarm-server_is_running - param: alarm-server - pattern: .*/usr/bin/alarm-server.* - - name: media-server_is_running - param: media-server - pattern: .*/usr/bin/media-server.* - - name: verify_dmesg - from: litmus.helper.tests - result_dir: result - plan: - - name: panel_is_alive - param: panel - pattern: .*panel is dead.* - - name: verify_wifi_is_working - from: litmus.helper.tests - wifi_apname: setup - wifi_password: - result_dir: result diff --git a/litmus/templates/standalone_xu3/tc_wearable.yaml b/litmus/templates/standalone_xu3/tc_wearable.yaml deleted file mode 100644 index f1c099f..0000000 --- a/litmus/templates/standalone_xu3/tc_wearable.yaml +++ /dev/null @@ -1,50 +0,0 @@ -testcases: - - name: verify_process_is_running - from: litmus.helper.tests - result_dir: result - plan: - - name: dbus_is_running - param: dbus - pattern: .*/usr/bin/dbus-daemon.* - - name: enlightenment_is_running - param: enlightenment - pattern: .*/usr/bin/enlightenment.* - - name: sensord_is_running - param: sensord - pattern: .*/usr/bin/sensord.* - - name: deviced_is_running - param: deviced - pattern: .*/usr/bin/deviced.* - - name: pulseaudio_is_running - param: pulseaudio - pattern: .*/usr/bin/pulseaudio.* - - name: sdbd_is_running - param: sdbd - pattern: .*/usr/sbin/sdbd.* - - name: msg-server_is_running - param: msg-server - pattern: .*/usr/bin/msg-server.* - - name: connmand_is_running - param: connmand - pattern: .*/usr/sbin/connmand.* - - name: alarm-server_is_running - param: alarm-server - pattern: .*/usr/bin/alarm-server.* - - name: sound_server_is_running - param: sound_server - pattern: .*/usr/bin/sound_server.* - - name: media-server_is_running - param: media-server - pattern: .*/usr/bin/media-server.* - - name: verify_dmesg - from: litmus.helper.tests - result_dir: result - plan: - - name: panel_is_alive - param: panel - pattern: .*panel is dead.* - - name: verify_wifi_is_working - from: litmus.helper.tests - wifi_apname: setup - wifi_password: - result_dir: result diff --git a/litmus/templates/standalone_xu3/userscript.py b/litmus/templates/standalone_xu3/userscript.py index d19dc35..3fa8568 100755 --- a/litmus/templates/standalone_xu3/userscript.py +++ b/litmus/templates/standalone_xu3/userscript.py @@ -23,6 +23,8 @@ def main(*args, **kwargs): # get version from parameter # ex) 20160923.3 + # you can customize params from litmus (adhoc|run) -p option + # Nth arg : kwargs['param'][N] try: version = kwargs['param'][0] except (IndexError, TypeError): @@ -37,6 +39,13 @@ def main(*args, **kwargs): version=version)) # get an available device for testing. + # Please set up topology before acquiring device. + # Example) + # ~/.litmus/topology + # [XU3_001] + # dev_type = standalone_xu3 + # serialno = 01234TEST + dut = mgr.acquire_dut('standalone_xu3', max_retry_times=180) # flashing binaries to device. diff --git a/litmus/templates/u3/conf.yaml b/litmus/templates/u3/conf.yaml deleted file mode 100644 index 9a76742..0000000 --- a/litmus/templates/u3/conf.yaml +++ /dev/null @@ -1,5 +0,0 @@ -binary_urls: - - http://download.tizen.org/snapshots/tizen/tv/latest/images/arm-wayland/tv-wayland-armv7l-odroidu3/ - - http://download.tizen.org/snapshots/tizen/tv/latest/images/arm-wayland/tv-boot-armv7l-odroidu3/ -username: <username> -password: <password> diff --git a/litmus/templates/u3/conf_tv.yaml b/litmus/templates/u3/conf_tv.yaml new file mode 100644 index 0000000..284b50f --- /dev/null +++ b/litmus/templates/u3/conf_tv.yaml @@ -0,0 +1,5 @@ +binary_urls: + - http://download.tizen.org/snapshots/tizen/tv/latest/images/arm-wayland/tv-wayland-armv7l-odroidu3/ + - http://download.tizen.org/snapshots/tizen/tv/latest/images/arm-wayland/tv-boot-armv7l-odroidu3/ +username: <username> +password: <password> diff --git a/litmus/templates/u3/tc.yaml b/litmus/templates/u3/tc.yaml deleted file mode 100644 index 44ed8a2..0000000 --- a/litmus/templates/u3/tc.yaml +++ /dev/null @@ -1,23 +0,0 @@ -testcases: - - name: verify_process_is_running - from: litmus.helper.tests - result_dir: result - plan: - - name: enlightenment_is_running - param: enlightenment - pattern: .*/usr/bin/enlightenment.* - - name: deviced_is_running - param: deviced - pattern: .*/usr/bin/deviced.* - - name: pulseaudio_is_running - param: pulseaudio - pattern: .*/usr/bin/pulseaudio.* - - name: sdbd_is_running - param: sdbd - pattern: .*/usr/sbin/sdbd.* - - name: alarm-server_is_running - param: alarm-server - pattern: .*/usr/bin/alarm-server.* - - name: media-server_is_running - param: media-server - pattern: .*/usr/bin/media-server.* diff --git a/litmus/templates/standalone_tm1/tc_tv.yaml b/litmus/templates/u3/tc_tv.yaml index 44ed8a2..44ed8a2 100644 --- a/litmus/templates/standalone_tm1/tc_tv.yaml +++ b/litmus/templates/u3/tc_tv.yaml diff --git a/litmus/templates/u3/userscript.py b/litmus/templates/u3/userscript.py index a965801..f14f3e6 100755 --- a/litmus/templates/u3/userscript.py +++ b/litmus/templates/u3/userscript.py @@ -15,13 +15,16 @@ def main(*args, **kwargs): mgr.init_workingdir() # get projectinfo - project_info = load_yaml('conf.yaml') + project_info = load_yaml('conf_tv.yaml') username = project_info['username'] password = project_info['password'] binary_urls = project_info['binary_urls'] # get version from parameter + # ex) 20160923.3 + # you can customize params from litmus (adhoc|run) -p option + # Nth arg : kwargs['param'][N] try: version = kwargs['param'][0] except (IndexError, TypeError): @@ -48,7 +51,7 @@ def main(*args, **kwargs): if not os.path.exists('result'): os.mkdir('result') - testcases = load_yaml('tc.yaml') + testcases = load_yaml('tc_tv.yaml') add_test_helper(dut, testcases) dut.run_tests() diff --git a/litmus/templates/xu3/conf.yaml b/litmus/templates/xu3/conf_tv.yaml index b218ccd..b218ccd 100644 --- a/litmus/templates/xu3/conf.yaml +++ b/litmus/templates/xu3/conf_tv.yaml diff --git a/litmus/templates/xu3/tc.yaml b/litmus/templates/xu3/tc.yaml deleted file mode 100644 index 44ed8a2..0000000 --- a/litmus/templates/xu3/tc.yaml +++ /dev/null @@ -1,23 +0,0 @@ -testcases: - - name: verify_process_is_running - from: litmus.helper.tests - result_dir: result - plan: - - name: enlightenment_is_running - param: enlightenment - pattern: .*/usr/bin/enlightenment.* - - name: deviced_is_running - param: deviced - pattern: .*/usr/bin/deviced.* - - name: pulseaudio_is_running - param: pulseaudio - pattern: .*/usr/bin/pulseaudio.* - - name: sdbd_is_running - param: sdbd - pattern: .*/usr/sbin/sdbd.* - - name: alarm-server_is_running - param: alarm-server - pattern: .*/usr/bin/alarm-server.* - - name: media-server_is_running - param: media-server - pattern: .*/usr/bin/media-server.* diff --git a/litmus/templates/standalone_tm2/tc_tv.yaml b/litmus/templates/xu3/tc_tv.yaml index 44ed8a2..44ed8a2 100644 --- a/litmus/templates/standalone_tm2/tc_tv.yaml +++ b/litmus/templates/xu3/tc_tv.yaml diff --git a/litmus/templates/xu3/userscript.py b/litmus/templates/xu3/userscript.py index 3723505..cd06c9d 100755 --- a/litmus/templates/xu3/userscript.py +++ b/litmus/templates/xu3/userscript.py @@ -15,13 +15,16 @@ def main(*args, **kwargs): mgr.init_workingdir() # get projectinfo - project_info = load_yaml('conf.yaml') + project_info = load_yaml('conf_tv.yaml') username = project_info['username'] password = project_info['password'] binary_urls = project_info['binary_urls'] # get version from parameter + # ex) 20160923.3 + # you can customize params from litmus (adhoc|run) -p option + # Nth arg : kwargs['param'][N] try: version = kwargs['param'][0] except (IndexError, TypeError): @@ -48,7 +51,7 @@ def main(*args, **kwargs): if not os.path.exists('result'): os.mkdir('result') - testcases = load_yaml('tc.yaml') + testcases = load_yaml('tc_tv.yaml') add_test_helper(dut, testcases) dut.run_tests() diff --git a/tools/litmus b/tools/litmus index 87b2238..5c7b31d 100644 --- a/tools/litmus +++ b/tools/litmus @@ -15,21 +15,18 @@ import os import sys -import signal import functools import logging import traceback -from argparse import ArgumentParser, RawTextHelpFormatter -from litmus import __version__, _path_for_locks_, _duts_, _projects_, _confdir_ +from argparse import (ArgumentParser, + RawTextHelpFormatter) +from litmus import (__version__, + _path_for_locks_, + _duts_, _projects_, + _confdir_) from litmus.core.util import init_logger -#def sigterm_handler(signal, frame): -# """docstring for sigterm_handler""" -# raise Exception('SIGTERM') -# sys.exit(1) - - def subparser(func): """docstring for subparser""" @functools.wraps(func) @@ -47,7 +44,13 @@ def subparser(func): @subparser def adhoc_parser(parser): - """run a adhoc script + """run litmus project which is not imported. + + This will help you to run test project with Continous Integration systems. + If you use seperated worker node for testing, just copy litmus project to + worker node and use this command. If not, you have to import litmus project + on worker node before run it. + Examples: $ litmus adhoc <project_path> """ @@ -61,7 +64,12 @@ def adhoc_parser(parser): @subparser def mk_parser(parser): - """make a new litmus project + """make new litmus project + + This will create a new directory and copy default templates. + You can locate more files and test scripts under this project directory + and run your own test script with project name. + Examples: $ litmus mk <project_name> """ @@ -73,7 +81,12 @@ def mk_parser(parser): @subparser def rm_parser(parser): - """remove a litmus project + """remove litmus project + + This will remove both of your litmus project and project directory from + your host. WARNING: You can not recover your test project sources after + run this command. + Examples: $ litmus rm <project_name> """ @@ -83,7 +96,15 @@ def rm_parser(parser): @subparser def run_parser(parser): - """run a litmus project + """run litmus project + + This will run your litmus project. Project entry point is userscript.py in + your project directory. You can pass argument to project with -p option. + You can also set working directory with -d option. If you don't set working + directory then litmus creates a temporary directory under /tmp and run test + on it, and remove it if test has done. hence you have to use -d option + if you want to keep test result. + Examples: $ litmus run <project_name> """ @@ -98,6 +119,11 @@ def run_parser(parser): @subparser def ls_parser(parser): """list all litmus projects + + This will list all litmus projects. Default project list locate under + ~/.litmus/projects. If you want to use your custom project list then use + - p option with main command. + Examples: $ litmus ls """ @@ -107,6 +133,14 @@ def ls_parser(parser): @subparser def dev_parser(parser): """list all devices from topology configuration + + If you want to run test with real device, you have to configure topology. + Default topology file path is ~/.litmus/topology. + Topology file example for standalone_tm1 is + [TM1_001] + dev_type = standalone_tm1 + serialno = 012345678 + Examples: $ litmus dev """ @@ -115,7 +149,14 @@ def dev_parser(parser): @subparser def gt_parser(parser): - """generate a topology configuration + """generate topology configuration + + This is a helper to generate topology configuration for non-standalone + devices. non-standalone device means that device is controlled by external + uart and power supply. xu3 and u3 device types are non-standard device. + This will find proper uart port and power supply node from your system. + Do not run this command if you use standalone type devices. + Examples: $ litmus gt """ @@ -124,7 +165,12 @@ def gt_parser(parser): @subparser def cp_parser(parser): - """copy a litmus project + """copy litmus project + + This will create new litmus project from existed one. New project has + duplicated project directory from origin project and does not use default + template. If you need duplicated project from old one, this will be useful. + Examples: $ litmus cp <origin project name> <new project name> """ @@ -136,7 +182,11 @@ def cp_parser(parser): @subparser def imp_parser(parser): - """import a litmus project + """import litmus project + + You sometimes need to run litmus project authored by others. This command + will import project and you can use run subcommand after import it. + Examples: $ litmus imp <project name> """ @@ -224,7 +274,6 @@ if __name__ == '__main__': init_logger() init_lockdir() init_confdir() - #signal.signal(signal.SIGTERM, sigterm_handler) sys.exit(main(sys.argv)) except KeyboardInterrupt: raise Exception('KeyboardInterrupt') |