All of lore.kernel.org
 help / color / mirror / Atom feed
* [Fuego] [PATCH] Add test cases for command of quota.
@ 2018-08-28 11:36 Wang Mingyu
  2018-08-28 11:36 ` [Fuego] [PATCH] Add test cases for command of radiusclient Wang Mingyu
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Wang Mingyu @ 2018-08-28 11:36 UTC (permalink / raw)
  To: fuego

Signed-off-by: Wang Mingyu <wangmy@cn.fujitsu.com>
---
 engine/tests/Functional.quota/fuego_test.sh        | 20 ++++++++++++++++++++
 engine/tests/Functional.quota/parser.py            | 22 ++++++++++++++++++++++
 engine/tests/Functional.quota/quota_test.sh        |  4 ++++
 engine/tests/Functional.quota/spec.json            |  7 +++++++
 engine/tests/Functional.quota/tests/quota_help.sh  | 13 +++++++++++++
 .../Functional.quota/tests/quota_quotastats.sh     | 13 +++++++++++++
 6 files changed, 79 insertions(+)
 create mode 100644 engine/tests/Functional.quota/fuego_test.sh
 create mode 100644 engine/tests/Functional.quota/parser.py
 create mode 100644 engine/tests/Functional.quota/quota_test.sh
 create mode 100644 engine/tests/Functional.quota/spec.json
 create mode 100644 engine/tests/Functional.quota/tests/quota_help.sh
 create mode 100644 engine/tests/Functional.quota/tests/quota_quotastats.sh

diff --git a/engine/tests/Functional.quota/fuego_test.sh b/engine/tests/Functional.quota/fuego_test.sh
new file mode 100644
index 0000000..0fdea2d
--- /dev/null
+++ b/engine/tests/Functional.quota/fuego_test.sh
@@ -0,0 +1,20 @@
+function test_pre_check {
+    is_on_target_path quota PROGRAM_QUOTA
+    assert_define PROGRAM_QUOTA "Missing 'quota' program on target board"
+    is_on_target_path quotastats PROGRAM_QUOTASTATS
+    assert_define PROGRAM_QUOTASTATS "Missing 'quotastats' program on target board"
+}
+
+function test_deploy {
+    put $TEST_HOME/quota_test.sh $BOARD_TESTDIR/fuego.$TESTDIR/
+    put -r $TEST_HOME/tests $BOARD_TESTDIR/fuego.$TESTDIR/
+}
+
+function test_run {
+    report "cd $BOARD_TESTDIR/fuego.$TESTDIR;\
+    sh -v quota_test.sh"
+}
+
+function test_processing {
+    log_compare "$TESTDIR" "0" "TEST-FAIL" "n"
+}
diff --git a/engine/tests/Functional.quota/parser.py b/engine/tests/Functional.quota/parser.py
new file mode 100644
index 0000000..d85abd7
--- /dev/null
+++ b/engine/tests/Functional.quota/parser.py
@@ -0,0 +1,22 @@
+#!/usr/bin/python
+# See common.py for description of command-line arguments
+
+import os, sys, collections
+
+sys.path.insert(0, os.environ['FUEGO_CORE'] + '/engine/scripts/parser')
+import common as plib
+
+measurements = {}
+measurements = collections.OrderedDict()
+
+regex_string = '^ -> (.*): TEST-(.*)$'
+matches = plib.parse_log(regex_string)
+
+if matches:
+    for m in matches:
+        measurements['default.' + m[0]] = 'PASS' if m[1] == 'PASS' else 'FAIL'
+
+# split the output for each testcase
+plib.split_output_per_testcase(regex_string, measurements)
+
+sys.exit(plib.process(measurements))
diff --git a/engine/tests/Functional.quota/quota_test.sh b/engine/tests/Functional.quota/quota_test.sh
new file mode 100644
index 0000000..dd5ce37
--- /dev/null
+++ b/engine/tests/Functional.quota/quota_test.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+for i in tests/*.sh; do
+    sh $i
+done
diff --git a/engine/tests/Functional.quota/spec.json b/engine/tests/Functional.quota/spec.json
new file mode 100644
index 0000000..dd058da
--- /dev/null
+++ b/engine/tests/Functional.quota/spec.json
@@ -0,0 +1,7 @@
+{
+    "testName": "Functional.quota",
+    "specs": {
+        "default": {}
+    }
+}
+
diff --git a/engine/tests/Functional.quota/tests/quota_help.sh b/engine/tests/Functional.quota/tests/quota_help.sh
new file mode 100644
index 0000000..306090e
--- /dev/null
+++ b/engine/tests/Functional.quota/tests/quota_help.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+#  In target, run comannd quota.
+#  option: --help
+
+test="help"
+
+if quota --help 2>&1| grep Usage
+then
+    echo " -> $test: TEST-PASS"
+else
+    echo " -> $test: TEST-FAIL"
+fi;
diff --git a/engine/tests/Functional.quota/tests/quota_quotastats.sh b/engine/tests/Functional.quota/tests/quota_quotastats.sh
new file mode 100644
index 0000000..e44744c
--- /dev/null
+++ b/engine/tests/Functional.quota/tests/quota_quotastats.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+#  In target, run comannd quotastats.
+#  option: --help
+
+test="quotastats"
+
+if quotastats | grep "Kernel quota version"
+then
+    echo " -> $test: TEST-PASS"
+else
+    echo " -> $test: TEST-FAIL"
+fi;
-- 
1.8.3.1




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Fuego] [PATCH] Add test cases for command of radiusclient.
  2018-08-28 11:36 [Fuego] [PATCH] Add test cases for command of quota Wang Mingyu
@ 2018-08-28 11:36 ` Wang Mingyu
  2018-08-28 11:36 ` [Fuego] [PATCH] Add test cases for command dmsetup Wang Mingyu
  2018-08-28 11:36 ` [Fuego] [PATCH] Add test cases for command powertop Wang Mingyu
  2 siblings, 0 replies; 4+ messages in thread
From: Wang Mingyu @ 2018-08-28 11:36 UTC (permalink / raw)
  To: fuego

Signed-off-by: Wang Mingyu <wangmy@cn.fujitsu.com>
---
 engine/tests/Functional.radiusclient/fuego_test.sh | 22 ++++++++++++++++++++++
 engine/tests/Functional.radiusclient/parser.py     | 22 ++++++++++++++++++++++
 .../Functional.radiusclient/radiusclient_test.sh   |  4 ++++
 engine/tests/Functional.radiusclient/spec.json     |  7 +++++++
 .../Functional.radiusclient/tests/radacct_help.sh  | 13 +++++++++++++
 .../Functional.radiusclient/tests/radlogin_help.sh | 13 +++++++++++++
 .../tests/radstatus_help.sh                        | 13 +++++++++++++
 7 files changed, 94 insertions(+)
 create mode 100644 engine/tests/Functional.radiusclient/fuego_test.sh
 create mode 100644 engine/tests/Functional.radiusclient/parser.py
 create mode 100644 engine/tests/Functional.radiusclient/radiusclient_test.sh
 create mode 100644 engine/tests/Functional.radiusclient/spec.json
 create mode 100644 engine/tests/Functional.radiusclient/tests/radacct_help.sh
 create mode 100644 engine/tests/Functional.radiusclient/tests/radlogin_help.sh
 create mode 100644 engine/tests/Functional.radiusclient/tests/radstatus_help.sh

diff --git a/engine/tests/Functional.radiusclient/fuego_test.sh b/engine/tests/Functional.radiusclient/fuego_test.sh
new file mode 100644
index 0000000..f8696a7
--- /dev/null
+++ b/engine/tests/Functional.radiusclient/fuego_test.sh
@@ -0,0 +1,22 @@
+function test_pre_check {
+    is_on_target_path radacct PROGRAM_RADACCT
+    assert_define PROGRAM_RADACCT "Missing 'radacct' program on target board"
+    is_on_target_path radlogin PROGRAM_RADLOGIN
+    assert_define PROGRAM_RADLOGIN "Missing 'radlogin' program on target board"
+    is_on_target_path radstatus PROGRAM_RADSTATUS
+    assert_define PROGRAM_RADSTATUS "Missing 'radstatus' program on target board"
+}
+
+function test_deploy {
+    put $TEST_HOME/radiusclient_test.sh $BOARD_TESTDIR/fuego.$TESTDIR/
+    put -r $TEST_HOME/tests $BOARD_TESTDIR/fuego.$TESTDIR/
+}
+
+function test_run {
+    report "cd $BOARD_TESTDIR/fuego.$TESTDIR;\
+    sh -v radiusclient_test.sh"
+}
+
+function test_processing {
+    log_compare "$TESTDIR" "0" "TEST-FAIL" "n"
+}
diff --git a/engine/tests/Functional.radiusclient/parser.py b/engine/tests/Functional.radiusclient/parser.py
new file mode 100644
index 0000000..d85abd7
--- /dev/null
+++ b/engine/tests/Functional.radiusclient/parser.py
@@ -0,0 +1,22 @@
+#!/usr/bin/python
+# See common.py for description of command-line arguments
+
+import os, sys, collections
+
+sys.path.insert(0, os.environ['FUEGO_CORE'] + '/engine/scripts/parser')
+import common as plib
+
+measurements = {}
+measurements = collections.OrderedDict()
+
+regex_string = '^ -> (.*): TEST-(.*)$'
+matches = plib.parse_log(regex_string)
+
+if matches:
+    for m in matches:
+        measurements['default.' + m[0]] = 'PASS' if m[1] == 'PASS' else 'FAIL'
+
+# split the output for each testcase
+plib.split_output_per_testcase(regex_string, measurements)
+
+sys.exit(plib.process(measurements))
diff --git a/engine/tests/Functional.radiusclient/radiusclient_test.sh b/engine/tests/Functional.radiusclient/radiusclient_test.sh
new file mode 100644
index 0000000..dd5ce37
--- /dev/null
+++ b/engine/tests/Functional.radiusclient/radiusclient_test.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+for i in tests/*.sh; do
+    sh $i
+done
diff --git a/engine/tests/Functional.radiusclient/spec.json b/engine/tests/Functional.radiusclient/spec.json
new file mode 100644
index 0000000..4ab044a
--- /dev/null
+++ b/engine/tests/Functional.radiusclient/spec.json
@@ -0,0 +1,7 @@
+{
+    "testName": "Functional.radiusclient",
+    "specs": {
+        "default": {}
+    }
+}
+
diff --git a/engine/tests/Functional.radiusclient/tests/radacct_help.sh b/engine/tests/Functional.radiusclient/tests/radacct_help.sh
new file mode 100644
index 0000000..e5d53d4
--- /dev/null
+++ b/engine/tests/Functional.radiusclient/tests/radacct_help.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+#  In target, run comannd radacct.
+#  option: -h
+
+test="radacct_help"
+
+if radacct -h 2>&1 | grep Usage
+then
+    echo " -> $test: TEST-PASS"
+else
+    echo " -> $test: TEST-FAIL"
+fi;
diff --git a/engine/tests/Functional.radiusclient/tests/radlogin_help.sh b/engine/tests/Functional.radiusclient/tests/radlogin_help.sh
new file mode 100644
index 0000000..eefdd37
--- /dev/null
+++ b/engine/tests/Functional.radiusclient/tests/radlogin_help.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+#  In target, run comannd radlogin.
+#  option: -h
+
+test="radlogin_help"
+
+if radlogin -h 2>&1 | grep Usage
+then
+    echo " -> $test: TEST-PASS"
+else
+    echo " -> $test: TEST-FAIL"
+fi;
diff --git a/engine/tests/Functional.radiusclient/tests/radstatus_help.sh b/engine/tests/Functional.radiusclient/tests/radstatus_help.sh
new file mode 100644
index 0000000..a9c72cd
--- /dev/null
+++ b/engine/tests/Functional.radiusclient/tests/radstatus_help.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+#  In target, run comannd radstatus.
+#  option: -h
+
+test="radstatus_help"
+
+if radstatus -h 2>&1 | grep Usage
+then
+    echo " -> $test: TEST-PASS"
+else
+    echo " -> $test: TEST-FAIL"
+fi;
-- 
1.8.3.1




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Fuego] [PATCH] Add test cases for command dmsetup.
  2018-08-28 11:36 [Fuego] [PATCH] Add test cases for command of quota Wang Mingyu
  2018-08-28 11:36 ` [Fuego] [PATCH] Add test cases for command of radiusclient Wang Mingyu
@ 2018-08-28 11:36 ` Wang Mingyu
  2018-08-28 11:36 ` [Fuego] [PATCH] Add test cases for command powertop Wang Mingyu
  2 siblings, 0 replies; 4+ messages in thread
From: Wang Mingyu @ 2018-08-28 11:36 UTC (permalink / raw)
  To: fuego

Signed-off-by: Wang Mingyu <wangmy@cn.fujitsu.com>
---
 engine/tests/Functional.dmsetup/dmsetup_test.sh    |  4 ++++
 engine/tests/Functional.dmsetup/fuego_test.sh      | 18 ++++++++++++++++++
 engine/tests/Functional.dmsetup/parser.py          | 22 ++++++++++++++++++++++
 engine/tests/Functional.dmsetup/spec.json          |  7 +++++++
 .../tests/Functional.dmsetup/tests/dmsetup_deps.sh | 13 +++++++++++++
 .../tests/Functional.dmsetup/tests/dmsetup_info.sh | 13 +++++++++++++
 .../tests/Functional.dmsetup/tests/dmsetup_ls.sh   | 13 +++++++++++++
 .../Functional.dmsetup/tests/dmsetup_targets.sh    | 13 +++++++++++++
 .../Functional.dmsetup/tests/dmsetup_version.sh    | 13 +++++++++++++
 9 files changed, 116 insertions(+)
 create mode 100644 engine/tests/Functional.dmsetup/dmsetup_test.sh
 create mode 100644 engine/tests/Functional.dmsetup/fuego_test.sh
 create mode 100644 engine/tests/Functional.dmsetup/parser.py
 create mode 100644 engine/tests/Functional.dmsetup/spec.json
 create mode 100644 engine/tests/Functional.dmsetup/tests/dmsetup_deps.sh
 create mode 100644 engine/tests/Functional.dmsetup/tests/dmsetup_info.sh
 create mode 100644 engine/tests/Functional.dmsetup/tests/dmsetup_ls.sh
 create mode 100644 engine/tests/Functional.dmsetup/tests/dmsetup_targets.sh
 create mode 100644 engine/tests/Functional.dmsetup/tests/dmsetup_version.sh

diff --git a/engine/tests/Functional.dmsetup/dmsetup_test.sh b/engine/tests/Functional.dmsetup/dmsetup_test.sh
new file mode 100644
index 0000000..dd5ce37
--- /dev/null
+++ b/engine/tests/Functional.dmsetup/dmsetup_test.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+for i in tests/*.sh; do
+    sh $i
+done
diff --git a/engine/tests/Functional.dmsetup/fuego_test.sh b/engine/tests/Functional.dmsetup/fuego_test.sh
new file mode 100644
index 0000000..afae75a
--- /dev/null
+++ b/engine/tests/Functional.dmsetup/fuego_test.sh
@@ -0,0 +1,18 @@
+function test_pre_check {
+    is_on_target_path dmsetup PROGRAM_DMSETUP
+    assert_define PROGRAM_DMSETUP "Missing 'dmsetup' program on target board"
+}
+
+function test_deploy {
+    put $TEST_HOME/dmsetup_test.sh $BOARD_TESTDIR/fuego.$TESTDIR/
+    put -r $TEST_HOME/tests $BOARD_TESTDIR/fuego.$TESTDIR/
+}
+
+function test_run {
+    report "cd $BOARD_TESTDIR/fuego.$TESTDIR;\
+    sh -v dmsetup_test.sh"
+}
+
+function test_processing {
+    log_compare "$TESTDIR" "0" "TEST-FAIL" "n"
+}
diff --git a/engine/tests/Functional.dmsetup/parser.py b/engine/tests/Functional.dmsetup/parser.py
new file mode 100644
index 0000000..d85abd7
--- /dev/null
+++ b/engine/tests/Functional.dmsetup/parser.py
@@ -0,0 +1,22 @@
+#!/usr/bin/python
+# See common.py for description of command-line arguments
+
+import os, sys, collections
+
+sys.path.insert(0, os.environ['FUEGO_CORE'] + '/engine/scripts/parser')
+import common as plib
+
+measurements = {}
+measurements = collections.OrderedDict()
+
+regex_string = '^ -> (.*): TEST-(.*)$'
+matches = plib.parse_log(regex_string)
+
+if matches:
+    for m in matches:
+        measurements['default.' + m[0]] = 'PASS' if m[1] == 'PASS' else 'FAIL'
+
+# split the output for each testcase
+plib.split_output_per_testcase(regex_string, measurements)
+
+sys.exit(plib.process(measurements))
diff --git a/engine/tests/Functional.dmsetup/spec.json b/engine/tests/Functional.dmsetup/spec.json
new file mode 100644
index 0000000..22db406
--- /dev/null
+++ b/engine/tests/Functional.dmsetup/spec.json
@@ -0,0 +1,7 @@
+{
+    "testName": "Functional.dmsetup",
+    "specs": {
+        "default": {}
+    }
+}
+
diff --git a/engine/tests/Functional.dmsetup/tests/dmsetup_deps.sh b/engine/tests/Functional.dmsetup/tests/dmsetup_deps.sh
new file mode 100644
index 0000000..9a48eec
--- /dev/null
+++ b/engine/tests/Functional.dmsetup/tests/dmsetup_deps.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+#  Test command dmsetup on target.
+#  Opiton : deps
+
+test="deps"
+
+if dmsetup deps
+then
+    echo " -> $test: TEST-PASS"
+else
+    echo " -> $test: TEST-FAIL"
+fi;
diff --git a/engine/tests/Functional.dmsetup/tests/dmsetup_info.sh b/engine/tests/Functional.dmsetup/tests/dmsetup_info.sh
new file mode 100644
index 0000000..2dae662
--- /dev/null
+++ b/engine/tests/Functional.dmsetup/tests/dmsetup_info.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+#  Test command dmsetup on target.
+#  Opiton : info
+
+test="info"
+
+if dmsetup info
+then
+    echo " -> $test: TEST-PASS"
+else
+    echo " -> $test: TEST-FAIL"
+fi;
diff --git a/engine/tests/Functional.dmsetup/tests/dmsetup_ls.sh b/engine/tests/Functional.dmsetup/tests/dmsetup_ls.sh
new file mode 100644
index 0000000..826c1b5
--- /dev/null
+++ b/engine/tests/Functional.dmsetup/tests/dmsetup_ls.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+#  Test command dmsetup on target.
+#  Opiton : ls
+
+test="ls"
+
+if dmsetup ls
+then
+    echo " -> $test: TEST-PASS"
+else
+    echo " -> $test: TEST-FAIL"
+fi;
diff --git a/engine/tests/Functional.dmsetup/tests/dmsetup_targets.sh b/engine/tests/Functional.dmsetup/tests/dmsetup_targets.sh
new file mode 100644
index 0000000..3ca4caa
--- /dev/null
+++ b/engine/tests/Functional.dmsetup/tests/dmsetup_targets.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+#  Test command dmsetup on target.
+#  Opiton : targets
+
+test="targets"
+
+if dmsetup targets | grep linear
+then
+    echo " -> $test: TEST-PASS"
+else
+    echo " -> $test: TEST-FAIL"
+fi;
diff --git a/engine/tests/Functional.dmsetup/tests/dmsetup_version.sh b/engine/tests/Functional.dmsetup/tests/dmsetup_version.sh
new file mode 100644
index 0000000..10b4024
--- /dev/null
+++ b/engine/tests/Functional.dmsetup/tests/dmsetup_version.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+#  Test command dmsetup on target.
+#  Opiton : version
+
+test="version"
+
+if dmsetup version
+then
+    echo " -> $test: TEST-PASS"
+else
+    echo " -> $test: TEST-FAIL"
+fi;
-- 
1.8.3.1




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Fuego] [PATCH] Add test cases for command powertop.
  2018-08-28 11:36 [Fuego] [PATCH] Add test cases for command of quota Wang Mingyu
  2018-08-28 11:36 ` [Fuego] [PATCH] Add test cases for command of radiusclient Wang Mingyu
  2018-08-28 11:36 ` [Fuego] [PATCH] Add test cases for command dmsetup Wang Mingyu
@ 2018-08-28 11:36 ` Wang Mingyu
  2 siblings, 0 replies; 4+ messages in thread
From: Wang Mingyu @ 2018-08-28 11:36 UTC (permalink / raw)
  To: fuego

Signed-off-by: Wang Mingyu <wangmy@cn.fujitsu.com>
---
 engine/tests/Functional.powertop/fuego_test.sh     | 18 ++++++++++++++++++
 engine/tests/Functional.powertop/parser.py         | 22 ++++++++++++++++++++++
 engine/tests/Functional.powertop/powertop_test.sh  |  4 ++++
 engine/tests/Functional.powertop/spec.json         |  7 +++++++
 .../Functional.powertop/tests/powertop_csv.sh      | 13 +++++++++++++
 .../Functional.powertop/tests/powertop_help.sh     | 13 +++++++++++++
 6 files changed, 77 insertions(+)
 create mode 100644 engine/tests/Functional.powertop/fuego_test.sh
 create mode 100644 engine/tests/Functional.powertop/parser.py
 create mode 100644 engine/tests/Functional.powertop/powertop_test.sh
 create mode 100644 engine/tests/Functional.powertop/spec.json
 create mode 100644 engine/tests/Functional.powertop/tests/powertop_csv.sh
 create mode 100644 engine/tests/Functional.powertop/tests/powertop_help.sh

diff --git a/engine/tests/Functional.powertop/fuego_test.sh b/engine/tests/Functional.powertop/fuego_test.sh
new file mode 100644
index 0000000..7912e19
--- /dev/null
+++ b/engine/tests/Functional.powertop/fuego_test.sh
@@ -0,0 +1,18 @@
+function test_pre_check {
+    is_on_target_path powertop PROGRAM_POWERTOP
+    assert_define PROGRAM_POWERTOP "Missing 'powertop' program on target board"
+}
+
+function test_deploy {
+    put $TEST_HOME/powertop_test.sh $BOARD_TESTDIR/fuego.$TESTDIR/
+    put -r $TEST_HOME/tests $BOARD_TESTDIR/fuego.$TESTDIR/
+}
+
+function test_run {
+    report "cd $BOARD_TESTDIR/fuego.$TESTDIR;\
+    sh -v powertop_test.sh"
+}
+
+function test_processing {
+    log_compare "$TESTDIR" "0" "TEST-FAIL" "n"
+}
diff --git a/engine/tests/Functional.powertop/parser.py b/engine/tests/Functional.powertop/parser.py
new file mode 100644
index 0000000..d85abd7
--- /dev/null
+++ b/engine/tests/Functional.powertop/parser.py
@@ -0,0 +1,22 @@
+#!/usr/bin/python
+# See common.py for description of command-line arguments
+
+import os, sys, collections
+
+sys.path.insert(0, os.environ['FUEGO_CORE'] + '/engine/scripts/parser')
+import common as plib
+
+measurements = {}
+measurements = collections.OrderedDict()
+
+regex_string = '^ -> (.*): TEST-(.*)$'
+matches = plib.parse_log(regex_string)
+
+if matches:
+    for m in matches:
+        measurements['default.' + m[0]] = 'PASS' if m[1] == 'PASS' else 'FAIL'
+
+# split the output for each testcase
+plib.split_output_per_testcase(regex_string, measurements)
+
+sys.exit(plib.process(measurements))
diff --git a/engine/tests/Functional.powertop/powertop_test.sh b/engine/tests/Functional.powertop/powertop_test.sh
new file mode 100644
index 0000000..dd5ce37
--- /dev/null
+++ b/engine/tests/Functional.powertop/powertop_test.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+for i in tests/*.sh; do
+    sh $i
+done
diff --git a/engine/tests/Functional.powertop/spec.json b/engine/tests/Functional.powertop/spec.json
new file mode 100644
index 0000000..9faf84d
--- /dev/null
+++ b/engine/tests/Functional.powertop/spec.json
@@ -0,0 +1,7 @@
+{
+    "testName": "Functional.powertop",
+    "specs": {
+        "default": {}
+    }
+}
+
diff --git a/engine/tests/Functional.powertop/tests/powertop_csv.sh b/engine/tests/Functional.powertop/tests/powertop_csv.sh
new file mode 100644
index 0000000..7f28ddd
--- /dev/null
+++ b/engine/tests/Functional.powertop/tests/powertop_csv.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+#  In target, run comannd powertop.
+#  option: --csv
+
+test="csv"
+
+if powertop --csv --time=1 | grep powertop
+then
+    echo " -> $test: TEST-PASS"
+else
+    echo " -> $test: TEST-FAIL"
+fi;
diff --git a/engine/tests/Functional.powertop/tests/powertop_help.sh b/engine/tests/Functional.powertop/tests/powertop_help.sh
new file mode 100644
index 0000000..f617dcc
--- /dev/null
+++ b/engine/tests/Functional.powertop/tests/powertop_help.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+#  In target, run comannd powertop.
+#  option: --help
+
+test="help"
+
+if powertop --help | grep Usage
+then
+    echo " -> $test: TEST-PASS"
+else
+    echo " -> $test: TEST-FAIL"
+fi;
-- 
1.8.3.1




^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-08-28 11:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-28 11:36 [Fuego] [PATCH] Add test cases for command of quota Wang Mingyu
2018-08-28 11:36 ` [Fuego] [PATCH] Add test cases for command of radiusclient Wang Mingyu
2018-08-28 11:36 ` [Fuego] [PATCH] Add test cases for command dmsetup Wang Mingyu
2018-08-28 11:36 ` [Fuego] [PATCH] Add test cases for command powertop Wang Mingyu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.