Return-Path: From: Wang Mingyu Date: Wed, 12 Dec 2018 00:05:54 -0800 Message-ID: <1544601959-22915-2-git-send-email-wangmy@cn.fujitsu.com> In-Reply-To: <1544601959-22915-1-git-send-email-wangmy@cn.fujitsu.com> References: <1544601959-22915-1-git-send-email-wangmy@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Fuego] [PATCH] demo: Add test cases of service pcscd, postfix, pppoe-server and ptpd. List-Id: Mailing list for the Fuego test framework List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: fuego@lists.linuxfoundation.org Cc: root From: root Signed-off-by: root --- engine/tests/Functional.demo/tests/demo_pcscd.sh | 41 ++++++++++++++++++++++ engine/tests/Functional.demo/tests/demo_postfix.sh | 30 ++++++++++++++++ .../Functional.demo/tests/demo_pppoe-server.sh | 41 ++++++++++++++++++++++ engine/tests/Functional.demo/tests/demo_ptpd.sh | 41 ++++++++++++++++++++++ 4 files changed, 153 insertions(+) create mode 100644 engine/tests/Functional.demo/tests/demo_pcscd.sh create mode 100644 engine/tests/Functional.demo/tests/demo_postfix.sh create mode 100644 engine/tests/Functional.demo/tests/demo_pppoe-server.sh create mode 100644 engine/tests/Functional.demo/tests/demo_ptpd.sh diff --git a/engine/tests/Functional.demo/tests/demo_pcscd.sh b/engine/tests/Functional.demo/tests/demo_pcscd.sh new file mode 100644 index 0000000..f7e5981 --- /dev/null +++ b/engine/tests/Functional.demo/tests/demo_pcscd.sh @@ -0,0 +1,41 @@ +#!/bin/sh + +# In the target start pcscd, and confirm the process condition by command ps. + +test="pcscd" + +. ./fuego_board_function_lib.sh + +set_init_manager + +exec_service_on_target pcscd stop + +if exec_service_on_target pcscd start +then + echo " -> start of pcscd succeeded." +else + echo " -> start of pcscd failed." + echo " -> $test: TEST-FAIL" + exit +fi + +sleep 5 + +if ps aux | grep "[/]usr/sbin/pcscd" +then + echo " -> get the process of pcscd." +else + echo " -> can't get the process of pcscd." + echo " -> $test: TEST-FAIL" + exec_service_on_target pcscd stop + exit +fi + +exec_service_on_target pcscd stop + +if ps aux | grep "[/]usr/sbin/pcscd" +then + echo " -> $test: TEST-FAIL" +else + echo " -> $test: TEST-PASS" +fi diff --git a/engine/tests/Functional.demo/tests/demo_postfix.sh b/engine/tests/Functional.demo/tests/demo_postfix.sh new file mode 100644 index 0000000..b6059c7 --- /dev/null +++ b/engine/tests/Functional.demo/tests/demo_postfix.sh @@ -0,0 +1,30 @@ +#!/bin/sh + +# In the target start postfix, and confirm the process condition by command ps. + +test="postfix" + +. ./fuego_board_function_lib.sh + +set_init_manager + +exec_service_on_target postfix stop + +if exec_service_on_target postfix start +then + echo " -> start of postfix succeeded." +else + echo " -> start of postfix failed." + echo " -> $test: TEST-FAIL" + exit +fi + +sleep 5 + +if ps aux | grep "[/]postfix" +then + echo " -> get the process of postfix." +else + echo " -> can't get the process of postfix." + echo " -> $test: TEST-FAIL" +fi diff --git a/engine/tests/Functional.demo/tests/demo_pppoe-server.sh b/engine/tests/Functional.demo/tests/demo_pppoe-server.sh new file mode 100644 index 0000000..ee4536c --- /dev/null +++ b/engine/tests/Functional.demo/tests/demo_pppoe-server.sh @@ -0,0 +1,41 @@ +#!/bin/sh + +# In the target start pppoe-server, and confirm the process condition by command ps. + +test="pppoe-server" + +. ./fuego_board_function_lib.sh + +set_init_manager + +exec_service_on_target pppoe-server stop + +if exec_service_on_target pppoe-server start +then + echo " -> start of pppoe-server succeeded." +else + echo " -> start of pppoe-server failed." + echo " -> $test: TEST-FAIL" + exit +fi + +sleep 5 + +if ps aux | grep "[/]usr/sbin/pppoe-server" +then + echo " -> get the process of pppoe-server." +else + echo " -> can't get the process of pppoe-server." + echo " -> $test: TEST-FAIL" + exec_service_on_target pppoe-server stop + exit +fi + +exec_service_on_target pppoe-server stop + +if ps aux | grep "[/]usr/sbin/pppoe-server" +then + echo " -> $test: TEST-FAIL" +else + echo " -> $test: TEST-PASS" +fi diff --git a/engine/tests/Functional.demo/tests/demo_ptpd.sh b/engine/tests/Functional.demo/tests/demo_ptpd.sh new file mode 100644 index 0000000..18f9b3a --- /dev/null +++ b/engine/tests/Functional.demo/tests/demo_ptpd.sh @@ -0,0 +1,41 @@ +#!/bin/sh + +# In the target start ptpd, and confirm the process condition by command ps. + +test="ptpd" + +. ./fuego_board_function_lib.sh + +set_init_manager + +exec_service_on_target ptpd stop + +if exec_service_on_target ptpd start +then + echo " -> start of ptpd succeeded." +else + echo " -> start of ptpd failed." + echo " -> $test: TEST-FAIL" + exit +fi + +sleep 5 + +if ps aux | grep "[/]usr/bin/ptpd" +then + echo " -> get the process of ptpd." +else + echo " -> can't get the process of ptpd." + echo " -> $test: TEST-FAIL" + exec_service_on_target ptpd stop + exit +fi + +exec_service_on_target ptpd stop + +if ps aux | grep "[/]usr/sbin/ptpd" +then + echo " -> $test: TEST-FAIL" +else + echo " -> $test: TEST-PASS" +fi -- 1.8.3.1