Add testcases for unpackaged files and directories detection
Unpackaged files we detect, directories we dont, never have.
This commit is contained in:
parent
90802a894a
commit
cfa106ee08
|
@ -1,3 +1,6 @@
|
|||
%bcond_with unpackaged_dirs
|
||||
%bcond_with unpackaged_files
|
||||
|
||||
Summary: Testing hard link behavior
|
||||
Name: hlinktest
|
||||
Version: 1.0
|
||||
|
@ -25,6 +28,14 @@ for f in foo bar world; do
|
|||
ln hello hello-${f}
|
||||
done
|
||||
|
||||
%if %{with unpackaged_dirs}
|
||||
mkdir -p $RPM_BUILD_ROOT/zoo/
|
||||
%endif
|
||||
|
||||
%if %{with unpackaged_files}
|
||||
touch $RPM_BUILD_ROOT/toot
|
||||
%endif
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
/foo/*
|
||||
|
|
|
@ -172,6 +172,46 @@ ls -i "${RPMTEST}"/foo/hello* | awk {'print $1'} | sort -u | wc -l
|
|||
[])
|
||||
AT_CLEANUP
|
||||
|
||||
AT_SETUP([rpmbuild unpackaged files])
|
||||
AT_KEYWORDS([build])
|
||||
AT_CHECK([
|
||||
RPMDB_CLEAR
|
||||
RPMDB_INIT
|
||||
rm -rf ${TOPDIR}
|
||||
|
||||
runroot rpmbuild \
|
||||
-bb --quiet --with unpackaged_files /data/SPECS/hlinktest.spec
|
||||
],
|
||||
[1],
|
||||
[],
|
||||
[error: Installed (but unpackaged) file(s) found:
|
||||
/toot
|
||||
Installed (but unpackaged) file(s) found:
|
||||
/toot
|
||||
])
|
||||
AT_CLEANUP
|
||||
|
||||
# rpm doesn't detect unpackaged directories but should, really
|
||||
AT_SETUP([rpmbuild unpackaged directories])
|
||||
AT_KEYWORDS([build])
|
||||
AT_XFAIL_IF([test $RPM_XFAIL -ne 0])
|
||||
AT_CHECK([
|
||||
RPMDB_CLEAR
|
||||
RPMDB_INIT
|
||||
rm -rf ${TOPDIR}
|
||||
|
||||
runroot rpmbuild \
|
||||
-bb --quiet --with unpackaged_dirs /data/SPECS/hlinktest.spec
|
||||
],
|
||||
[1],
|
||||
[],
|
||||
[error: Installed (but unpackaged) file(s) found:
|
||||
/zoo
|
||||
Installed (but unpackaged) file(s) found:
|
||||
/zoo
|
||||
])
|
||||
AT_CLEANUP
|
||||
|
||||
AT_SETUP([rpmbuild glob])
|
||||
AT_KEYWORDS([build])
|
||||
AT_CHECK([
|
||||
|
|
Loading…
Reference in New Issue