Sync up upstream 10/112610/1
authorDonghoon Shin <dhs.shin@samsung.com>
Thu, 2 Feb 2017 03:47:48 +0000 (12:47 +0900)
committerDonghoon Shin <dhs.shin@samsung.com>
Thu, 2 Feb 2017 03:47:48 +0000 (12:47 +0900)
Change-Id: I765a5f675b9744a68b395a8bac301e9412abf12a

59 files changed:
CHANGES.txt [deleted file]
MANIFEST.in
README.md
debian/changelog
debian/docs
litmus/__init__.py
litmus/cmds/__init__.py
litmus/cmds/cmd_adhoc.py
litmus/cmds/cmd_run.py
litmus/core/manager.py
litmus/helper/helper.py
litmus/templates/artik10/conf_iot.yaml [moved from litmus/templates/artik10/conf.yaml with 100% similarity]
litmus/templates/artik10/misc/autoinput [deleted file]
litmus/templates/artik10/misc/getevent [deleted file]
litmus/templates/artik10/tc_iot.yaml [moved from litmus/templates/artik5/tc.yaml with 100% similarity]
litmus/templates/artik10/userscript.py
litmus/templates/artik5/conf_iot.yaml [moved from litmus/templates/artik5/conf.yaml with 100% similarity]
litmus/templates/artik5/misc/autoinput [deleted file]
litmus/templates/artik5/misc/getevent [deleted file]
litmus/templates/artik5/tc_iot.yaml [moved from litmus/templates/artik10/tc.yaml with 100% similarity]
litmus/templates/artik5/userscript.py
litmus/templates/standalone_tm1/conf_mobile.yaml
litmus/templates/standalone_tm1/conf_tv.yaml [deleted file]
litmus/templates/standalone_tm1/conf_wearable.yaml [deleted file]
litmus/templates/standalone_tm1/tc_tv.yaml [deleted file]
litmus/templates/standalone_tm1/tc_wearable.yaml [deleted file]
litmus/templates/standalone_tm1/userscript.py
litmus/templates/standalone_tm2/conf_mobile.yaml
litmus/templates/standalone_tm2/conf_tv.yaml [deleted file]
litmus/templates/standalone_tm2/conf_wearable.yaml [deleted file]
litmus/templates/standalone_tm2/tc_wearable.yaml [deleted file]
litmus/templates/standalone_tm2/userscript.py
litmus/templates/standalone_tw1/conf_mobile.yaml [deleted file]
litmus/templates/standalone_tw1/conf_tv.yaml [deleted file]
litmus/templates/standalone_tw1/conf_wearable.yaml
litmus/templates/standalone_tw1/tc_mobile.yaml [deleted file]
litmus/templates/standalone_tw1/userscript.py
litmus/templates/standalone_u3/conf_mobile.yaml [deleted file]
litmus/templates/standalone_u3/conf_tv.yaml
litmus/templates/standalone_u3/conf_wearable.yaml [deleted file]
litmus/templates/standalone_u3/tc_mobile.yaml [deleted file]
litmus/templates/standalone_u3/tc_wearable.yaml [deleted file]
litmus/templates/standalone_u3/userscript.py
litmus/templates/standalone_xu3/conf_mobile.yaml [deleted file]
litmus/templates/standalone_xu3/conf_tv.yaml
litmus/templates/standalone_xu3/conf_wearable.yaml [deleted file]
litmus/templates/standalone_xu3/tc_mobile.yaml [deleted file]
litmus/templates/standalone_xu3/tc_wearable.yaml [deleted file]
litmus/templates/standalone_xu3/userscript.py
litmus/templates/u3/conf.yaml [deleted file]
litmus/templates/u3/conf_tv.yaml [new file with mode: 0644]
litmus/templates/u3/tc.yaml [deleted file]
litmus/templates/u3/tc_tv.yaml [moved from litmus/templates/standalone_tw1/tc_tv.yaml with 100% similarity]
litmus/templates/u3/userscript.py
litmus/templates/xu3/conf_tv.yaml [moved from litmus/templates/xu3/conf.yaml with 100% similarity]
litmus/templates/xu3/tc.yaml [deleted file]
litmus/templates/xu3/tc_tv.yaml [moved from litmus/templates/standalone_tm2/tc_tv.yaml with 100% similarity]
litmus/templates/xu3/userscript.py
tools/litmus

diff --git a/CHANGES.txt b/CHANGES.txt
deleted file mode 100644 (file)
index d928568..0000000
+++ /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
index 07fcd5a..a9648a1 100644 (file)
@@ -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 *
index 9c7bd31..3c58688 100644 (file)
--- a/README.md
+++ b/README.md
@@ -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
index bda0fa9..84dca2b 100644 (file)
@@ -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
 
index a18c7d9..b43bf86 100644 (file)
@@ -1,2 +1 @@
-CHANGES.txt
 README.md
index 9f1fca6..c3e61e5 100644 (file)
@@ -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')
index 4852a96..6fa3183 100644 (file)
@@ -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
index a1de8e6..46dd1c3 100755 (executable)
 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)
 
index 6332d6f..fd01765 100755 (executable)
 # 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)
index 1de68aa..15f21cb 100644 (file)
@@ -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())
index 0b4eac3..8a965cb 100644 (file)
@@ -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/misc/autoinput b/litmus/templates/artik10/misc/autoinput
deleted file mode 100755 (executable)
index 88d78e3..0000000
Binary files a/litmus/templates/artik10/misc/autoinput and /dev/null differ
diff --git a/litmus/templates/artik10/misc/getevent b/litmus/templates/artik10/misc/getevent
deleted file mode 100755 (executable)
index 66e2c2a..0000000
Binary files a/litmus/templates/artik10/misc/getevent and /dev/null differ
index be6c41a..a4636fb 100755 (executable)
@@ -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/misc/autoinput b/litmus/templates/artik5/misc/autoinput
deleted file mode 100755 (executable)
index 88d78e3..0000000
Binary files a/litmus/templates/artik5/misc/autoinput and /dev/null differ
diff --git a/litmus/templates/artik5/misc/getevent b/litmus/templates/artik5/misc/getevent
deleted file mode 100755 (executable)
index 66e2c2a..0000000
Binary files a/litmus/templates/artik5/misc/getevent and /dev/null differ
index ccfb88e..fb7f9c1 100755 (executable)
@@ -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()
 
index 072e0d7..2530c5c 100644 (file)
@@ -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 (file)
index 43a1164..0000000
+++ /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 (file)
index eb9cbca..0000000
+++ /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_tv.yaml b/litmus/templates/standalone_tm1/tc_tv.yaml
deleted file mode 100644 (file)
index 44ed8a2..0000000
+++ /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_wearable.yaml b/litmus/templates/standalone_tm1/tc_wearable.yaml
deleted file mode 100644 (file)
index f1c099f..0000000
+++ /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
index 0ef6126..267e5dd 100755 (executable)
@@ -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.
index 1a6b53d..62b7a52 100644 (file)
@@ -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 (file)
index 43a1164..0000000
+++ /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 (file)
index eb9cbca..0000000
+++ /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 (file)
index f1c099f..0000000
+++ /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
index 77a09c1..58b4bbb 100755 (executable)
@@ -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 (file)
index 072e0d7..0000000
+++ /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 (file)
index 43a1164..0000000
+++ /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>
index eb9cbca..4bc27e3 100644 (file)
@@ -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 (file)
index 7932170..0000000
+++ /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
index e20d6dc..203720c 100755 (executable)
@@ -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 (file)
index 072e0d7..0000000
+++ /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>
index 43a1164..ef4322c 100644 (file)
@@ -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 (file)
index eb9cbca..0000000
+++ /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 (file)
index 7932170..0000000
+++ /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 (file)
index f1c099f..0000000
+++ /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
index f577e40..7d2e798 100755 (executable)
@@ -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 (file)
index 072e0d7..0000000
+++ /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>
index 43a1164..ef4322c 100644 (file)
@@ -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 (file)
index eb9cbca..0000000
+++ /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 (file)
index 7932170..0000000
+++ /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 (file)
index f1c099f..0000000
+++ /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
index d19dc35..3fa8568 100755 (executable)
@@ -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 (file)
index 9a76742..0000000
+++ /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 (file)
index 0000000..284b50f
--- /dev/null
@@ -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 (file)
index 44ed8a2..0000000
+++ /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.*
index a965801..f14f3e6 100755 (executable)
@@ -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/tc.yaml b/litmus/templates/xu3/tc.yaml
deleted file mode 100644 (file)
index 44ed8a2..0000000
+++ /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.*
index 3723505..cd06c9d 100755 (executable)
@@ -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()
 
index 87b2238..5c7b31d 100644 (file)
 
 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')