diff options
Diffstat (limited to 'rpm/rootfs-scripts/resource')
-rwxr-xr-x | rpm/rootfs-scripts/resource/rpm_test.sh | 4 | ||||
-rw-r--r-- | rpm/rootfs-scripts/resource/test-manual-1.2.3.noarch.rpm | bin | 0 -> 3293 bytes | |||
-rw-r--r-- | rpm/rootfs-scripts/resource/tests/rpm_01.sh | 13 | ||||
-rw-r--r-- | rpm/rootfs-scripts/resource/tests/rpm_02.sh | 21 | ||||
-rw-r--r-- | rpm/rootfs-scripts/resource/tests/rpm_03.sh | 14 |
5 files changed, 52 insertions, 0 deletions
diff --git a/rpm/rootfs-scripts/resource/rpm_test.sh b/rpm/rootfs-scripts/resource/rpm_test.sh new file mode 100755 index 0000000..dd5ce37 --- /dev/null +++ b/rpm/rootfs-scripts/resource/rpm_test.sh @@ -0,0 +1,4 @@ +#!/bin/sh +for i in tests/*.sh; do + sh $i +done diff --git a/rpm/rootfs-scripts/resource/test-manual-1.2.3.noarch.rpm b/rpm/rootfs-scripts/resource/test-manual-1.2.3.noarch.rpm Binary files differnew file mode 100644 index 0000000..d2e681c --- /dev/null +++ b/rpm/rootfs-scripts/resource/test-manual-1.2.3.noarch.rpm diff --git a/rpm/rootfs-scripts/resource/tests/rpm_01.sh b/rpm/rootfs-scripts/resource/tests/rpm_01.sh new file mode 100644 index 0000000..6ab9e3d --- /dev/null +++ b/rpm/rootfs-scripts/resource/tests/rpm_01.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +# The testscript checks the following options of the command file +# 1) Option help + +test="rpm01" + +if rpm --help | grep .*Usage.* +then + echo " -> $test: TEST-PASS" +else + echo " -> $test: TEST-FAIL" +fi; diff --git a/rpm/rootfs-scripts/resource/tests/rpm_02.sh b/rpm/rootfs-scripts/resource/tests/rpm_02.sh new file mode 100644 index 0000000..9b0f411 --- /dev/null +++ b/rpm/rootfs-scripts/resource/tests/rpm_02.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +# The testscript checks the following options of the command file +# 1) Option ql + +test="rpm02" +test_manual="test-manual-1.2.3.noarch" + +if rpm -qa | grep $test_manual +then + rpm -e $test_manual +fi + +rpm -ivh ${test_manual}.rpm --nodeps + +if rpm -ql $test_manual | grep '.*/home/test/rpm-test/text1.txt.*' +then + echo " -> $test: TEST-PASS" +else + echo " -> $test: TEST-FAIL" +fi; diff --git a/rpm/rootfs-scripts/resource/tests/rpm_03.sh b/rpm/rootfs-scripts/resource/tests/rpm_03.sh new file mode 100644 index 0000000..51d5b95 --- /dev/null +++ b/rpm/rootfs-scripts/resource/tests/rpm_03.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +# The testscript checks the following options of the command file +# 1) Option qi + +test="rpm03" +test_manual="test-manual-1.2.3.noarch" + +if rpm -qi $test_manual | grep ".*1.2.3.*" +then + echo " -> $test: TEST-PASS" +else + echo " -> $test: TEST-FAIL" +fi; |