diff options
author | jbj <devnull@localhost> | 1998-10-20 11:54:13 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 1998-10-20 11:54:13 +0000 |
commit | 5fc8cb62a550c25c2d688b1c85fee56203ad1d66 (patch) | |
tree | 92eeee2b69fbe21802300989695554c1dad0836b /tests | |
parent | 6fa0d192717289118eb934d23ea087006b0c4a1a (diff) | |
download | librpm-tizen-5fc8cb62a550c25c2d688b1c85fee56203ad1d66.tar.gz librpm-tizen-5fc8cb62a550c25c2d688b1c85fee56203ad1d66.tar.bz2 librpm-tizen-5fc8cb62a550c25c2d688b1c85fee56203ad1d66.zip |
First attempt at "make check".
CVS patchset: 2465
CVS date: 1998/10/20 11:54:13
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am | 9 | ||||
-rw-r--r-- | tests/Makefile.in | 311 | ||||
-rw-r--r-- | tests/hello-test/Makefile.am | 9 | ||||
-rw-r--r-- | tests/hello-test/Makefile.in | 246 | ||||
-rw-r--r-- | tests/hello-test/hello-1.0.tar.gz | bin | 0 -> 587 bytes | |||
-rw-r--r-- | tests/hello-test/hello-1.0/Makefile | 8 | ||||
-rw-r--r-- | tests/hello-test/hello-1.0/README | 1 | ||||
-rw-r--r-- | tests/hello-test/hello-1.0/hello.c | 5 | ||||
-rw-r--r-- | tests/hello-test/hello-1.0/hello.spec | 29 | ||||
-rwxr-xr-x | tests/hello-test/test0 | 18 | ||||
-rw-r--r-- | tests/hello-test/test0.exp | 44 | ||||
-rw-r--r-- | tests/rpmrc.in | 198 |
12 files changed, 877 insertions, 1 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index aed05fff5..28bf2102a 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,5 +1,12 @@ ## Process this file with automake to produce Makefile.in. EXTRA_DIST = -SUBDIRS = if-test +SUBDIRS = hello-test +check-recursive: ./usr/ ./bin ./var + +./usr ./bin ./var: ../rpm + make -C .. DESTDIR=`pwd` install + +clean-local: + rm -rf ./usr ./bin ./var diff --git a/tests/Makefile.in b/tests/Makefile.in new file mode 100644 index 000000000..b66a464ce --- /dev/null +++ b/tests/Makefile.in @@ -0,0 +1,311 @@ +# Makefile.in generated automatically by automake 1.3 from Makefile.am + +# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + +SHELL = /bin/sh + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +sbindir = @sbindir@ +libexecdir = @libexecdir@ +datadir = @datadir@ +sysconfdir = @sysconfdir@ +sharedstatedir = @sharedstatedir@ +localstatedir = @localstatedir@ +libdir = @libdir@ +infodir = @infodir@ +mandir = @mandir@ +includedir = @includedir@ +oldincludedir = /usr/include + +DISTDIR = + +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ + +top_builddir = .. + +ACLOCAL = @ACLOCAL@ +AUTOCONF = @AUTOCONF@ +AUTOMAKE = @AUTOMAKE@ +AUTOHEADER = @AUTOHEADER@ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +transform = @program_transform_name@ + +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +host_alias = @host_alias@ +host_triplet = @host@ +AR = @AR@ +AWK = @AWK@ +BZIP2BIN = @BZIP2BIN@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CPP = @CPP@ +DATADIRNAME = @DATADIRNAME@ +FINDPROVIDES = @FINDPROVIDES@ +FINDREQUIRES = @FINDREQUIRES@ +FIXPERMS = @FIXPERMS@ +GENCAT = @GENCAT@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GT_NO = @GT_NO@ +GT_YES = @GT_YES@ +GZIPBIN = @GZIPBIN@ +INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@ +INCPATH = @INCPATH@ +INSTOBJEXT = @INSTOBJEXT@ +INTLDEPS = @INTLDEPS@ +INTLLIBS = @INTLLIBS@ +INTLOBJS = @INTLOBJS@ +LDFLAGS_STATIC = @LDFLAGS_STATIC@ +LIBDL = @LIBDL@ +LIBMISC = @LIBMISC@ +LIBOBJS = @LIBOBJS@ +LIBRPMALIAS_FILENAME = @LIBRPMALIAS_FILENAME@ +LIBRPMRC_FILENAME = @LIBRPMRC_FILENAME@ +LIBS = @LIBS@ +LN_S = @LN_S@ +MACROFILES = @MACROFILES@ +MAKEINFO = @MAKEINFO@ +MISCDIR = @MISCDIR@ +MISCPATH = @MISCPATH@ +MKDIR = @MKDIR@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +PACKAGE = @PACKAGE@ +POFILES = @POFILES@ +POSUB = @POSUB@ +RANLIB = @RANLIB@ +ROOT_GROUP = @ROOT_GROUP@ +RPM = @RPM@ +RPMCONFIGDIR = @RPMCONFIGDIR@ +TARGET = @TARGET@ +U = @U@ +USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +l = @l@ +testdir = @testdir@ +tmpdir = @tmpdir@ +varprefix = @varprefix@ + +EXTRA_DIST = +SUBDIRS = hello-test +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = ../config.h +CONFIG_CLEAN_FILES = rpmrc +DIST_COMMON = Makefile.am Makefile.in rpmrc.in + + +DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) + +TAR = tar +GZIP = --best +all: all-recursive all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) + cd $(top_builddir) \ + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status + +rpmrc: $(top_builddir)/config.status rpmrc.in + cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. + +@SET_MAKE@ + +all-recursive install-data-recursive install-exec-recursive \ +installdirs-recursive install-recursive uninstall-recursive \ +check-recursive installcheck-recursive info-recursive dvi-recursive: + @set fnord $(MAKEFLAGS); amf=$$2; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + target=`echo $@ | sed s/-recursive//`; \ + echo "Making $$target in $$subdir"; \ + (cd $$subdir && $(MAKE) $$target) \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + done && test -z "$$fail" + +mostlyclean-recursive clean-recursive distclean-recursive \ +maintainer-clean-recursive: + @set fnord $(MAKEFLAGS); amf=$$2; \ + rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ + rev="$$subdir $$rev"; \ + done; \ + for subdir in $$rev; do \ + target=`echo $@ | sed s/-recursive//`; \ + echo "Making $$target in $$subdir"; \ + (cd $$subdir && $(MAKE) $$target) \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + (cd $$subdir && $(MAKE) tags); \ + done + +tags: TAGS + +ID: $(HEADERS) $(SOURCES) $(LISP) + here=`pwd` && cd $(srcdir) \ + && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP) + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ + done; \ + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ + || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) + +mostlyclean-tags: + +clean-tags: + +distclean-tags: + -rm -f TAGS ID + +maintainer-clean-tags: + +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) + +subdir = tests + +distdir: $(DISTFILES) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(top_distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu tests/Makefile + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ + || cp -p $$d/$$file $(distdir)/$$file; \ + done + for subdir in $(SUBDIRS); do \ + test -d $(distdir)/$$subdir \ + || mkdir $(distdir)/$$subdir \ + || exit 1; \ + chmod 777 $(distdir)/$$subdir; \ + (cd $$subdir && $(MAKE) top_distdir=../$(top_distdir) distdir=../$(distdir)/$$subdir distdir) \ + || exit 1; \ + done +info: info-recursive +dvi: dvi-recursive +check: all-am + $(MAKE) check-recursive +installcheck: installcheck-recursive +all-am: Makefile + +install-exec: install-exec-recursive + @$(NORMAL_INSTALL) + +install-data: install-data-recursive + @$(NORMAL_INSTALL) + +install: install-recursive + @: + +uninstall: uninstall-recursive + +install-strip: + $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install +installdirs: installdirs-recursive + + +mostlyclean-generic: + -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -rm -f Makefile $(DISTCLEANFILES) + -rm -f config.cache config.log stamp-h stamp-h[0-9]* + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) +mostlyclean-am: mostlyclean-tags mostlyclean-generic + +clean-am: clean-tags clean-generic mostlyclean-am + +distclean-am: distclean-tags distclean-generic clean-am + +maintainer-clean-am: maintainer-clean-tags maintainer-clean-generic \ + distclean-am + +mostlyclean: mostlyclean-recursive mostlyclean-am + +clean: clean-recursive clean-am clean-local + +distclean: distclean-recursive distclean-am + -rm -f config.status + +maintainer-clean: maintainer-clean-recursive maintainer-clean-am + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + +.PHONY: install-data-recursive uninstall-data-recursive \ +install-exec-recursive uninstall-exec-recursive installdirs-recursive \ +uninstalldirs-recursive all-recursive check-recursive \ +installcheck-recursive info-recursive dvi-recursive \ +mostlyclean-recursive distclean-recursive clean-recursive \ +maintainer-clean-recursive tags tags-recursive mostlyclean-tags \ +distclean-tags clean-tags maintainer-clean-tags distdir info dvi \ +installcheck all-am install-exec install-data install uninstall all \ +installdirs mostlyclean-generic distclean-generic clean-generic \ +maintainer-clean-generic clean mostlyclean distclean maintainer-clean + + +check-recursive: ./usr/ ./bin ./var + +./usr ./bin ./var: ../rpm + make -C .. DESTDIR=`pwd` install + +clean-local: + rm -rf ./usr ./bin ./var + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/tests/hello-test/Makefile.am b/tests/hello-test/Makefile.am new file mode 100644 index 000000000..e84ae5f32 --- /dev/null +++ b/tests/hello-test/Makefile.am @@ -0,0 +1,9 @@ +## Process this file with automake to produce Makefile.in. + +all: + +noinst_SCRIPTS = test0 + +TESTS_ENVIRONMENT = rpm="${top_builddir}/rpm --rcfile ${top_builddir}/tests/rpmrc" + +TESTS = test0 diff --git a/tests/hello-test/Makefile.in b/tests/hello-test/Makefile.in new file mode 100644 index 000000000..03ddf3a6b --- /dev/null +++ b/tests/hello-test/Makefile.in @@ -0,0 +1,246 @@ +# Makefile.in generated automatically by automake 1.3 from Makefile.am + +# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + +SHELL = /bin/sh + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +sbindir = @sbindir@ +libexecdir = @libexecdir@ +datadir = @datadir@ +sysconfdir = @sysconfdir@ +sharedstatedir = @sharedstatedir@ +localstatedir = @localstatedir@ +libdir = @libdir@ +infodir = @infodir@ +mandir = @mandir@ +includedir = @includedir@ +oldincludedir = /usr/include + +DISTDIR = + +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ + +top_builddir = ../.. + +ACLOCAL = @ACLOCAL@ +AUTOCONF = @AUTOCONF@ +AUTOMAKE = @AUTOMAKE@ +AUTOHEADER = @AUTOHEADER@ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +transform = @program_transform_name@ + +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +host_alias = @host_alias@ +host_triplet = @host@ +AR = @AR@ +AWK = @AWK@ +BZIP2BIN = @BZIP2BIN@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CPP = @CPP@ +DATADIRNAME = @DATADIRNAME@ +FINDPROVIDES = @FINDPROVIDES@ +FINDREQUIRES = @FINDREQUIRES@ +FIXPERMS = @FIXPERMS@ +GENCAT = @GENCAT@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GT_NO = @GT_NO@ +GT_YES = @GT_YES@ +GZIPBIN = @GZIPBIN@ +INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@ +INCPATH = @INCPATH@ +INSTOBJEXT = @INSTOBJEXT@ +INTLDEPS = @INTLDEPS@ +INTLLIBS = @INTLLIBS@ +INTLOBJS = @INTLOBJS@ +LDFLAGS_STATIC = @LDFLAGS_STATIC@ +LIBDL = @LIBDL@ +LIBMISC = @LIBMISC@ +LIBOBJS = @LIBOBJS@ +LIBRPMALIAS_FILENAME = @LIBRPMALIAS_FILENAME@ +LIBRPMRC_FILENAME = @LIBRPMRC_FILENAME@ +LIBS = @LIBS@ +LN_S = @LN_S@ +MACROFILES = @MACROFILES@ +MAKEINFO = @MAKEINFO@ +MISCDIR = @MISCDIR@ +MISCPATH = @MISCPATH@ +MKDIR = @MKDIR@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +PACKAGE = @PACKAGE@ +POFILES = @POFILES@ +POSUB = @POSUB@ +RANLIB = @RANLIB@ +ROOT_GROUP = @ROOT_GROUP@ +RPM = @RPM@ +RPMCONFIGDIR = @RPMCONFIGDIR@ +TARGET = @TARGET@ +U = @U@ +USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +l = @l@ +testdir = @testdir@ +tmpdir = @tmpdir@ +varprefix = @varprefix@ + +noinst_SCRIPTS = test0 + +TESTS_ENVIRONMENT = rpm="${top_builddir}/rpm --rcfile ${top_builddir}/tests/rpmrc" + +TESTS = test0 +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = ../../config.h +CONFIG_CLEAN_FILES = +SCRIPTS = $(noinst_SCRIPTS) + +DIST_COMMON = Makefile.am Makefile.in + + +DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) + +TAR = tar +GZIP = --best +all: Makefile $(SCRIPTS) + +.SUFFIXES: +$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/hello-test/Makefile + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) + cd $(top_builddir) \ + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status + +tags: TAGS +TAGS: + + +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) + +subdir = tests/hello-test + +distdir: $(DISTFILES) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(top_distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu tests/hello-test/Makefile + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ + || cp -p $$d/$$file $(distdir)/$$file; \ + done +check-TESTS: $(TESTS) + @failed=0; all=0; \ + srcdir=$(srcdir); export srcdir; \ + for tst in $(TESTS); do \ + if test -f $$tst; then dir=.; \ + else dir="$(srcdir)"; fi; \ + if $(TESTS_ENVIRONMENT) $$dir/$$tst; then \ + all=`expr $$all + 1`; \ + echo "PASS: $$tst"; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + failed=`expr $$failed + 1`; \ + echo "FAIL: $$tst"; \ + fi; \ + done; \ + if test "$$failed" -eq 0; then \ + banner="All $$all tests passed"; \ + else \ + banner="$$failed of $$all tests failed"; \ + fi; \ + dashes=`echo "$$banner" | sed s/./=/g`; \ + echo "$$dashes"; \ + echo "$$banner"; \ + echo "$$dashes"; \ + test "$$failed" -eq 0 +info: +dvi: +check: all + $(MAKE) check-TESTS +installcheck: +install-exec: + @$(NORMAL_INSTALL) + +install-data: + @$(NORMAL_INSTALL) + +install: install-exec install-data all + @: + +uninstall: + +install-strip: + $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install +installdirs: + + +mostlyclean-generic: + -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -rm -f Makefile $(DISTCLEANFILES) + -rm -f config.cache config.log stamp-h stamp-h[0-9]* + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) +mostlyclean: mostlyclean-generic + +clean: clean-generic mostlyclean + +distclean: distclean-generic clean + -rm -f config.status + +maintainer-clean: maintainer-clean-generic distclean + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + +.PHONY: tags distdir check-TESTS info dvi installcheck install-exec \ +install-data install uninstall all installdirs mostlyclean-generic \ +distclean-generic clean-generic maintainer-clean-generic clean \ +mostlyclean distclean maintainer-clean + + +all: + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/tests/hello-test/hello-1.0.tar.gz b/tests/hello-test/hello-1.0.tar.gz Binary files differnew file mode 100644 index 000000000..7000ed396 --- /dev/null +++ b/tests/hello-test/hello-1.0.tar.gz diff --git a/tests/hello-test/hello-1.0/Makefile b/tests/hello-test/hello-1.0/Makefile new file mode 100644 index 000000000..43231fe5f --- /dev/null +++ b/tests/hello-test/hello-1.0/Makefile @@ -0,0 +1,8 @@ +all: hello + +install: + install -m 0755 hello $(DESTDIR)/usr/local/bin + +clean: + rm -f *.o hello + diff --git a/tests/hello-test/hello-1.0/README b/tests/hello-test/hello-1.0/README new file mode 100644 index 000000000..cfcfc7f45 --- /dev/null +++ b/tests/hello-test/hello-1.0/README @@ -0,0 +1 @@ +This is the README file for hello-1.0. diff --git a/tests/hello-test/hello-1.0/hello.c b/tests/hello-test/hello-1.0/hello.c new file mode 100644 index 000000000..1ee4843cf --- /dev/null +++ b/tests/hello-test/hello-1.0/hello.c @@ -0,0 +1,5 @@ +int +main() +{ + printf("hello\n"); +} diff --git a/tests/hello-test/hello-1.0/hello.spec b/tests/hello-test/hello-1.0/hello.spec new file mode 100644 index 000000000..d33216b99 --- /dev/null +++ b/tests/hello-test/hello-1.0/hello.spec @@ -0,0 +1,29 @@ +Summary: hello -- hello, world rpm +Name: hello +Version: 1.0 +Release: 1 +Group: Utilities +License: GPL +Source0: hello-1.0.tar.gz +BuildRoot: /var/tmp/hello-root + +%description +Simple rpm demonstration. + +%prep +%setup -q + +%build +make + +%install +rm -rf $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT/usr/local/bin +make DESTDIR=$RPM_BUILD_ROOT install + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root) +/usr/local/bin/hello diff --git a/tests/hello-test/test0 b/tests/hello-test/test0 new file mode 100755 index 000000000..83ba27d52 --- /dev/null +++ b/tests/hello-test/test0 @@ -0,0 +1,18 @@ +#!/bin/sh + +DBG=echo + +rpm=${rpm:=rpm} +destdir="`pwd`" +destdir="`dirname $destdir`" + +${DBGX} $rpm --initdb +${DBGX} $rpm --showrc + +#${DBGX} $rpm -ta hello-1.0-tar.gz + +cp hello-1.0.tar.gz ../usr/src/redhat/SOURCES +zcat hello-1.0.tar.gz | tar xOf - \*.spec > ../usr/src/redhat/SPECS/hello.spec +${DBGX} $rpm -ba ../usr/src/redhat/SPECS/hello.spec 2>&1 | sed -e "s,$destdir,," > test0.out + +exit 0 diff --git a/tests/hello-test/test0.exp b/tests/hello-test/test0.exp new file mode 100644 index 000000000..f2d2015fe --- /dev/null +++ b/tests/hello-test/test0.exp @@ -0,0 +1,44 @@ +Executing: %prep ++ umask 022 ++ cd /usr/src/redhat/BUILD ++ cd /usr/src/redhat/BUILD ++ rm -rf hello-1.0 ++ /bin/gzip -dc /usr/src/redhat/SOURCES/hello-1.0.tar.gz ++ tar -xf - ++ STATUS=0 ++ [ 0 -ne 0 ] ++ cd hello-1.0 ++ chmod -R a+rX,g-w,o-w . ++ exit 0 +Executing: %build ++ umask 022 ++ cd /usr/src/redhat/BUILD ++ cd hello-1.0 ++ make +make[2]: Entering directory `/usr/src/redhat/BUILD/hello-1.0' +make[2]: Nothing to be done for `all'. +make[2]: Leaving directory `/usr/src/redhat/BUILD/hello-1.0' ++ exit 0 +Executing: %install ++ umask 022 ++ cd /usr/src/redhat/BUILD ++ cd hello-1.0 ++ rm -rf /var/tmp/hello-root ++ mkdir -p /var/tmp/hello-root/usr/local/bin ++ make DESTDIR=/var/tmp/hello-root install +make[2]: Entering directory `/usr/src/redhat/BUILD/hello-1.0' +install -m 0755 hello /var/tmp/hello-root/usr/local/bin +make[2]: Leaving directory `/usr/src/redhat/BUILD/hello-1.0' ++ exit 0 +Processing files: hello +Finding provides... +Finding requires... +Requires: ld-linux.so.2 libc.so.6 +Wrote: /usr/src/redhat/SRPMS/hello-1.0-1.src.rpm +Wrote: /usr/src/redhat/RPMS/sparc/hello-1.0-1.sparc.rpm +Executing: %clean ++ umask 022 ++ cd /usr/src/redhat/BUILD ++ cd hello-1.0 ++ rm -rf /var/tmp/hello-root ++ exit 0 diff --git a/tests/rpmrc.in b/tests/rpmrc.in new file mode 100644 index 000000000..041ab567c --- /dev/null +++ b/tests/rpmrc.in @@ -0,0 +1,198 @@ +############################################################# +# Default values, often overridden in /etc/rpmrc +# +# This file *should not be modified*. Local customizations +# belong in /etc/rpmrc, not here. This file will be replaced +# whenever a new version of RPM is installed. + +macrofiles: @testdir@@MACROFILES@ +dbpath: @testdir@@varprefix@/lib/rpm +topdir: @testdir@@prefix@/src/redhat +tmppath: @testdir@@tmpdir@ +gzipbin: @testdir@@GZIPBIN@ +bzip2bin: @testdir@@BZIP2BIN@ +defaultdocdir: @testdir@@prefix@/doc +fixperms: @FIXPERMS@ +rpmfilename: %{ARCH}/%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}.rpm +instchangelog: 5 + +############################################################# + +# Please send new entries to rpm-list@redhat.com + +############################################################# +# Values for RPM_OPT_FLAGS for various platforms + +optflags: i386 -O2 -m486 -fno-strength-reduce +optflags: alpha -O2 +optflags: sparc -O2 +optflags: m68k -O2 -fomit-frame-pointer +optflags: ppc -O2 -fsigned-char +optflags: parisc -O2 -mpa-risc-1-0 +optflags: hppa1.0 -O2 -mpa-risc-1-0 +optflags: hppa1.1 -O2 -mpa-risc-1-0 +optflags: hppa1.2 -O2 -mpa-risc-1-0 +optflags: hppa2.0 -O2 -mpa-risc-1-0 +optflags: mipseb -O2 +optflags: mipsel -O2 +optflags: arm3 -O2 +optflags: arm4 -O2 + +############################################################# +# Canonical arch names and numbers + +arch_canon: i986: i986 1 +arch_canon: i886: i886 1 +arch_canon: i786: i786 1 +arch_canon: i686: i686 1 +arch_canon: i586: i586 1 +arch_canon: i486: i486 1 +arch_canon: i386: i386 1 +arch_canon: alpha: alpha 2 +arch_canon: sparc: sparc 3 +arch_canon: sun4: sparc 3 +arch_canon: sun4m: sparc 3 +arch_canon: sun4c: sparc 3 +arch_canon: sun4d: sparc 3 +# This is really a place holder for MIPS. +arch_canon: mipseb: mipseb 4 +arch_canon: ppc: ppc 5 +arch_canon: m68k: m68k 6 +arch_canon: IP: sgi 7 +arch_canon: rs6000: rs6000 8 + +arch_canon: sun4u: usparc 10 +arch_canon: mipsel: mipsel 11 + +arch_canon: arm: arm 12 +arch_canon: arm6: arm3 12 +arch_canon: arm610: arm3 12 +arch_canon: arm7: arm3 12 +arch_canon: arm710: arm3 12 +arch_canon: arm8: arm4 12 +arch_canon: arm810: arm4 12 +arch_canon: sa110: arm4 12 + +############################################################# +# Canonical OS names and numbers + +os_canon: Linux: Linux 1 +os_canon: IRIX: Irix 2 +# This is wrong +os_canon: SunOS5: solaris 3 +os_canon: SunOS4: SunOS 4 + +os_canon: AmigaOS: AmigaOS 5 +os_canon: AIX: AIX 5 +os_canon: HP-UX: hpux10 6 +os_canon: OSF1: osf1 7 +os_canon: FreeBSD: FreeBSD 8 +os_canon: SCO_SV: SCO_SV3.2v5.0.2 9 +os_canon: IRIX64: Irix64 10 +os_canon: NEXTSTEP: NextStep 11 +os_canon: BSD/OS: BSD_OS 12 +os_canon: machten: machten 13 +os_canon: CYGWIN32_NT: cygwin32 14 +os_canon: CYGWIN32_95: cygwin32 15 +os_canon: UNIX_SV: MP_RAS: 16 + +############################################################# +# For a given uname().machine, the default build arch + +buildarchtranslate: osfmach3_i986: i386 +buildarchtranslate: osfmach3_i886: i386 +buildarchtranslate: osfmach3_i786: i386 +buildarchtranslate: osfmach3_i686: i386 +buildarchtranslate: osfmach3_i586: i386 +buildarchtranslate: osfmach3_i486: i386 +buildarchtranslate: osfmach3_i386: i386 + +buildarchtranslate: i986: i386 +buildarchtranslate: i886: i386 +buildarchtranslate: i786: i386 +buildarchtranslate: i686: i386 +buildarchtranslate: i586: i386 +buildarchtranslate: i486: i386 +buildarchtranslate: i386: i386 + +buildarchtranslate: osfmach3_ppc: ppc +buildarchtranslate: powerpc: ppc +buildarchtranslate: powerppc: ppc + +############################################################# +# Architecture compatibility + +arch_compat: alpha: axp noarch + +arch_compat: i986: i886 +arch_compat: i886: i786 +arch_compat: i786: i686 +arch_compat: i686: i586 +arch_compat: i586: i486 +arch_compat: i486: i386 +arch_compat: i386: noarch + +arch_compat: osfmach3_i986: i986 osfmach3_i886 +arch_compat: osfmach3_i886: i886 osfmach3_i786 +arch_compat: osfmach3_i786: i786 osfmach3_i686 +arch_compat: osfmach3_i686: i686 osfmach3_i586 +arch_compat: osfmach3_i586: i586 osfmach3_i486 +arch_compat: osfmach3_i486: i486 osfmach3_i386 +arch_compat: osfmach3_i386: i486 + +arch_compat: osfmach3_ppc: ppc +arch_compat: powerpc: ppc +arch_compat: powerppc: ppc + +arch_compat: usparc: sparc +arch_compat: sparc: noarch + +arch_compat: ppc: rs6000 +arch_compat: rs6000: noarch +arch_compat: mipseb: noarch +arch_compat: mipsel: noarch + +arch_compat: hppa2.0: hppa1.2 +arch_compat: hppa1.2: hppa1.1 +arch_compat: hppa1.1: hppa1.0 +arch_compat: hppa1.0: parisc +arch_compat: parisc: noarch + +arch_compat: arm4: arm3 +arch_compat: arm3: noarch + +os_compat: IRIX64: IRIX +os_compat: solaris2.6: solaris2.3 solaris2.4 solaris2.5 +os_compat: solaris2.5: solaris2.3 solaris2.4 +os_compat: solaris2.4: solaris2.3 + +os_compat: hpux11.00: hpux10.30 +os_compat: hpux10.30: hpux10.20 +os_compat: hpux10.20: hpux10.10 +os_compat: hpux10.10: hpux10.01 +os_compat: hpux10.01: hpux10.00 +os_compat: hpux10.00: hpux9.07 +os_compat: hpux9.07: hpux9.05 +os_compat: hpux9.05: hpux9.04 + +os_compat: osf4.0: osf3.2 + +os_compat: ncr-sysv4.3: ncr-sysv4.2 + +buildarch_compat: i986: i886 +buildarch_compat: i886: i786 +buildarch_compat: i786: i686 +buildarch_compat: i686: i586 +buildarch_compat: i586: i486 +buildarch_compat: i486: i386 +buildarch_compat: i386: noarch + +buildarch_compat: sparc: noarch +buildarch_compat: alpha: noarch +buildarch_compat: m68k: noarch +buildarch_compat: ppc: noarch +buildarch_compat: mipsel: noarch +buildarch_compat: mipseb: noarch +buildarch_compat: arm4: noarch +buildarch_compat: arm3: noarch +buildarch_compat: parisc: noarch |