Add test-cases for three RhBug:705115 scenarios
This commit is contained in:
parent
afe6aa0fd3
commit
a925a16f5b
|
@ -31,6 +31,7 @@ EXTRA_DIST += $(TESTSUITE_AT)
|
||||||
|
|
||||||
## testsuite data
|
## testsuite data
|
||||||
EXTRA_DIST += data/SPECS/hello.spec
|
EXTRA_DIST += data/SPECS/hello.spec
|
||||||
|
EXTRA_DIST += data/SPECS/hello-script.spec
|
||||||
EXTRA_DIST += data/SPECS/foo.spec
|
EXTRA_DIST += data/SPECS/foo.spec
|
||||||
EXTRA_DIST += data/SPECS/versiontest.spec
|
EXTRA_DIST += data/SPECS/versiontest.spec
|
||||||
EXTRA_DIST += data/SPECS/conflicttest.spec
|
EXTRA_DIST += data/SPECS/conflicttest.spec
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
Name: hello-script
|
||||||
|
Version: 1.0
|
||||||
|
Release: 1
|
||||||
|
Summary: Testing file conflict behavior
|
||||||
|
|
||||||
|
Group: Testing
|
||||||
|
License: GPL
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description
|
||||||
|
%{summary}
|
||||||
|
|
||||||
|
%install
|
||||||
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/usr/bin
|
||||||
|
cat << EOF > $RPM_BUILD_ROOT/usr/bin/hello
|
||||||
|
echo "Hello world!"
|
||||||
|
EOF
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
/usr/bin/hello
|
|
@ -124,6 +124,78 @@ runroot rpm -q --qf "[[%{filestates:fstate} ]]" hello.i686 hello.x86_64
|
||||||
[])
|
[])
|
||||||
AT_CLEANUP
|
AT_CLEANUP
|
||||||
|
|
||||||
|
# ------------------------------
|
||||||
|
# File conflict between colored and non-colored file 1
|
||||||
|
AT_SETUP([rpm -U multilib elf vs non-elf file conflict 1])
|
||||||
|
AT_KEYWORDS([install])
|
||||||
|
AT_CHECK([
|
||||||
|
RPMDB_CLEAR
|
||||||
|
RPMDB_INIT
|
||||||
|
|
||||||
|
runroot rpmbuild --quiet -bb /data/SPECS/hello-script.spec
|
||||||
|
|
||||||
|
runroot rpm -U --ignoreos --ignorearch --nodeps \
|
||||||
|
--define "_transaction_color 3" \
|
||||||
|
--define "_prefer_color 2" \
|
||||||
|
/data/RPMS/hello-2.0-1.x86_64.rpm \
|
||||||
|
"${TOPDIR}"/RPMS/noarch/hello-script-1.0-1.noarch.rpm
|
||||||
|
],
|
||||||
|
[2],
|
||||||
|
[],
|
||||||
|
[ file /usr/bin/hello conflicts between attempted installs of hello-2.0-1.x86_64 and hello-script-1.0-1.noarch
|
||||||
|
])
|
||||||
|
AT_CLEANUP
|
||||||
|
|
||||||
|
# File conflict between colored and non-colored file 2
|
||||||
|
AT_SETUP([rpm -U multilib elf vs non-elf file conflict 2])
|
||||||
|
AT_KEYWORDS([install])
|
||||||
|
AT_CHECK([
|
||||||
|
RPMDB_CLEAR
|
||||||
|
RPMDB_INIT
|
||||||
|
|
||||||
|
runroot rpmbuild --quiet -bb /data/SPECS/hello-script.spec
|
||||||
|
|
||||||
|
runroot rpm -U --ignoreos --ignorearch --nodeps \
|
||||||
|
--define "_transaction_color 3" \
|
||||||
|
--define "_prefer_color 2" \
|
||||||
|
/data/RPMS/hello-2.0-1.x86_64.rpm
|
||||||
|
|
||||||
|
runroot rpm -U --ignoreos --ignorearch --nodeps \
|
||||||
|
--define "_transaction_color 3" \
|
||||||
|
--define "_prefer_color 2" \
|
||||||
|
"${TOPDIR}"/RPMS/noarch/hello-script-1.0-1.noarch.rpm
|
||||||
|
],
|
||||||
|
[1],
|
||||||
|
[],
|
||||||
|
[ file /usr/bin/hello from install of hello-script-1.0-1.noarch conflicts with file from package hello-2.0-1.x86_64
|
||||||
|
])
|
||||||
|
AT_CLEANUP
|
||||||
|
|
||||||
|
# File conflict between colored and non-colored file 3
|
||||||
|
AT_SETUP([rpm -U multilib elf vs non-elf file conflict 3])
|
||||||
|
AT_KEYWORDS([install])
|
||||||
|
AT_CHECK([
|
||||||
|
RPMDB_CLEAR
|
||||||
|
RPMDB_INIT
|
||||||
|
|
||||||
|
runroot rpmbuild --quiet -bb /data/SPECS/hello-script.spec
|
||||||
|
|
||||||
|
runroot rpm -U --ignoreos --ignorearch --nodeps \
|
||||||
|
--define "_transaction_color 3" \
|
||||||
|
--define "_prefer_color 2" \
|
||||||
|
"${TOPDIR}"/RPMS/noarch/hello-script-1.0-1.noarch.rpm
|
||||||
|
|
||||||
|
runroot rpm -U --ignoreos --ignorearch --nodeps \
|
||||||
|
--define "_transaction_color 3" \
|
||||||
|
--define "_prefer_color 2" \
|
||||||
|
/data/RPMS/hello-2.0-1.x86_64.rpm
|
||||||
|
],
|
||||||
|
[1],
|
||||||
|
[],
|
||||||
|
[ file /usr/bin/hello from install of hello-2.0-1.x86_64 conflicts with file from package hello-script-1.0-1.noarch
|
||||||
|
])
|
||||||
|
AT_CLEANUP
|
||||||
|
|
||||||
# ------------------------------
|
# ------------------------------
|
||||||
# Replace directory with symlink, this is expected to fail
|
# Replace directory with symlink, this is expected to fail
|
||||||
AT_SETUP([rpm -U replacing directory with symlink])
|
AT_SETUP([rpm -U replacing directory with symlink])
|
||||||
|
|
Loading…
Reference in New Issue