Return-Path: From: Wang Mingyu Date: Wed, 26 Sep 2018 00:54:33 -0700 Message-ID: <1537948476-25112-4-git-send-email-wangmy@cn.fujitsu.com> In-Reply-To: <1537948476-25112-1-git-send-email-wangmy@cn.fujitsu.com> References: <1537948476-25112-1-git-send-email-wangmy@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Fuego] [PATCH] interactive: Add test case for command openct-tool, openipmish, opensc-tool and openwsmand. List-Id: Mailing list for the Fuego test framework List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: fuego@lists.linuxfoundation.org Signed-off-by: Wang Mingyu --- .../tests/interactive_openct-tool.sh | 16 ++++++++++++++++ .../tests/interactive_openipmish.sh | 16 ++++++++++++++++ .../tests/interactive_opensc-tool.sh | 13 +++++++++++++ .../tests/interactive_openwsmand.sh | 13 +++++++++++++ 4 files changed, 58 insertions(+) create mode 100644 engine/tests/Functional.interactive/tests/interactive_openct-tool.sh create mode 100644 engine/tests/Functional.interactive/tests/interactive_openipmish.sh create mode 100644 engine/tests/Functional.interactive/tests/interactive_opensc-tool.sh create mode 100644 engine/tests/Functional.interactive/tests/interactive_openwsmand.sh diff --git a/engine/tests/Functional.interactive/tests/interactive_openct-tool.sh b/engine/tests/Functional.interactive/tests/interactive_openct-tool.sh new file mode 100644 index 0000000..ec70456 --- /dev/null +++ b/engine/tests/Functional.interactive/tests/interactive_openct-tool.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +# The testscript checks the command openct-tool. +# option: --help + +test="openct-tool" + +expect <<-EOF +spawn openct-tool --help +expect { + "usage:" { + send_user " -> $test: TEST-PASS\n" + } + default { send_user " -> $test: TEST-FAIL\n" } +} +EOF diff --git a/engine/tests/Functional.interactive/tests/interactive_openipmish.sh b/engine/tests/Functional.interactive/tests/interactive_openipmish.sh new file mode 100644 index 0000000..f03317f --- /dev/null +++ b/engine/tests/Functional.interactive/tests/interactive_openipmish.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +# The testscript checks the command openipmish. +# option: --help + +test="openipmish" + +expect <<-EOF +spawn openipmish --help +expect { + "Options are:" { + send_user " -> $test: TEST-PASS\n" + } + default { send_user " -> $test: TEST-FAIL\n" } +} +EOF diff --git a/engine/tests/Functional.interactive/tests/interactive_opensc-tool.sh b/engine/tests/Functional.interactive/tests/interactive_opensc-tool.sh new file mode 100644 index 0000000..4479a0d --- /dev/null +++ b/engine/tests/Functional.interactive/tests/interactive_opensc-tool.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +# The testscript checks the command opensc-tool. +# option: --version + +test="opensc-tool" + +if opensc-tool --version +then + echo " -> $test: TEST-PASS" +else + echo " -> $test: TEST-FAIL" +fi diff --git a/engine/tests/Functional.interactive/tests/interactive_openwsmand.sh b/engine/tests/Functional.interactive/tests/interactive_openwsmand.sh new file mode 100644 index 0000000..5712588 --- /dev/null +++ b/engine/tests/Functional.interactive/tests/interactive_openwsmand.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +# The testscript checks the command openwsmand. +# option: --help + +test="openwsmand" + +if openwsmand --help | grep "Usage" +then + echo " -> $test: TEST-PASS" +else + echo " -> $test: TEST-FAIL" +fi -- 1.8.3.1