Return-Path: From: Wang Mingyu Date: Fri, 8 Jun 2018 08:14:43 -0700 Message-ID: <1528470887-22360-1-git-send-email-wangmy@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Fuego] [PATCH] Add command basename, busybox and bzcat to the testset. 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/Functional.busybox/tests/busybox_basename.sh | 13 +++++++++++++ engine/tests/Functional.busybox/tests/busybox_busybox.sh | 13 +++++++++++++ engine/tests/Functional.busybox/tests/busybox_bzcat.sh | 16 ++++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 engine/tests/Functional.busybox/tests/busybox_basename.sh create mode 100644 engine/tests/Functional.busybox/tests/busybox_busybox.sh create mode 100644 engine/tests/Functional.busybox/tests/busybox_bzcat.sh diff --git a/engine/tests/Functional.busybox/tests/busybox_basename.sh b/engine/tests/Functional.busybox/tests/busybox_basename.sh new file mode 100644 index 0000000..78fc3c6 --- /dev/null +++ b/engine/tests/Functional.busybox/tests/busybox_basename.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +# The testscript checks the following options of the command basename +# 1) Option none + +test="basename" + +if [ $(busybox basename ./test_dir/test1) = "test1" ] +then + echo " -> $test: TEST-PASS" +else + echo " -> $test: TEST-FAIL" +fi; diff --git a/engine/tests/Functional.busybox/tests/busybox_busybox.sh b/engine/tests/Functional.busybox/tests/busybox_busybox.sh new file mode 100644 index 0000000..d29ea13 --- /dev/null +++ b/engine/tests/Functional.busybox/tests/busybox_busybox.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +# The testscript checks the following options of the command busybox +# 1) Option none + +test="busybox" + +if busybox | grep ^BusyBox +then + echo " -> $test: TEST-PASS" +else + echo " -> $test: TEST-FAIL" +fi; diff --git a/engine/tests/Functional.busybox/tests/busybox_bzcat.sh b/engine/tests/Functional.busybox/tests/busybox_bzcat.sh new file mode 100644 index 0000000..0531d19 --- /dev/null +++ b/engine/tests/Functional.busybox/tests/busybox_bzcat.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +# The testscript checks the following options of the command bzcat +# 1) Option none + +test="bzcat" + +echo "This is a test file">test1 +bzip2 test1 +if [ "$(busybox bzcat test1.bz2)" = "This is a test file" ] +then + echo " -> $test: TEST-PASS" +else + echo " -> $test: TEST-FAIL" +fi; +rm -rf test1.bz2; -- 1.8.3.1