initial commit of file from CVS for dietlibc on Thu 26 Oct 11:19:46 BST 2023
This commit is contained in:
parent
ca7efef729
commit
bcd4ae284b
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
*.tar.bz2 filter=lfs diff=lfs merge=lfs -text
|
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
*.rpm
|
||||||
|
*.log
|
||||||
|
*spec-20*
|
21
Makefile
Normal file
21
Makefile
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Makefile for source rpm: dietlibc
|
||||||
|
# $Id: Makefile,v 1.1 2016/02/04 12:31:54 vip-ire Exp $
|
||||||
|
NAME := dietlibc
|
||||||
|
SPECFILE = $(firstword $(wildcard *.spec))
|
||||||
|
|
||||||
|
define find-makefile-common
|
||||||
|
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
|
||||||
|
endef
|
||||||
|
|
||||||
|
MAKEFILE_COMMON := $(shell $(find-makefile-common))
|
||||||
|
|
||||||
|
ifeq ($(MAKEFILE_COMMON),)
|
||||||
|
# attept a checkout
|
||||||
|
define checkout-makefile-common
|
||||||
|
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
|
||||||
|
endef
|
||||||
|
|
||||||
|
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
|
||||||
|
endif
|
||||||
|
|
||||||
|
include $(MAKEFILE_COMMON)
|
@ -1,3 +1,11 @@
|
|||||||
# dietlibc
|
# dietlibc
|
||||||
|
|
||||||
3rd Party (Maintained by Koozali) git repo for dietlibc smeserver
|
3rd Party (Maintained by Koozali) git repo for dietlibc smeserver
|
||||||
|
|
||||||
|
## Description
|
||||||
|
|
||||||
|
<br />*This description has been generated by an LLM AI system and cannot be relied on to be fully correct.*
|
||||||
|
*Once it has been checked, then this comment will be deleted*
|
||||||
|
<br />
|
||||||
|
|
||||||
|
Dietlibc is a C library for embedded systems, it is designed for small resource-constrained systems such as embedded systems and handheld computers. It provides a lightweight alternative to the standard C library (glibc) to reduce the size of applications while still providing the functionality necessary for them to run. Dietlibc is optimized for size and speed, and provides features like support for ARM and AVR targets, a reduced API, small code size, and low memory usage.
|
||||||
|
1
contriborbase
Normal file
1
contriborbase
Normal file
@ -0,0 +1 @@
|
|||||||
|
sme10
|
BIN
dietlibc-0.33.20110311.tar.bz2
(Stored with Git LFS)
Normal file
BIN
dietlibc-0.33.20110311.tar.bz2
(Stored with Git LFS)
Normal file
Binary file not shown.
3834
dietlibc-github.patch
Normal file
3834
dietlibc-github.patch
Normal file
File diff suppressed because it is too large
Load Diff
336
dietlibc.spec
Normal file
336
dietlibc.spec
Normal file
@ -0,0 +1,336 @@
|
|||||||
|
## This package understands the following switches:
|
||||||
|
## --with[out] ssp ... enable/disable SSP; default depends
|
||||||
|
## on target architecture
|
||||||
|
## --with dynamic ... enable dynamic lib support
|
||||||
|
|
||||||
|
## Fedora Extras specific customization below...
|
||||||
|
%bcond_without noarch
|
||||||
|
##
|
||||||
|
|
||||||
|
%global prerelease 20110311
|
||||||
|
%global pkglibdir %_prefix/lib/dietlibc
|
||||||
|
|
||||||
|
%ifarch %ix86 x86_64
|
||||||
|
%bcond_without ssp
|
||||||
|
%else
|
||||||
|
%bcond_with ssp
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%ifarch %ix86 x86_64 arm
|
||||||
|
%bcond_with dynamic
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%ifarch %ix86
|
||||||
|
%global target_cpu i386
|
||||||
|
%else
|
||||||
|
%global target_cpu %_target_cpu
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%{?with_noarch:%global noarch BuildArch: noarch}
|
||||||
|
%{!?release_func:%global release_func() %%{?prerelease:0.}%1%%{?prerelease:.%%prerelease}%%{?dist}}
|
||||||
|
%{!?apply:%global apply(p:n:b:) %patch%%{-n:%%{-n*}} %%{-p:-p %%{-p*}} %%{-b:-b %%{-b*}} \
|
||||||
|
%nil}
|
||||||
|
|
||||||
|
Summary: Small libc implementation
|
||||||
|
Name: dietlibc
|
||||||
|
Version: 0.33
|
||||||
|
Release: %release_func 1600
|
||||||
|
License: GPLv2
|
||||||
|
Group: Development/Libraries
|
||||||
|
URL: http://www.fefe.de/dietlibc/
|
||||||
|
%if !0%{?prerelease:1}
|
||||||
|
Source0: http://www.kernel.org/pub/linux/libs/dietlibc/%{name}-%{version}.tar.bz2
|
||||||
|
Source1: http://www.fefe.de/dietlibc/%{name}-%{version}.tar.bz2.sig
|
||||||
|
%else
|
||||||
|
# generated by 'make cvs-sources [CVS_DATE=....]'
|
||||||
|
Source0: %name-%version.%prerelease.tar.bz2
|
||||||
|
%endif
|
||||||
|
Source10: runtests-X.sh
|
||||||
|
## CVS..master diff from https://github.com/ensc/dietlibc
|
||||||
|
Patch0: dietlibc-github.patch
|
||||||
|
BuildRoot: %_tmppath/%name-%version-%release-buildroot
|
||||||
|
%{?with_dynamic:Requires: dietlibc-lib = %version-%release}
|
||||||
|
%{!?with_dynamic:Obsoletes: dietlibc-lib < %version-%release}
|
||||||
|
|
||||||
|
Requires: %name-devel = %version-%release
|
||||||
|
BuildRequires: gdb
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: dietlibc development files
|
||||||
|
Group: Development/Libraries
|
||||||
|
Requires: %name = %version-%release
|
||||||
|
Requires: %name-header = %version-%release
|
||||||
|
Provides: %name-static = %version-%release
|
||||||
|
Provides: %name-static%{?_isa} = %version-%release
|
||||||
|
|
||||||
|
%package header
|
||||||
|
Summary: dietlibc header files
|
||||||
|
Group: Development/Libraries
|
||||||
|
Requires: %name = %version-%release
|
||||||
|
Requires(pre): %name-devel = %version-%release
|
||||||
|
Requires: %name-devel = %version-%release
|
||||||
|
%{?noarch}
|
||||||
|
|
||||||
|
%package lib
|
||||||
|
Summary: Dynamic libraries for dietlibc
|
||||||
|
Group: System Environment/Libraries
|
||||||
|
Conflicts: %name < %version-%release
|
||||||
|
Conflicts: %name > %version-%release
|
||||||
|
|
||||||
|
%description
|
||||||
|
The diet libc is a libc that is optimized for small size. It can be
|
||||||
|
used to create small statically linked binaries for Linux on alpha,
|
||||||
|
arm, hppa, ia64, i386, mips, s390, sparc, sparc64, ppc and x86_64.
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
The diet libc is a libc that is optimized for small size. It can be
|
||||||
|
used to create small statically linked binaries for Linux on alpha,
|
||||||
|
arm, hppa, ia64, i386, mips, s390, sparc, sparc64, ppc and x86_64.
|
||||||
|
|
||||||
|
This package contains the object files for dietlibc.
|
||||||
|
|
||||||
|
%description header
|
||||||
|
The diet libc is a libc that is optimized for small size. It can be
|
||||||
|
used to create small statically linked binaries for Linux on alpha,
|
||||||
|
arm, hppa, ia64, i386, mips, s390, sparc, sparc64, ppc and x86_64.
|
||||||
|
|
||||||
|
This package contains the header files for dietlibc.
|
||||||
|
|
||||||
|
%description lib
|
||||||
|
The diet libc is a libc that is optimized for small size. It can be
|
||||||
|
used to create small statically linked binaries for Linux on alpha,
|
||||||
|
arm, hppa, ia64, i386, mips, s390, sparc, sparc64, ppc and x86_64.
|
||||||
|
|
||||||
|
This package contains the dynamic libraries for dietlibc.
|
||||||
|
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q %{?prerelease:-n %name-%version.%prerelease}
|
||||||
|
|
||||||
|
%apply -n0 -p1
|
||||||
|
|
||||||
|
%if %{without ssp}
|
||||||
|
sed -i -e 's!^#define WANT_SSP$!// \0!g;
|
||||||
|
s!.*\(#define WANT_STACKGAP\).*!\1!g' dietfeatures.h
|
||||||
|
%global xtra_fixcflags -fno-stack-protector
|
||||||
|
%else
|
||||||
|
%global xtra_fixcflags %nil
|
||||||
|
%endif
|
||||||
|
|
||||||
|
sed -i \
|
||||||
|
-e '/#define \(WANT_LARGEFILE_BACKCOMPAT\|WANT_VALGRIND_SUPPORT\)/d' \
|
||||||
|
dietfeatures.h
|
||||||
|
|
||||||
|
%ifarch %ix86 arm
|
||||||
|
sed -i \
|
||||||
|
-e '/#define WANT_DYN_PAGESIZE/{c\' \
|
||||||
|
-e '#define WANT_ELFINFO' \
|
||||||
|
-e '}' \
|
||||||
|
dietfeatures.h
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%global fixcflags -fomit-frame-pointer -fno-exceptions -fno-asynchronous-unwind-tables %xtra_fixcflags -Os -g3 -Werror-implicit-function-declaration
|
||||||
|
%global basemakeflags prefix=%pkglibdir BINDIR=%_bindir MAN1DIR=%_mandir/man1 CFLAGS="$RPM_OPT_FLAGS %fixcflags $XTRA_CFLAGS" PDIET=%pkglibdir STRIP=:
|
||||||
|
%global makeflags %basemakeflags
|
||||||
|
|
||||||
|
for i in `find test -name 'runtests.sh'`; do
|
||||||
|
ln -s %SOURCE10 `dirname $i`/runtests-X.sh
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
%build
|
||||||
|
make %makeflags all %{?_smp_mflags}
|
||||||
|
|
||||||
|
# 'dyn' target is not SMP safe
|
||||||
|
%{?with_dynamic:make %makeflags dyn}
|
||||||
|
|
||||||
|
|
||||||
|
%install
|
||||||
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
install -d -m755 $RPM_BUILD_ROOT/etc
|
||||||
|
make %makeflags DESTDIR=$RPM_BUILD_ROOT install
|
||||||
|
|
||||||
|
ln -s lib-%_arch ${RPM_BUILD_ROOT}%pkglibdir/lib-%_arch-%_vendor
|
||||||
|
|
||||||
|
chmod a-x $RPM_BUILD_ROOT%pkglibdir/lib-*/*.o
|
||||||
|
rm -f $RPM_BUILD_ROOT%_bindir/dnsd
|
||||||
|
|
||||||
|
|
||||||
|
%check
|
||||||
|
XTRA_CFLAGS='-fno-builtin'
|
||||||
|
make %makeflags -C test all %{?_smp_mflags} DIET=$(echo `pwd`/bin-*/diet) -k || :
|
||||||
|
make %makeflags -C test/inet all %{?_smp_mflags} DIET=$(echo `pwd`/bin-*/diet) || :
|
||||||
|
|
||||||
|
cd test
|
||||||
|
ulimit -m $[ 128*1024 ] -v $[ 256*1024 ] -d $[ 128*1024 ] -s 512
|
||||||
|
|
||||||
|
bash ./runtests-X.sh
|
||||||
|
|
||||||
|
|
||||||
|
%clean
|
||||||
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%doc AUTHOR BUGS CAVEAT CHANGES COPYING FAQ PORTING README*
|
||||||
|
%doc SECURITY THANKS TODO
|
||||||
|
%doc %_mandir/*/*
|
||||||
|
%_bindir/*
|
||||||
|
|
||||||
|
|
||||||
|
%files header
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%pkglibdir/include
|
||||||
|
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%pkglibdir
|
||||||
|
%exclude %pkglibdir/include
|
||||||
|
%{?with_dynamic:%exclude %pkglibdir/*/*.so}
|
||||||
|
|
||||||
|
|
||||||
|
%if %{with dynamic}
|
||||||
|
%files lib
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%config(noreplace) %_sysconfdir/*
|
||||||
|
%dir %pkglibdir
|
||||||
|
%dir %pkglibdir/lib-*
|
||||||
|
%pkglibdir/lib-%target_cpu/*.so
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Thu Oct 26 2023 BogusDateBot
|
||||||
|
- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday,
|
||||||
|
by assuming the date is correct and changing the weekday.
|
||||||
|
|
||||||
|
* Fri Jul 14 2023 brian read <brianr@koozali.org>
|
||||||
|
- add {} round vars in source lines so that can be converted to git [SME: 12380]
|
||||||
|
|
||||||
|
* Sat Mar 12 2011 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.33-0.1600.20110311
|
||||||
|
- updated to 20110311 CVS snapshot
|
||||||
|
- set fixed page size for arm
|
||||||
|
- disabled linux 2.2/2.4 compatibility code + valgrind nice mode
|
||||||
|
- reduced stack size for testsuite
|
||||||
|
- rediffed patches
|
||||||
|
|
||||||
|
* Sun Feb 20 2011 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.33-0.1600.20101223
|
||||||
|
- other ARM enhancements
|
||||||
|
- fixed missing headers in last utime(2) + fadvise(2) patches
|
||||||
|
|
||||||
|
* Sun Feb 20 2011 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.33-0.1505.20101223
|
||||||
|
- further ARM fixes
|
||||||
|
- global fixes for utime(2), fadvise*(2)
|
||||||
|
|
||||||
|
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.33-0.1504.20101223
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jan 14 2011 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
|
||||||
|
- added common alarm(2) implementation
|
||||||
|
|
||||||
|
* Sun Jan 9 2011 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.33-0.1502.20101223
|
||||||
|
- replaced all the single patches with a big one from
|
||||||
|
https://github.com/ensc/dietlibc/commits/rebase
|
||||||
|
- various ARM-EABI fixes (667852)
|
||||||
|
|
||||||
|
* Fri Dec 24 2010 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.33-0.1500.20101223
|
||||||
|
- updated to 20101223 CVS snapshot
|
||||||
|
|
||||||
|
* Fri Jul 9 2010 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.32-1400
|
||||||
|
- added -static provides (#609606)
|
||||||
|
- use %%apply, not %%patch
|
||||||
|
- updated %%release_func macro
|
||||||
|
|
||||||
|
* Sat Jul 25 2009 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.32-0
|
||||||
|
- updated to 0.32
|
||||||
|
- fixed stackgap/auxvec patch
|
||||||
|
- added patches to fix SMP builds and to prevent object file stripping
|
||||||
|
- moved %%changelog entries from 2005 and before into ChangeLog.2005 file
|
||||||
|
|
||||||
|
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.31-9.20090228
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sun Mar 1 2009 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.31-8.20090228
|
||||||
|
- splitted a noarch -header subpackage out of -devel
|
||||||
|
|
||||||
|
* Sun Mar 1 2009 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.31-7.20090228
|
||||||
|
- updated to 20090228
|
||||||
|
- updated patches
|
||||||
|
|
||||||
|
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.31-7.20081017
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sat Oct 18 2008 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.31-6.20081017
|
||||||
|
- updated to 20081017 CVS snapshot
|
||||||
|
- relaxed some sanity checks on architecture not supported by Fedora
|
||||||
|
and use '#warning' instead of '#error'
|
||||||
|
- fixed ARM dynlib code
|
||||||
|
|
||||||
|
* Wed Jul 16 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.31-6.20080517
|
||||||
|
- fix license tag
|
||||||
|
|
||||||
|
* Sun May 18 2008 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.31-5.20080517
|
||||||
|
- updated to 20080517 snapshot
|
||||||
|
- use patches from git repository
|
||||||
|
|
||||||
|
* Sun May 18 2008 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.31-5.20080409
|
||||||
|
- fixed __signalfd() prototype
|
||||||
|
|
||||||
|
* Sat Apr 19 2008 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.31-4.20080409
|
||||||
|
- update -pagesize patch
|
||||||
|
|
||||||
|
* Mon Apr 14 2008 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.31-3.20080409
|
||||||
|
- removed debug stuff from specfile
|
||||||
|
- updated patches to work with new isinf() behavior of gcc 4.3
|
||||||
|
|
||||||
|
* Sun Apr 13 2008 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.31-2.20080409
|
||||||
|
- added patch for dynamic PAGE_SIZE support
|
||||||
|
- fixed/enhanced testsuite and removed the '|| :' in %%check
|
||||||
|
- improved/fixed floating point support *printf(3)
|
||||||
|
|
||||||
|
* Thu Apr 10 2008 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.31-1.20080409
|
||||||
|
- updated to CVS snapshot 20080409
|
||||||
|
|
||||||
|
* Fri Feb 22 2008 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.31-1.20080221
|
||||||
|
- updated to CVS snapshot 20080221; removed most of the last patches
|
||||||
|
as they are now in upstream
|
||||||
|
- moved files into platform neutral /usr/lib dir (not using %%_lib or
|
||||||
|
%%_libdir macro)
|
||||||
|
- added -devel subpackage due to multiarch issues; main package contains
|
||||||
|
only the 'diet' binary plus some tools while -devel holds all the
|
||||||
|
header and object files.
|
||||||
|
- fixed optimized memcpy(3)
|
||||||
|
|
||||||
|
* Wed Feb 13 2008 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.31-1.20080212
|
||||||
|
- updated to CVS snapshot 20080212
|
||||||
|
- fixed printf regression for '%+04i' style formats
|
||||||
|
- added %%check and run a testsuite; it does not succeed now so it is
|
||||||
|
for informational purposes only...
|
||||||
|
- added bunch of patches to fixes big-endian issues in string routines
|
||||||
|
|
||||||
|
* Sat Sep 1 2007 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.31-1
|
||||||
|
- updated to 0.31
|
||||||
|
- removed the no-stack-protector bits for i386 and x86_64 archs
|
||||||
|
- improved stack-smash code a little bit
|
||||||
|
- disabled dynamic lib for all arches
|
||||||
|
- made objects non-executable to avoid "No build ID note" errors
|
||||||
|
|
||||||
|
* Wed Jan 17 2007 David Woodhouse <dwmw2@infradead.org> 0.30-4
|
||||||
|
- Bump release to be higher than unexplained 0.30-3.fc6
|
||||||
|
|
||||||
|
* Wed Jan 17 2007 David Woodhouse <dwmw2@infradead.org> 0.30-3
|
||||||
|
- Apply workaround for GCC PR26374 to build on PPC again (#182118)
|
||||||
|
|
||||||
|
* Fri Sep 15 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.30-2
|
||||||
|
- rebuilt
|
||||||
|
|
||||||
|
* Sun Jul 9 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.30-1
|
||||||
|
- updated to 0.30
|
||||||
|
- removed cross-arch support
|
||||||
|
- disable (non-working) SSP support; enable old stackgap code instead of
|
||||||
|
|
||||||
|
* Sat Feb 18 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.29-6
|
||||||
|
- added '-Os' to the CFLAGS
|
||||||
|
- exclude PPC arch due to strange compilation errors
|
80
runtests-X.sh
Normal file
80
runtests-X.sh
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
eval $(grep '^\(TESTPROGRAMS\|SUBDIRS\)=' runtests.sh)
|
||||||
|
|
||||||
|
FAILURES_BOGUS=(
|
||||||
|
":gethostbyname" # network test; net might not be available in test environment
|
||||||
|
|
||||||
|
":stdlib:tst-environ" # test uses environ function in unsupported ways (dup keys)
|
||||||
|
":stdlib:tst-rand48" # platform dependent; does not give reliable results
|
||||||
|
":stdlib:tst-strtod" # infinite recursion in __dtostr()
|
||||||
|
":time:tst-mktime" # dietlibc does not support $TZ env
|
||||||
|
":time:tst-posixtz" # dietlibc does not support $TZ env
|
||||||
|
":time:tst-strftime" # dietlibc does not support glibc specific format specifications
|
||||||
|
)
|
||||||
|
|
||||||
|
FAILURES_KNOWN=(
|
||||||
|
":sendfile" # stdin/stdout not supported; test must be wrapped
|
||||||
|
":stdio:tstdiomisc" # scanf(3) fails on some constructs
|
||||||
|
":stdio:tst-fphex" # printf(3) does not support %a specifiers
|
||||||
|
":stdio:tst-printf" # printf(3) does not support some floating point ops
|
||||||
|
":stdio:tst-sscanf" # scanf(3) fails on double input
|
||||||
|
":stdlib:test-canon" # realpath(3) is broken...
|
||||||
|
)
|
||||||
|
|
||||||
|
function is_in() {
|
||||||
|
local val=$1
|
||||||
|
local i
|
||||||
|
shift
|
||||||
|
|
||||||
|
for i; do
|
||||||
|
test x"$i" != x"$val" || return 0
|
||||||
|
done
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
rc=0
|
||||||
|
|
||||||
|
: ${RUNTEST_INDENT=0}
|
||||||
|
export RUNTEST_INDENT
|
||||||
|
export RUNTEST_NS
|
||||||
|
|
||||||
|
for p in $TESTPROGRAMS; do
|
||||||
|
! tty -s || printf '%*s%-20s' $RUNTEST_INDENT '' "$p"
|
||||||
|
|
||||||
|
is_in "$RUNTEST_NS:$p" "${FAILURES_BOGUS[@]}" && fail_bogus=true || fail_bogus=false
|
||||||
|
is_in "$RUNTEST_NS:$p" "${FAILURES_KNOWN[@]}" && fail_known=true || fail_known=false
|
||||||
|
./$p >/dev/null && failed=false || failed=true
|
||||||
|
|
||||||
|
case $failed:$fail_known:$fail_bogus in
|
||||||
|
(false:false:*) res='OK';;
|
||||||
|
(false:true:true) res='OK (bogus)';;
|
||||||
|
(false:true:false) res="OK (unexpected)"; let ++rc;;
|
||||||
|
(true:*:true) res='FAIL (bogus)';;
|
||||||
|
(true:true:*) res="FAIL (known)";;
|
||||||
|
(true:false:*) res='FAIL'; let ++rc;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
! tty -s || printf '\r'
|
||||||
|
|
||||||
|
printf '%*s%-20s%s\n' $RUNTEST_INDENT '' "$p" "$res"
|
||||||
|
done
|
||||||
|
|
||||||
|
test $rc -eq 0 || \
|
||||||
|
printf "%*s--> %u tests failed\n" $RUNTEST_INDENT '' $rc
|
||||||
|
|
||||||
|
for d in $SUBDIRS; do
|
||||||
|
echo "--- entering directory $d ---"
|
||||||
|
let RUNTEST_INDENT+=2
|
||||||
|
old_ns=$RUNTEST_NS
|
||||||
|
RUNTEST_NS=$RUNTEST_NS:$d
|
||||||
|
|
||||||
|
cd $d && bash ./runtests-X.sh || let ++rc
|
||||||
|
|
||||||
|
RUNTEST_NS=$old_ns
|
||||||
|
let RUNTEST_INDENT-=2
|
||||||
|
|
||||||
|
cd $OLDPWD || exit 1
|
||||||
|
done
|
||||||
|
|
||||||
|
test $rc -eq 0 && exit 0 || exit 1
|
Loading…
Reference in New Issue
Block a user