aboutsummaryrefslogtreecommitdiffstats
path: root/rpm/rootfs-scripts/resource/tests/rpm_02.sh
blob: 9b0f4118f9493d8b8e6d1c450e1640de827ae1f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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;