mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
vendor/atf: import atf-0.24-rc1
This release candidate will likely serve as the actual upstream release tag for version 0.24, but for now it should be considered a release-candidate worthy tag as this code has not gone through a full FreeBSD test suite run or been built with `make tinderbox` yet on all supported architectures. Obtained from: https://github.com/freebsd/atf/releases/tag/atf-0.24-rc1
This commit is contained in:
1 parent
cd355e3667
commit
0c9bf043d6
101 files changed
+14684
-19180
No files matched your search
-26
@@ -1,26 +0,0 @@
|
||||
env:
|
||||
CIRRUS_CLONE_DEPTH: 1
|
||||
ARCH: amd64
|
||||
|
||||
task:
|
||||
matrix:
|
||||
- name: 14.0-CURRENT
|
||||
freebsd_instance:
|
||||
image_family: freebsd-14-0-snap
|
||||
- name: 13.0-STABLE
|
||||
freebsd_instance:
|
||||
image_family: freebsd-13-0-snap
|
||||
- name: 13.0-RELEASE
|
||||
freebsd_instance:
|
||||
image_family: freebsd-13-0
|
||||
install_script:
|
||||
- sed -i.bak -e 's,pkg+http://pkg.FreeBSD.org/\${ABI}/quarterly,pkg+http://pkg.FreeBSD.org/\${ABI}/latest,' /etc/pkg/FreeBSD.conf
|
||||
- ASSUME_ALWAYS_YES=yes pkg bootstrap -f
|
||||
- pkg install -y autoconf automake libtool kyua pkgconf
|
||||
script:
|
||||
- env JUNIT_OUTPUT=$(pwd)/test-results.xml ./admin/travis-build.sh
|
||||
always:
|
||||
junit_artifacts:
|
||||
path: "test-results.xml"
|
||||
type: text/xml
|
||||
format: junit
|
||||
-25
@@ -1,25 +0,0 @@
|
||||
*.la
|
||||
*.lo
|
||||
*.o
|
||||
*.pc
|
||||
*_helper
|
||||
*_helpers
|
||||
*_test
|
||||
.deps
|
||||
.dirstamp
|
||||
.libs
|
||||
|
||||
Makefile
|
||||
Makefile.in
|
||||
aclocal.m4
|
||||
autom4te.cache
|
||||
config.h
|
||||
config.h.in
|
||||
config.h.in~
|
||||
config.log
|
||||
config.status
|
||||
configure
|
||||
installcheck.log
|
||||
libtool
|
||||
stamp-h1
|
||||
testsuite.log
|
||||
-25
@@ -1,25 +0,0 @@
|
||||
language: cpp
|
||||
|
||||
compiler:
|
||||
- gcc
|
||||
- clang
|
||||
|
||||
before_install:
|
||||
- ./admin/travis-install-deps.sh
|
||||
|
||||
env:
|
||||
- ARCH=amd64 AS_ROOT=no
|
||||
- ARCH=amd64 AS_ROOT=yes
|
||||
- ARCH=i386 AS_ROOT=no
|
||||
|
||||
matrix:
|
||||
exclude:
|
||||
- compiler: clang
|
||||
env: ARCH=i386 AS_ROOT=no
|
||||
|
||||
script:
|
||||
- ./admin/travis-build.sh
|
||||
|
||||
notifications:
|
||||
email:
|
||||
- [email protected]
|
||||
@@ -1,172 +0,0 @@
|
||||
Installation instructions Automated Testing Framework
|
||||
===========================================================================
|
||||
|
||||
|
||||
Introduction
|
||||
************
|
||||
|
||||
ATF uses the GNU Automake, GNU Autoconf and GNU Libtool utilities as its
|
||||
build system. These are used only when compiling the application from the
|
||||
source code package. If you want to install ATF from a binary package, you
|
||||
do not need to read this document.
|
||||
|
||||
For the impatient:
|
||||
|
||||
$ ./configure
|
||||
$ make
|
||||
Gain root privileges
|
||||
# make install
|
||||
Drop root privileges
|
||||
$ make installcheck
|
||||
|
||||
Or alternatively, install as a regular user into your home directory:
|
||||
|
||||
$ ./configure --prefix ~/local
|
||||
$ make
|
||||
$ make install
|
||||
$ make installcheck
|
||||
|
||||
|
||||
Dependencies
|
||||
************
|
||||
|
||||
To build and use ATF successfully you need:
|
||||
|
||||
* A standards-compliant C/C++ complier. For example, GNU GCC 2.95 will not
|
||||
work.
|
||||
|
||||
* A POSIX shell interpreter.
|
||||
|
||||
* A make(1) utility.
|
||||
|
||||
If you are building ATF from the code on the repository, you will also need
|
||||
to have GNU autoconf, automake and libtool installed.
|
||||
|
||||
|
||||
Regenerating the build system
|
||||
*****************************
|
||||
|
||||
If you are building ATF from code extracted from the repository, you must
|
||||
first regenerate the files used by the build system. You will also need to
|
||||
do this if you modify configure.ac, Makefile.am or any of the other build
|
||||
system files. To do this, simply run:
|
||||
|
||||
$ autoreconf -i -s
|
||||
|
||||
For formal releases, no extra steps are needed.
|
||||
|
||||
|
||||
General build procedure
|
||||
***********************
|
||||
|
||||
To build and install the source package, you must follow these steps:
|
||||
|
||||
1. Configure the sources to adapt to your operating system. This is done
|
||||
using the 'configure' script located on the sources' top directory,
|
||||
and it is usually invoked without arguments unless you want to change
|
||||
the installation prefix. More details on this procedure are given on a
|
||||
later section.
|
||||
|
||||
2. Build the sources to generate the binaries and scripts. Simply run
|
||||
'make' on the sources' top directory after configuring them. No
|
||||
problems should arise.
|
||||
|
||||
3. Install the program by running 'make install'. You may need to become
|
||||
root to issue this step.
|
||||
|
||||
4. Issue any manual installation steps that may be required. These are
|
||||
described later in their own section.
|
||||
|
||||
5. Check that the installed programs work by running 'make installcheck'.
|
||||
You do not need to be root to do this, even though some checks will not
|
||||
be run otherwise.
|
||||
|
||||
|
||||
Configuration flags
|
||||
*******************
|
||||
|
||||
The most common, standard flags given to 'configure' are:
|
||||
|
||||
* --prefix=directory
|
||||
Possible values: Any path
|
||||
Default: /usr/local
|
||||
|
||||
Specifies where the program (binaries and all associated files) will
|
||||
be installed.
|
||||
|
||||
* --help
|
||||
Shows information about all available flags and exits immediately,
|
||||
without running any configuration tasks.
|
||||
|
||||
The following environment variables are specific to ATF's 'configure'
|
||||
script:
|
||||
|
||||
* ATF_BUILD_CC
|
||||
Possible values: empty, a absolute or relative path to a C compiler.
|
||||
Default: the value of CC as detected by the configure script.
|
||||
|
||||
Specifies the C compiler that ATF will use at run time whenever the
|
||||
build-time-specific checks are used.
|
||||
|
||||
* ATF_BUILD_CFLAGS
|
||||
Possible values: empty, a list of valid C compiler flags.
|
||||
Default: the value of CFLAGS as detected by the configure script.
|
||||
|
||||
Specifies the C compiler flags that ATF will use at run time whenever the
|
||||
build-time-specific checks are used.
|
||||
|
||||
* ATF_BUILD_CPP
|
||||
Possible values: empty, a absolute or relative path to a C/C++
|
||||
preprocessor.
|
||||
Default: the value of CPP as detected by the configure script.
|
||||
|
||||
Specifies the C/C++ preprocessor that ATF will use at run time whenever
|
||||
the build-time-specific checks are used.
|
||||
|
||||
* ATF_BUILD_CPPFLAGS
|
||||
Possible values: empty, a list of valid C/C++ preprocessor flags.
|
||||
Default: the value of CPPFLAGS as detected by the configure script.
|
||||
|
||||
Specifies the C/C++ preprocessor flags that ATF will use at run time
|
||||
whenever the build-time-specific checks are used.
|
||||
|
||||
* ATF_BUILD_CXX
|
||||
Possible values: empty, a absolute or relative path to a C++ compiler.
|
||||
Default: the value of CXX as detected by the configure script.
|
||||
|
||||
Specifies the C++ compiler that ATF will use at run time whenever the
|
||||
build-time-specific checks are used.
|
||||
|
||||
* ATF_BUILD_CXXFLAGS
|
||||
Possible values: empty, a list of valid C++ compiler flags.
|
||||
Default: the value of CXXFLAGS as detected by the configure script.
|
||||
|
||||
Specifies the C++ compiler flags that ATF will use at run time whenever
|
||||
the build-time-specific checks are used.
|
||||
|
||||
* ATF_SHELL
|
||||
Possible values: empty, absolute path to a POSIX shell interpreter.
|
||||
Default: empty.
|
||||
|
||||
Specifies the POSIX shell interpreter that ATF will use at run time to
|
||||
execute its scripts and the test programs written using the atf-sh
|
||||
library. If empty, the configure script will try to find a suitable
|
||||
interpreter for you.
|
||||
|
||||
The following flags are specific to ATF's 'configure' script:
|
||||
|
||||
* --enable-developer
|
||||
Possible values: yes, no
|
||||
Default: 'yes' in Git HEAD builds; 'no' in formal releases.
|
||||
|
||||
Enables several features useful for development, such as the inclusion
|
||||
of debugging symbols in all objects or the enforcement of compilation
|
||||
warnings.
|
||||
|
||||
The compiler will be executed with an exhaustive collection of warning
|
||||
detection features regardless of the value of this flag. However, such
|
||||
warnings are only fatal when --enable-developer is 'yes'.
|
||||
|
||||
|
||||
===========================================================================
|
||||
vim: filetype=text:textwidth=75:expandtab:shiftwidth=2:softtabstop=2
|
||||
+50
-12
@@ -26,6 +26,7 @@
|
||||
atf_aclocal_DATA =
|
||||
BUILT_SOURCES =
|
||||
CLEANFILES =
|
||||
CODE_COVERAGE_DIRS =
|
||||
EXTRA_DIST =
|
||||
bin_PROGRAMS =
|
||||
dist_man_MANS =
|
||||
@@ -52,9 +53,9 @@ include test-programs/Makefile.am.inc
|
||||
# Top-level distfile documents.
|
||||
#
|
||||
|
||||
doc_DATA = AUTHORS COPYING NEWS README
|
||||
noinst_DATA += INSTALL README
|
||||
EXTRA_DIST += $(doc_DATA) INSTALL README
|
||||
doc_DATA = AUTHORS COPYING NEWS README.md
|
||||
noinst_DATA += INSTALL.md README.md
|
||||
EXTRA_DIST += $(doc_DATA) INSTALL.md README.md
|
||||
|
||||
#
|
||||
# Supporting logic to run our custom testsuite.
|
||||
@@ -63,6 +64,22 @@ EXTRA_DIST += $(doc_DATA) INSTALL README
|
||||
TESTS_ENVIRONMENT = PATH=$(prefix)/bin:$${PATH} \
|
||||
PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig
|
||||
|
||||
if HAVE_ASAN
|
||||
# NB: the trailing comma is intentional. I hate automake not allowing `:=` use on subsequent lines.
|
||||
if HAVE_LSAN
|
||||
LSAN_OPTIONS = detect_leaks=1,
|
||||
else
|
||||
LSAN_OPTIONS =
|
||||
endif
|
||||
# Some of the testcases trigger false positives as they pass
|
||||
# `SIZE_MAX - 1`, etc, to malloc(3).
|
||||
ASAN_OPTIONS = ${LSAN_OPTIONS}allocator_may_return_null=1
|
||||
TESTS_ENVIRONMENT+= ASAN_OPTIONS=${ASAN_OPTIONS}
|
||||
endif
|
||||
if HAVE_UBSAN
|
||||
TESTS_ENVIRONMENT+= UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1
|
||||
endif
|
||||
|
||||
# Allow the caller to override the configuration file to passed to our
|
||||
# test runs below.
|
||||
KYUA_TEST_CONFIG_FILE = none
|
||||
@@ -73,6 +90,7 @@ pkgtestsdir = $(testsdir)/$(PACKAGE)
|
||||
PHONY_TARGETS += installcheck-kyua
|
||||
if HAVE_KYUA
|
||||
INSTALLCHECK_TARGETS += installcheck-kyua
|
||||
|
||||
installcheck-kyua:
|
||||
set +e; cd $(pkgtestsdir) && $(TESTS_ENVIRONMENT) \
|
||||
$(KYUA) --config='$(KYUA_TEST_CONFIG_FILE)' test; \
|
||||
@@ -82,11 +100,39 @@ installcheck-kyua:
|
||||
cd $(pkgtestsdir) && $(TESTS_ENVIRONMENT) \
|
||||
$(KYUA) --config='$(KYUA_TEST_CONFIG_FILE)' \
|
||||
report-junit --output="$$JUNIT_OUTPUT"; \
|
||||
sed -i '' 's/encoding="iso-8859-1"/econding="utf-8"/' "$$JUNIT_OUTPUT"; \
|
||||
sed -i '.orig' 's/encoding="iso-8859-1"/encoding="utf-8"/' "$$JUNIT_OUTPUT"; \
|
||||
rm -f "$$JUNIT_OUTPUT.orig"; \
|
||||
fi; \
|
||||
cd $(pkgtestsdir) && $(TESTS_ENVIRONMENT) \
|
||||
$(KYUA) --config='$(KYUA_TEST_CONFIG_FILE)' report --verbose; \
|
||||
exit $$ret
|
||||
|
||||
if CODE_COVERAGE
|
||||
CODE_COVERAGE_EXCLUDES = '/usr/include/*' '/usr/local/include/*'
|
||||
CODE_COVERAGE_OUTPUT_DIR ?= code_coverage
|
||||
EXTRA_GENHTML_ARGS ?=
|
||||
INSTALLCHECK_TARGETS+= installcheck-kyua-lcov
|
||||
|
||||
installcheck-kyua-lcov: installcheck-kyua
|
||||
mkdir -p $(CODE_COVERAGE_OUTPUT_DIR)/html
|
||||
$(LCOV) --capture --directory $(srcdir) \
|
||||
--output-file $(CODE_COVERAGE_OUTPUT_DIR)/lcov.info
|
||||
$(LCOV) --remove $(CODE_COVERAGE_OUTPUT_DIR)/lcov.info \
|
||||
$(CODE_COVERAGE_EXCLUDES) \
|
||||
--output-file $(CODE_COVERAGE_OUTPUT_DIR)/lcov-filtered.info
|
||||
$(GENHTML) -o $(CODE_COVERAGE_OUTPUT_DIR)/html $(EXTRA_GENHTML_ARGS) \
|
||||
$(CODE_COVERAGE_OUTPUT_DIR)/lcov-filtered.info
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
if CODE_COVERAGE
|
||||
PHONY_TARGETS += mostlyclean-code-coverage
|
||||
mostlyclean-local: mostlyclean-code-coverage
|
||||
mostlyclean-code-coverage:
|
||||
-for dir in $(CODE_COVERAGE_DIRS); do \
|
||||
find $$dir \( -name \*.gcda -or -name \*.gcno \) -delete -print; \
|
||||
done
|
||||
endif
|
||||
|
||||
installcheck-local: $(INSTALLCHECK_TARGETS)
|
||||
@@ -114,12 +160,4 @@ clean-all:
|
||||
|
||||
.PHONY: $(PHONY_TARGETS)
|
||||
|
||||
# TODO(jmmv): Remove after atf 0.22.
|
||||
install-data-hook:
|
||||
cd $(DESTDIR)$(man3dir) && \
|
||||
for binding in c c++ sh; do \
|
||||
rm -f "atf-$${binding}-api.3"; \
|
||||
$(LN_S) "atf-$${binding}.3" "atf-$${binding}-api.3"; \
|
||||
done
|
||||
|
||||
# vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8
|
||||
+229
-268
@@ -1,7 +1,7 @@
|
||||
# Makefile.in generated by automake 1.16.3 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.18.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994-2025 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
@@ -324,6 +324,8 @@ am__make_running_with_option = \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
am__rm_f = rm -f $(am__rm_f_notfound)
|
||||
am__rm_rf = rm -rf $(am__rm_f_notfound)
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
@@ -365,7 +367,6 @@ tests_atf_c___PROGRAMS = atf-c++/atf_c++_test$(EXEEXT) \
|
||||
atf-c++/utils_test$(EXEEXT)
|
||||
tests_atf_c___detail_PROGRAMS = \
|
||||
atf-c++/detail/application_test$(EXEEXT) \
|
||||
atf-c++/detail/auto_array_test$(EXEEXT) \
|
||||
atf-c++/detail/env_test$(EXEEXT) \
|
||||
atf-c++/detail/exceptions_test$(EXEEXT) \
|
||||
atf-c++/detail/fs_test$(EXEEXT) \
|
||||
@@ -376,16 +377,22 @@ check_PROGRAMS = bootstrap/h_tp_basic_c$(EXEEXT) \
|
||||
bootstrap/h_tp_basic_cpp$(EXEEXT)
|
||||
tests_test_programs_PROGRAMS = test-programs/c_helpers$(EXEEXT) \
|
||||
test-programs/cpp_helpers$(EXEEXT)
|
||||
@HAVE_KYUA_TRUE@am__append_1 = installcheck-kyua
|
||||
@HAVE_ASAN_TRUE@am__append_1 = ASAN_OPTIONS=${ASAN_OPTIONS}
|
||||
@HAVE_UBSAN_TRUE@am__append_2 = UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1
|
||||
@HAVE_KYUA_TRUE@am__append_3 = installcheck-kyua
|
||||
@CODE_COVERAGE_TRUE@@HAVE_KYUA_TRUE@am__append_4 = installcheck-kyua-lcov
|
||||
@CODE_COVERAGE_TRUE@am__append_5 = mostlyclean-code-coverage
|
||||
subdir = .
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/compiler-flags.m4 \
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/ac_cxx_compile_stdcxx.m4 \
|
||||
$(top_srcdir)/m4/compiler-flags.m4 \
|
||||
$(top_srcdir)/m4/cxx-std-funcs.m4 \
|
||||
$(top_srcdir)/m4/developer-mode.m4 \
|
||||
$(top_srcdir)/m4/developer-mode.m4 $(top_srcdir)/m4/libtool.m4 \
|
||||
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
||||
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
|
||||
$(top_srcdir)/m4/module-application.m4 \
|
||||
$(top_srcdir)/m4/module-defs.m4 $(top_srcdir)/m4/module-env.m4 \
|
||||
$(top_srcdir)/m4/module-fs.m4 $(top_srcdir)/m4/runtime-tool.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
$(top_srcdir)/m4/module-defs.m4 $(top_srcdir)/m4/module-fs.m4 \
|
||||
$(top_srcdir)/m4/runtime-tool.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
|
||||
@@ -405,8 +412,8 @@ am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" \
|
||||
"$(DESTDIR)$(tests_atf_cdir)" "$(DESTDIR)$(tests_atf_c__dir)" \
|
||||
"$(DESTDIR)$(tests_atf_shdir)" \
|
||||
"$(DESTDIR)$(tests_test_programsdir)" "$(DESTDIR)$(man1dir)" \
|
||||
"$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man4dir)" \
|
||||
"$(DESTDIR)$(man7dir)" "$(DESTDIR)$(atf_aclocaldir)" \
|
||||
"$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man7dir)" \
|
||||
"$(DESTDIR)$(atf_aclocaldir)" \
|
||||
"$(DESTDIR)$(atf_c__dirpkgconfigdir)" \
|
||||
"$(DESTDIR)$(atf_cpkgconfigdir)" "$(DESTDIR)$(atf_shdir)" \
|
||||
"$(DESTDIR)$(atf_shpkgconfigdir)" "$(DESTDIR)$(docdir)" \
|
||||
@@ -443,10 +450,9 @@ am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__uninstall_files_from_dir = { \
|
||||
test -z "$$files" \
|
||||
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||
{ test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||
$(am__cd) "$$dir" && echo $$files | $(am__xargs_n) 40 $(am__rm_f); }; \
|
||||
}
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
|
||||
atf_c___detail_libtest_helpers_la_LIBADD =
|
||||
@@ -514,12 +520,6 @@ atf_c___detail_application_test_OBJECTS = \
|
||||
$(am_atf_c___detail_application_test_OBJECTS)
|
||||
atf_c___detail_application_test_DEPENDENCIES = \
|
||||
atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
|
||||
am_atf_c___detail_auto_array_test_OBJECTS = \
|
||||
atf-c++/detail/auto_array_test.$(OBJEXT)
|
||||
atf_c___detail_auto_array_test_OBJECTS = \
|
||||
$(am_atf_c___detail_auto_array_test_OBJECTS)
|
||||
atf_c___detail_auto_array_test_DEPENDENCIES = \
|
||||
atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
|
||||
am_atf_c___detail_env_test_OBJECTS = \
|
||||
atf-c++/detail/env_test.$(OBJEXT)
|
||||
atf_c___detail_env_test_OBJECTS = \
|
||||
@@ -708,7 +708,6 @@ am__depfiles_remade = \
|
||||
atf-c++/detail/$(DEPDIR)/application.Plo \
|
||||
atf-c++/detail/$(DEPDIR)/application_test.Po \
|
||||
atf-c++/detail/$(DEPDIR)/atf_c___detail_libtest_helpers_la-test_helpers.Plo \
|
||||
atf-c++/detail/$(DEPDIR)/auto_array_test.Po \
|
||||
atf-c++/detail/$(DEPDIR)/env.Plo \
|
||||
atf-c++/detail/$(DEPDIR)/env_test.Po \
|
||||
atf-c++/detail/$(DEPDIR)/exceptions.Plo \
|
||||
@@ -805,7 +804,6 @@ SOURCES = $(atf_c___detail_libtest_helpers_la_SOURCES) \
|
||||
$(nodist_libatf_c_la_SOURCES) $(atf_c___atf_c___test_SOURCES) \
|
||||
$(atf_c___build_test_SOURCES) $(atf_c___check_test_SOURCES) \
|
||||
$(atf_c___detail_application_test_SOURCES) \
|
||||
$(atf_c___detail_auto_array_test_SOURCES) \
|
||||
$(atf_c___detail_env_test_SOURCES) \
|
||||
$(atf_c___detail_exceptions_test_SOURCES) \
|
||||
$(atf_c___detail_fs_test_SOURCES) \
|
||||
@@ -839,7 +837,6 @@ DIST_SOURCES = $(atf_c___detail_libtest_helpers_la_SOURCES) \
|
||||
$(atf_c___atf_c___test_SOURCES) $(atf_c___build_test_SOURCES) \
|
||||
$(atf_c___check_test_SOURCES) \
|
||||
$(atf_c___detail_application_test_SOURCES) \
|
||||
$(atf_c___detail_auto_array_test_SOURCES) \
|
||||
$(atf_c___detail_env_test_SOURCES) \
|
||||
$(atf_c___detail_exceptions_test_SOURCES) \
|
||||
$(atf_c___detail_fs_test_SOURCES) \
|
||||
@@ -874,7 +871,6 @@ am__can_run_installinfo = \
|
||||
esac
|
||||
man1dir = $(mandir)/man1
|
||||
man3dir = $(mandir)/man3
|
||||
man4dir = $(mandir)/man4
|
||||
man7dir = $(mandir)/man7
|
||||
NROFF = nroff
|
||||
MANS = $(dist_man_MANS) $(man_MANS)
|
||||
@@ -904,9 +900,6 @@ am__define_uniq_tagged_files = \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
CSCOPE = cscope
|
||||
AM_RECURSIVE_TARGETS = cscope
|
||||
am__DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.in \
|
||||
$(srcdir)/admin/Makefile.am.inc \
|
||||
@@ -923,28 +916,30 @@ am__DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.in \
|
||||
$(top_srcdir)/admin/config.sub $(top_srcdir)/admin/depcomp \
|
||||
$(top_srcdir)/admin/install-sh $(top_srcdir)/admin/ltmain.sh \
|
||||
$(top_srcdir)/admin/missing $(top_srcdir)/atf-c/defs.h.in \
|
||||
AUTHORS COPYING INSTALL NEWS README admin/ar-lib admin/compile \
|
||||
admin/config.guess admin/config.sub admin/depcomp \
|
||||
admin/install-sh admin/ltmain.sh admin/missing
|
||||
AUTHORS COPYING INSTALL.md NEWS README.md admin/ar-lib \
|
||||
admin/compile admin/config.guess admin/config.sub \
|
||||
admin/depcomp admin/install-sh admin/ltmain.sh admin/missing
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
am__remove_distdir = \
|
||||
if test -d "$(distdir)"; then \
|
||||
find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -rf "$(distdir)" \
|
||||
find "$(distdir)" -type d ! -perm -700 -exec chmod u+rwx {} ';' \
|
||||
; rm -rf "$(distdir)" \
|
||||
|| { sleep 5 && rm -rf "$(distdir)"; }; \
|
||||
else :; fi
|
||||
am__post_remove_distdir = $(am__remove_distdir)
|
||||
DIST_ARCHIVES = $(distdir).tar.gz
|
||||
GZIP_ENV = --best
|
||||
GZIP_ENV = -9
|
||||
DIST_TARGETS = dist-gzip
|
||||
# Exists only to be overridden by the user if desired.
|
||||
AM_DISTCHECK_DVI_TARGET = dvi
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
|
||||
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
distcleancheck_listfiles = \
|
||||
find . \( -type f -a \! \
|
||||
\( -name .nfs* -o -name .smb* -o -name .__afs* \) \) -print
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
@@ -957,6 +952,7 @@ ATF_BUILD_CXX = @ATF_BUILD_CXX@
|
||||
ATF_BUILD_CXXFLAGS = @ATF_BUILD_CXXFLAGS@
|
||||
ATF_SHELL = @ATF_SHELL@
|
||||
ATTRIBUTE_FORMAT_PRINTF = @ATTRIBUTE_FORMAT_PRINTF@
|
||||
ATTRIBUTE_NONNULL = @ATTRIBUTE_NONNULL@
|
||||
ATTRIBUTE_NORETURN = @ATTRIBUTE_NORETURN@
|
||||
ATTRIBUTE_UNUSED = @ATTRIBUTE_UNUSED@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
@@ -968,6 +964,8 @@ CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CSCOPE = @CSCOPE@
|
||||
CTAGS = @CTAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
@@ -982,16 +980,21 @@ ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
ETAGS = @ETAGS@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
FILECMD = @FILECMD@
|
||||
GENHTML = @GENHTML@
|
||||
GIT = @GIT@
|
||||
GREP = @GREP@
|
||||
HAVE_CXX20 = @HAVE_CXX20@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
KYUA = @KYUA@
|
||||
LCOV = @LCOV@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
@@ -1035,8 +1038,10 @@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__rm_f_notfound = @am__rm_f_notfound@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
am__xargs_n = @am__xargs_n@
|
||||
atf_aclocaldir = @atf_aclocaldir@
|
||||
atf_pkgconfigdir = @atf_pkgconfigdir@
|
||||
bindir = @bindir@
|
||||
@@ -1067,10 +1072,14 @@ localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pc_cflags = @pc_cflags@
|
||||
pc_cxxflags = @pc_cxxflags@
|
||||
pc_ldflags = @pc_ldflags@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
runstatedir = @runstatedir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
@@ -1097,6 +1106,8 @@ CLEANFILES = atf-c/atf-c.pc atf-c/pkg_config_test atf-c++/atf-c++.pc \
|
||||
test-programs/config_test test-programs/expect_test \
|
||||
test-programs/meta_data_test test-programs/result_test \
|
||||
test-programs/srcdir_test
|
||||
CODE_COVERAGE_DIRS = atf-c atf-c/detail atf-c++ atf-c++/detail atf-sh \
|
||||
bootstrap test-programs
|
||||
EXTRA_DIST = admin/check-style-common.awk admin/check-style-c.awk \
|
||||
admin/check-style-cpp.awk admin/check-style-man.awk \
|
||||
admin/check-style-shell.awk admin/check-style.sh \
|
||||
@@ -1118,23 +1129,24 @@ EXTRA_DIST = admin/check-style-common.awk admin/check-style-c.awk \
|
||||
test-programs/sh_helpers.sh test-programs/config_test.sh \
|
||||
test-programs/expect_test.sh test-programs/meta_data_test.sh \
|
||||
test-programs/result_test.sh test-programs/srcdir_test.sh \
|
||||
$(doc_DATA) INSTALL README $(pkgtests_DATA)
|
||||
$(doc_DATA) INSTALL.md README.md $(pkgtests_DATA)
|
||||
dist_man_MANS = atf-c/atf-c.3 atf-c++/atf-c++.3 atf-sh/atf-check.1 \
|
||||
atf-sh/atf-sh.1 atf-sh/atf-sh.3 doc/atf-test-case.4 \
|
||||
atf-sh/atf-sh.1 atf-sh/atf-sh.3 doc/atf-test-case.7 \
|
||||
doc/atf-test-program.1
|
||||
include_HEADERS = atf-c.h atf-c++.hpp
|
||||
lib_LTLIBRARIES = libatf-c.la libatf-c++.la
|
||||
man_MANS = doc/atf.7
|
||||
noinst_DATA = INSTALL README
|
||||
noinst_DATA = INSTALL.md README.md
|
||||
noinst_LTLIBRARIES = atf-c/detail/libtest_helpers.la \
|
||||
atf-c++/detail/libtest_helpers.la
|
||||
INSTALLCHECK_TARGETS = installcheck-bootstrap $(am__append_1)
|
||||
INSTALLCHECK_TARGETS = installcheck-bootstrap $(am__append_3) \
|
||||
$(am__append_4)
|
||||
|
||||
#
|
||||
# Custom targets.
|
||||
#
|
||||
PHONY_TARGETS = check-style installcheck-bootstrap installcheck-kyua \
|
||||
clean-all
|
||||
$(am__append_5) clean-all
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
libatf_c_la_SOURCES = atf-c/build.c atf-c/build.h atf-c/check.c \
|
||||
atf-c/check.h atf-c/error.c atf-c/error.h atf-c/error_fwd.h \
|
||||
@@ -1235,13 +1247,12 @@ libatf_c___la_SOURCES = atf-c++/build.cpp atf-c++/build.hpp \
|
||||
atf-c++/check.cpp atf-c++/check.hpp atf-c++/macros.hpp \
|
||||
atf-c++/tests.cpp atf-c++/tests.hpp atf-c++/utils.cpp \
|
||||
atf-c++/utils.hpp atf-c++/detail/application.cpp \
|
||||
atf-c++/detail/application.hpp atf-c++/detail/auto_array.hpp \
|
||||
atf-c++/detail/env.cpp atf-c++/detail/env.hpp \
|
||||
atf-c++/detail/exceptions.cpp atf-c++/detail/exceptions.hpp \
|
||||
atf-c++/detail/fs.cpp atf-c++/detail/fs.hpp \
|
||||
atf-c++/detail/process.cpp atf-c++/detail/process.hpp \
|
||||
atf-c++/detail/sanity.hpp atf-c++/detail/text.cpp \
|
||||
atf-c++/detail/text.hpp
|
||||
atf-c++/detail/application.hpp atf-c++/detail/env.cpp \
|
||||
atf-c++/detail/env.hpp atf-c++/detail/exceptions.cpp \
|
||||
atf-c++/detail/exceptions.hpp atf-c++/detail/fs.cpp \
|
||||
atf-c++/detail/fs.hpp atf-c++/detail/process.cpp \
|
||||
atf-c++/detail/process.hpp atf-c++/detail/sanity.hpp \
|
||||
atf-c++/detail/text.cpp atf-c++/detail/text.hpp
|
||||
libatf_c___la_LDFLAGS = -version-info 2:0:0
|
||||
atf_c___HEADERS = atf-c++/build.hpp \
|
||||
atf-c++/check.hpp \
|
||||
@@ -1286,8 +1297,6 @@ atf_c___detail_libtest_helpers_la_SOURCES = atf-c++/detail/test_helpers.cpp \
|
||||
atf_c___detail_libtest_helpers_la_CPPFLAGS = -DATF_INCLUDEDIR=\"$(includedir)\"
|
||||
atf_c___detail_application_test_SOURCES = atf-c++/detail/application_test.cpp
|
||||
atf_c___detail_application_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
|
||||
atf_c___detail_auto_array_test_SOURCES = atf-c++/detail/auto_array_test.cpp
|
||||
atf_c___detail_auto_array_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
|
||||
atf_c___detail_env_test_SOURCES = atf-c++/detail/env_test.cpp
|
||||
atf_c___detail_env_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
|
||||
atf_c___detail_exceptions_test_SOURCES = atf-c++/detail/exceptions_test.cpp
|
||||
@@ -1350,20 +1359,28 @@ tests_test_programs_SCRIPTS = test-programs/sh_helpers \
|
||||
#
|
||||
# Top-level distfile documents.
|
||||
#
|
||||
doc_DATA = AUTHORS COPYING NEWS README
|
||||
doc_DATA = AUTHORS COPYING NEWS README.md
|
||||
|
||||
#
|
||||
# Supporting logic to run our custom testsuite.
|
||||
#
|
||||
TESTS_ENVIRONMENT = PATH=$(prefix)/bin:$${PATH} \
|
||||
PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig
|
||||
PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig $(am__append_1) \
|
||||
$(am__append_2)
|
||||
@HAVE_ASAN_TRUE@@HAVE_LSAN_FALSE@LSAN_OPTIONS =
|
||||
|
||||
# NB: the trailing comma is intentional. I hate automake not allowing `:=` use on subsequent lines.
|
||||
@HAVE_ASAN_TRUE@@HAVE_LSAN_TRUE@LSAN_OPTIONS = detect_leaks=1,
|
||||
# Some of the testcases trigger false positives as they pass
|
||||
# `SIZE_MAX - 1`, etc, to malloc(3).
|
||||
@HAVE_ASAN_TRUE@ASAN_OPTIONS = ${LSAN_OPTIONS}allocator_may_return_null=1
|
||||
|
||||
# Allow the caller to override the configuration file to passed to our
|
||||
# test runs below.
|
||||
KYUA_TEST_CONFIG_FILE = none
|
||||
testsdir = $(exec_prefix)/tests
|
||||
pkgtestsdir = $(testsdir)/$(PACKAGE)
|
||||
@CODE_COVERAGE_TRUE@@HAVE_KYUA_TRUE@CODE_COVERAGE_EXCLUDES = '/usr/include/*' '/usr/local/include/*'
|
||||
pkgtests_DATA = Kyuafile
|
||||
BUILD_SH_TP = \
|
||||
test -d "$$(dirname "$${dst}")" || mkdir -p "$$(dirname "$${dst}")"; \
|
||||
@@ -1420,12 +1437,12 @@ config.h: stamp-h1
|
||||
@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
|
||||
|
||||
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
|
||||
@rm -f stamp-h1
|
||||
cd $(top_builddir) && $(SHELL) ./config.status config.h
|
||||
$(AM_V_at)rm -f stamp-h1
|
||||
$(AM_V_GEN)cd $(top_builddir) && $(SHELL) ./config.status config.h
|
||||
$(srcdir)/config.h.in: $(am__configure_deps)
|
||||
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
|
||||
rm -f stamp-h1
|
||||
touch $@
|
||||
$(AM_V_GEN)($(am__cd) $(top_srcdir) && $(AUTOHEADER))
|
||||
$(AM_V_at)rm -f stamp-h1
|
||||
$(AM_V_at)touch $@
|
||||
|
||||
distclean-hdr:
|
||||
-rm -f config.h stamp-h1
|
||||
@@ -1470,25 +1487,15 @@ uninstall-binPROGRAMS:
|
||||
`; \
|
||||
test -n "$$list" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(bindir)" && rm -f $$files
|
||||
cd "$(DESTDIR)$(bindir)" && $(am__rm_f) $$files
|
||||
|
||||
clean-binPROGRAMS:
|
||||
@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list || exit $$?; \
|
||||
test -n "$(EXEEXT)" || exit 0; \
|
||||
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list
|
||||
$(am__rm_f) $(bin_PROGRAMS)
|
||||
test -z "$(EXEEXT)" || $(am__rm_f) $(bin_PROGRAMS:$(EXEEXT)=)
|
||||
|
||||
clean-checkPROGRAMS:
|
||||
@list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list || exit $$?; \
|
||||
test -n "$(EXEEXT)" || exit 0; \
|
||||
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list
|
||||
$(am__rm_f) $(check_PROGRAMS)
|
||||
test -z "$(EXEEXT)" || $(am__rm_f) $(check_PROGRAMS:$(EXEEXT)=)
|
||||
install-libexecPROGRAMS: $(libexec_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \
|
||||
@@ -1528,16 +1535,11 @@ uninstall-libexecPROGRAMS:
|
||||
`; \
|
||||
test -n "$$list" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(libexecdir)" && rm -f $$files
|
||||
cd "$(DESTDIR)$(libexecdir)" && $(am__rm_f) $$files
|
||||
|
||||
clean-libexecPROGRAMS:
|
||||
@list='$(libexec_PROGRAMS)'; test -n "$$list" || exit 0; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list || exit $$?; \
|
||||
test -n "$(EXEEXT)" || exit 0; \
|
||||
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list
|
||||
$(am__rm_f) $(libexec_PROGRAMS)
|
||||
test -z "$(EXEEXT)" || $(am__rm_f) $(libexec_PROGRAMS:$(EXEEXT)=)
|
||||
install-tests_atf_cPROGRAMS: $(tests_atf_c_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(tests_atf_c_PROGRAMS)'; test -n "$(tests_atf_cdir)" || list=; \
|
||||
@@ -1577,16 +1579,11 @@ uninstall-tests_atf_cPROGRAMS:
|
||||
`; \
|
||||
test -n "$$list" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(tests_atf_cdir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(tests_atf_cdir)" && rm -f $$files
|
||||
cd "$(DESTDIR)$(tests_atf_cdir)" && $(am__rm_f) $$files
|
||||
|
||||
clean-tests_atf_cPROGRAMS:
|
||||
@list='$(tests_atf_c_PROGRAMS)'; test -n "$$list" || exit 0; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list || exit $$?; \
|
||||
test -n "$(EXEEXT)" || exit 0; \
|
||||
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list
|
||||
$(am__rm_f) $(tests_atf_c_PROGRAMS)
|
||||
test -z "$(EXEEXT)" || $(am__rm_f) $(tests_atf_c_PROGRAMS:$(EXEEXT)=)
|
||||
install-tests_atf_c__PROGRAMS: $(tests_atf_c___PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(tests_atf_c___PROGRAMS)'; test -n "$(tests_atf_c__dir)" || list=; \
|
||||
@@ -1626,16 +1623,11 @@ uninstall-tests_atf_c__PROGRAMS:
|
||||
`; \
|
||||
test -n "$$list" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(tests_atf_c__dir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(tests_atf_c__dir)" && rm -f $$files
|
||||
cd "$(DESTDIR)$(tests_atf_c__dir)" && $(am__rm_f) $$files
|
||||
|
||||
clean-tests_atf_c__PROGRAMS:
|
||||
@list='$(tests_atf_c___PROGRAMS)'; test -n "$$list" || exit 0; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list || exit $$?; \
|
||||
test -n "$(EXEEXT)" || exit 0; \
|
||||
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list
|
||||
$(am__rm_f) $(tests_atf_c___PROGRAMS)
|
||||
test -z "$(EXEEXT)" || $(am__rm_f) $(tests_atf_c___PROGRAMS:$(EXEEXT)=)
|
||||
install-tests_atf_c___detailPROGRAMS: $(tests_atf_c___detail_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(tests_atf_c___detail_PROGRAMS)'; test -n "$(tests_atf_c___detaildir)" || list=; \
|
||||
@@ -1675,16 +1667,11 @@ uninstall-tests_atf_c___detailPROGRAMS:
|
||||
`; \
|
||||
test -n "$$list" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(tests_atf_c___detaildir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(tests_atf_c___detaildir)" && rm -f $$files
|
||||
cd "$(DESTDIR)$(tests_atf_c___detaildir)" && $(am__rm_f) $$files
|
||||
|
||||
clean-tests_atf_c___detailPROGRAMS:
|
||||
@list='$(tests_atf_c___detail_PROGRAMS)'; test -n "$$list" || exit 0; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list || exit $$?; \
|
||||
test -n "$(EXEEXT)" || exit 0; \
|
||||
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list
|
||||
$(am__rm_f) $(tests_atf_c___detail_PROGRAMS)
|
||||
test -z "$(EXEEXT)" || $(am__rm_f) $(tests_atf_c___detail_PROGRAMS:$(EXEEXT)=)
|
||||
install-tests_atf_c_detailPROGRAMS: $(tests_atf_c_detail_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(tests_atf_c_detail_PROGRAMS)'; test -n "$(tests_atf_c_detaildir)" || list=; \
|
||||
@@ -1724,16 +1711,11 @@ uninstall-tests_atf_c_detailPROGRAMS:
|
||||
`; \
|
||||
test -n "$$list" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(tests_atf_c_detaildir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(tests_atf_c_detaildir)" && rm -f $$files
|
||||
cd "$(DESTDIR)$(tests_atf_c_detaildir)" && $(am__rm_f) $$files
|
||||
|
||||
clean-tests_atf_c_detailPROGRAMS:
|
||||
@list='$(tests_atf_c_detail_PROGRAMS)'; test -n "$$list" || exit 0; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list || exit $$?; \
|
||||
test -n "$(EXEEXT)" || exit 0; \
|
||||
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list
|
||||
$(am__rm_f) $(tests_atf_c_detail_PROGRAMS)
|
||||
test -z "$(EXEEXT)" || $(am__rm_f) $(tests_atf_c_detail_PROGRAMS:$(EXEEXT)=)
|
||||
install-tests_test_programsPROGRAMS: $(tests_test_programs_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(tests_test_programs_PROGRAMS)'; test -n "$(tests_test_programsdir)" || list=; \
|
||||
@@ -1773,16 +1755,11 @@ uninstall-tests_test_programsPROGRAMS:
|
||||
`; \
|
||||
test -n "$$list" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(tests_test_programsdir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(tests_test_programsdir)" && rm -f $$files
|
||||
cd "$(DESTDIR)$(tests_test_programsdir)" && $(am__rm_f) $$files
|
||||
|
||||
clean-tests_test_programsPROGRAMS:
|
||||
@list='$(tests_test_programs_PROGRAMS)'; test -n "$$list" || exit 0; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list || exit $$?; \
|
||||
test -n "$(EXEEXT)" || exit 0; \
|
||||
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list
|
||||
$(am__rm_f) $(tests_test_programs_PROGRAMS)
|
||||
test -z "$(EXEEXT)" || $(am__rm_f) $(tests_test_programs_PROGRAMS:$(EXEEXT)=)
|
||||
|
||||
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
@@ -1809,32 +1786,28 @@ uninstall-libLTLIBRARIES:
|
||||
done
|
||||
|
||||
clean-libLTLIBRARIES:
|
||||
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
|
||||
-$(am__rm_f) $(lib_LTLIBRARIES)
|
||||
@list='$(lib_LTLIBRARIES)'; \
|
||||
locs=`for p in $$list; do echo $$p; done | \
|
||||
sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
|
||||
sort -u`; \
|
||||
test -z "$$locs" || { \
|
||||
echo rm -f $${locs}; \
|
||||
rm -f $${locs}; \
|
||||
}
|
||||
echo rm -f $${locs}; \
|
||||
$(am__rm_f) $${locs}
|
||||
|
||||
clean-noinstLTLIBRARIES:
|
||||
-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
|
||||
-$(am__rm_f) $(noinst_LTLIBRARIES)
|
||||
@list='$(noinst_LTLIBRARIES)'; \
|
||||
locs=`for p in $$list; do echo $$p; done | \
|
||||
sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
|
||||
sort -u`; \
|
||||
test -z "$$locs" || { \
|
||||
echo rm -f $${locs}; \
|
||||
rm -f $${locs}; \
|
||||
}
|
||||
echo rm -f $${locs}; \
|
||||
$(am__rm_f) $${locs}
|
||||
atf-c++/detail/$(am__dirstamp):
|
||||
@$(MKDIR_P) atf-c++/detail
|
||||
@: > atf-c++/detail/$(am__dirstamp)
|
||||
@: >>atf-c++/detail/$(am__dirstamp)
|
||||
atf-c++/detail/$(DEPDIR)/$(am__dirstamp):
|
||||
@$(MKDIR_P) atf-c++/detail/$(DEPDIR)
|
||||
@: > atf-c++/detail/$(DEPDIR)/$(am__dirstamp)
|
||||
@: >>atf-c++/detail/$(DEPDIR)/$(am__dirstamp)
|
||||
atf-c++/detail/atf_c___detail_libtest_helpers_la-test_helpers.lo: \
|
||||
atf-c++/detail/$(am__dirstamp) \
|
||||
atf-c++/detail/$(DEPDIR)/$(am__dirstamp)
|
||||
@@ -1843,10 +1816,10 @@ atf-c++/detail/libtest_helpers.la: $(atf_c___detail_libtest_helpers_la_OBJECTS)
|
||||
$(AM_V_CXXLD)$(CXXLINK) $(atf_c___detail_libtest_helpers_la_OBJECTS) $(atf_c___detail_libtest_helpers_la_LIBADD) $(LIBS)
|
||||
atf-c/detail/$(am__dirstamp):
|
||||
@$(MKDIR_P) atf-c/detail
|
||||
@: > atf-c/detail/$(am__dirstamp)
|
||||
@: >>atf-c/detail/$(am__dirstamp)
|
||||
atf-c/detail/$(DEPDIR)/$(am__dirstamp):
|
||||
@$(MKDIR_P) atf-c/detail/$(DEPDIR)
|
||||
@: > atf-c/detail/$(DEPDIR)/$(am__dirstamp)
|
||||
@: >>atf-c/detail/$(DEPDIR)/$(am__dirstamp)
|
||||
atf-c/detail/atf_c_detail_libtest_helpers_la-test_helpers.lo: \
|
||||
atf-c/detail/$(am__dirstamp) \
|
||||
atf-c/detail/$(DEPDIR)/$(am__dirstamp)
|
||||
@@ -1855,10 +1828,10 @@ atf-c/detail/libtest_helpers.la: $(atf_c_detail_libtest_helpers_la_OBJECTS) $(at
|
||||
$(AM_V_CCLD)$(LINK) $(atf_c_detail_libtest_helpers_la_OBJECTS) $(atf_c_detail_libtest_helpers_la_LIBADD) $(LIBS)
|
||||
atf-c++/$(am__dirstamp):
|
||||
@$(MKDIR_P) atf-c++
|
||||
@: > atf-c++/$(am__dirstamp)
|
||||
@: >>atf-c++/$(am__dirstamp)
|
||||
atf-c++/$(DEPDIR)/$(am__dirstamp):
|
||||
@$(MKDIR_P) atf-c++/$(DEPDIR)
|
||||
@: > atf-c++/$(DEPDIR)/$(am__dirstamp)
|
||||
@: >>atf-c++/$(DEPDIR)/$(am__dirstamp)
|
||||
atf-c++/build.lo: atf-c++/$(am__dirstamp) \
|
||||
atf-c++/$(DEPDIR)/$(am__dirstamp)
|
||||
atf-c++/check.lo: atf-c++/$(am__dirstamp) \
|
||||
@@ -1884,10 +1857,10 @@ libatf-c++.la: $(libatf_c___la_OBJECTS) $(libatf_c___la_DEPENDENCIES) $(EXTRA_li
|
||||
$(AM_V_CXXLD)$(libatf_c___la_LINK) -rpath $(libdir) $(libatf_c___la_OBJECTS) $(libatf_c___la_LIBADD) $(LIBS)
|
||||
atf-c/$(am__dirstamp):
|
||||
@$(MKDIR_P) atf-c
|
||||
@: > atf-c/$(am__dirstamp)
|
||||
@: >>atf-c/$(am__dirstamp)
|
||||
atf-c/$(DEPDIR)/$(am__dirstamp):
|
||||
@$(MKDIR_P) atf-c/$(DEPDIR)
|
||||
@: > atf-c/$(DEPDIR)/$(am__dirstamp)
|
||||
@: >>atf-c/$(DEPDIR)/$(am__dirstamp)
|
||||
atf-c/libatf_c_la-build.lo: atf-c/$(am__dirstamp) \
|
||||
atf-c/$(DEPDIR)/$(am__dirstamp)
|
||||
atf-c/libatf_c_la-check.lo: atf-c/$(am__dirstamp) \
|
||||
@@ -1948,13 +1921,6 @@ atf-c++/detail/application_test.$(OBJEXT): \
|
||||
atf-c++/detail/application_test$(EXEEXT): $(atf_c___detail_application_test_OBJECTS) $(atf_c___detail_application_test_DEPENDENCIES) $(EXTRA_atf_c___detail_application_test_DEPENDENCIES) atf-c++/detail/$(am__dirstamp)
|
||||
@rm -f atf-c++/detail/application_test$(EXEEXT)
|
||||
$(AM_V_CXXLD)$(CXXLINK) $(atf_c___detail_application_test_OBJECTS) $(atf_c___detail_application_test_LDADD) $(LIBS)
|
||||
atf-c++/detail/auto_array_test.$(OBJEXT): \
|
||||
atf-c++/detail/$(am__dirstamp) \
|
||||
atf-c++/detail/$(DEPDIR)/$(am__dirstamp)
|
||||
|
||||
atf-c++/detail/auto_array_test$(EXEEXT): $(atf_c___detail_auto_array_test_OBJECTS) $(atf_c___detail_auto_array_test_DEPENDENCIES) $(EXTRA_atf_c___detail_auto_array_test_DEPENDENCIES) atf-c++/detail/$(am__dirstamp)
|
||||
@rm -f atf-c++/detail/auto_array_test$(EXEEXT)
|
||||
$(AM_V_CXXLD)$(CXXLINK) $(atf_c___detail_auto_array_test_OBJECTS) $(atf_c___detail_auto_array_test_LDADD) $(LIBS)
|
||||
atf-c++/detail/env_test.$(OBJEXT): atf-c++/detail/$(am__dirstamp) \
|
||||
atf-c++/detail/$(DEPDIR)/$(am__dirstamp)
|
||||
|
||||
@@ -2127,10 +2093,10 @@ atf-c/utils_test$(EXEEXT): $(atf_c_utils_test_OBJECTS) $(atf_c_utils_test_DEPEND
|
||||
$(AM_V_CCLD)$(LINK) $(atf_c_utils_test_OBJECTS) $(atf_c_utils_test_LDADD) $(LIBS)
|
||||
atf-sh/$(am__dirstamp):
|
||||
@$(MKDIR_P) atf-sh
|
||||
@: > atf-sh/$(am__dirstamp)
|
||||
@: >>atf-sh/$(am__dirstamp)
|
||||
atf-sh/$(DEPDIR)/$(am__dirstamp):
|
||||
@$(MKDIR_P) atf-sh/$(DEPDIR)
|
||||
@: > atf-sh/$(DEPDIR)/$(am__dirstamp)
|
||||
@: >>atf-sh/$(DEPDIR)/$(am__dirstamp)
|
||||
atf-sh/atf_check-atf-check.$(OBJEXT): atf-sh/$(am__dirstamp) \
|
||||
atf-sh/$(DEPDIR)/$(am__dirstamp)
|
||||
|
||||
@@ -2145,10 +2111,10 @@ atf-sh/atf-sh$(EXEEXT): $(atf_sh_atf_sh_OBJECTS) $(atf_sh_atf_sh_DEPENDENCIES) $
|
||||
$(AM_V_CXXLD)$(CXXLINK) $(atf_sh_atf_sh_OBJECTS) $(atf_sh_atf_sh_LDADD) $(LIBS)
|
||||
bootstrap/$(am__dirstamp):
|
||||
@$(MKDIR_P) bootstrap
|
||||
@: > bootstrap/$(am__dirstamp)
|
||||
@: >>bootstrap/$(am__dirstamp)
|
||||
bootstrap/$(DEPDIR)/$(am__dirstamp):
|
||||
@$(MKDIR_P) bootstrap/$(DEPDIR)
|
||||
@: > bootstrap/$(DEPDIR)/$(am__dirstamp)
|
||||
@: >>bootstrap/$(DEPDIR)/$(am__dirstamp)
|
||||
bootstrap/h_tp_basic_c.$(OBJEXT): bootstrap/$(am__dirstamp) \
|
||||
bootstrap/$(DEPDIR)/$(am__dirstamp)
|
||||
|
||||
@@ -2163,10 +2129,10 @@ bootstrap/h_tp_basic_cpp$(EXEEXT): $(bootstrap_h_tp_basic_cpp_OBJECTS) $(bootstr
|
||||
$(AM_V_CXXLD)$(CXXLINK) $(bootstrap_h_tp_basic_cpp_OBJECTS) $(bootstrap_h_tp_basic_cpp_LDADD) $(LIBS)
|
||||
test-programs/$(am__dirstamp):
|
||||
@$(MKDIR_P) test-programs
|
||||
@: > test-programs/$(am__dirstamp)
|
||||
@: >>test-programs/$(am__dirstamp)
|
||||
test-programs/$(DEPDIR)/$(am__dirstamp):
|
||||
@$(MKDIR_P) test-programs/$(DEPDIR)
|
||||
@: > test-programs/$(DEPDIR)/$(am__dirstamp)
|
||||
@: >>test-programs/$(DEPDIR)/$(am__dirstamp)
|
||||
test-programs/c_helpers.$(OBJEXT): test-programs/$(am__dirstamp) \
|
||||
test-programs/$(DEPDIR)/$(am__dirstamp)
|
||||
|
||||
@@ -2350,7 +2316,6 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@atf-c++/detail/$(DEPDIR)/application.Plo@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@atf-c++/detail/$(DEPDIR)/application_test.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@atf-c++/detail/$(DEPDIR)/atf_c___detail_libtest_helpers_la-test_helpers.Plo@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@atf-c++/detail/$(DEPDIR)/auto_array_test.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@atf-c++/detail/$(DEPDIR)/env.Plo@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@atf-c++/detail/$(DEPDIR)/env_test.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@atf-c++/detail/$(DEPDIR)/exceptions.Plo@am__quote@ # am--include-marker
|
||||
@@ -2407,7 +2372,7 @@ distclean-compile:
|
||||
|
||||
$(am__depfiles_remade):
|
||||
@$(MKDIR_P) $(@D)
|
||||
@echo '# dummy' >$@-t && $(am__mv) $@-t $@
|
||||
@: >>$@
|
||||
|
||||
am--depfiles: $(am__depfiles_remade)
|
||||
|
||||
@@ -2910,49 +2875,6 @@ uninstall-man3:
|
||||
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
|
||||
dir='$(DESTDIR)$(man3dir)'; $(am__uninstall_files_from_dir)
|
||||
install-man4: $(dist_man_MANS) $(man_MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list1=''; \
|
||||
list2='$(dist_man_MANS) $(man_MANS)'; \
|
||||
test -n "$(man4dir)" \
|
||||
&& test -n "`echo $$list1$$list2`" \
|
||||
|| exit 0; \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(man4dir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(man4dir)" || exit 1; \
|
||||
{ for i in $$list1; do echo "$$i"; done; \
|
||||
if test -n "$$list2"; then \
|
||||
for i in $$list2; do echo "$$i"; done \
|
||||
| sed -n '/\.4[a-z]*$$/p'; \
|
||||
fi; \
|
||||
} | while read p; do \
|
||||
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; echo "$$p"; \
|
||||
done | \
|
||||
sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^4][0-9a-z]*$$,4,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
|
||||
sed 'N;N;s,\n, ,g' | { \
|
||||
list=; while read file base inst; do \
|
||||
if test "$$base" = "$$inst"; then list="$$list $$file"; else \
|
||||
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man4dir)/$$inst'"; \
|
||||
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man4dir)/$$inst" || exit $$?; \
|
||||
fi; \
|
||||
done; \
|
||||
for i in $$list; do echo "$$i"; done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
test -z "$$files" || { \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man4dir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(man4dir)" || exit $$?; }; \
|
||||
done; }
|
||||
|
||||
uninstall-man4:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list=''; test -n "$(man4dir)" || exit 0; \
|
||||
files=`{ for i in $$list; do echo "$$i"; done; \
|
||||
l2='$(dist_man_MANS) $(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
|
||||
sed -n '/\.4[a-z]*$$/p'; \
|
||||
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^4][0-9a-z]*$$,4,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
|
||||
dir='$(DESTDIR)$(man4dir)'; $(am__uninstall_files_from_dir)
|
||||
install-man7: $(dist_man_MANS) $(man_MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list1=''; \
|
||||
@@ -3424,7 +3346,7 @@ distdir-am: $(DISTFILES)
|
||||
exit 1;; \
|
||||
esac
|
||||
$(am__remove_distdir)
|
||||
test -d "$(distdir)" || mkdir "$(distdir)"
|
||||
$(AM_V_at)$(MKDIR_P) "$(distdir)"
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
@@ -3472,6 +3394,10 @@ dist-bzip2: distdir
|
||||
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-bzip3: distdir
|
||||
tardir=$(distdir) && $(am__tar) | bzip3 -c >$(distdir).tar.bz3
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-lzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
|
||||
$(am__post_remove_distdir)
|
||||
@@ -3513,9 +3439,11 @@ dist dist-all:
|
||||
distcheck: dist
|
||||
case '$(DIST_ARCHIVES)' in \
|
||||
*.tar.gz*) \
|
||||
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
|
||||
eval GZIP= gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
|
||||
*.tar.bz2*) \
|
||||
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||
*.tar.bz3*) \
|
||||
bzip3 -dc $(distdir).tar.bz3 | $(am__untar) ;;\
|
||||
*.tar.lz*) \
|
||||
lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
|
||||
*.tar.xz*) \
|
||||
@@ -3523,7 +3451,7 @@ distcheck: dist
|
||||
*.tar.Z*) \
|
||||
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||
*.shar.gz*) \
|
||||
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
|
||||
eval GZIP= gzip -dc $(distdir).shar.gz | unshar ;;\
|
||||
*.zip*) \
|
||||
unzip $(distdir).zip ;;\
|
||||
*.tar.zst*) \
|
||||
@@ -3602,8 +3530,22 @@ all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(SCRIPTS) $(MANS) $(DATA) \
|
||||
$(HEADERS) config.h
|
||||
install-binPROGRAMS: install-libLTLIBRARIES
|
||||
|
||||
install-checkPROGRAMS: install-libLTLIBRARIES
|
||||
|
||||
install-libexecPROGRAMS: install-libLTLIBRARIES
|
||||
|
||||
install-testsatfcPROGRAMS: install-libLTLIBRARIES
|
||||
|
||||
install-testsatfcPROGRAMS: install-libLTLIBRARIES
|
||||
|
||||
install-testsatfcdetailPROGRAMS: install-libLTLIBRARIES
|
||||
|
||||
install-testsatfcdetailPROGRAMS: install-libLTLIBRARIES
|
||||
|
||||
install-teststestprogramsPROGRAMS: install-libLTLIBRARIES
|
||||
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(tests_atf_cdir)" "$(DESTDIR)$(tests_atf_c__dir)" "$(DESTDIR)$(tests_atf_c___detaildir)" "$(DESTDIR)$(tests_atf_c_detaildir)" "$(DESTDIR)$(tests_test_programsdir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(tests_atf_cdir)" "$(DESTDIR)$(tests_atf_c__dir)" "$(DESTDIR)$(tests_atf_shdir)" "$(DESTDIR)$(tests_test_programsdir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man4dir)" "$(DESTDIR)$(man7dir)" "$(DESTDIR)$(atf_aclocaldir)" "$(DESTDIR)$(atf_c__dirpkgconfigdir)" "$(DESTDIR)$(atf_cpkgconfigdir)" "$(DESTDIR)$(atf_shdir)" "$(DESTDIR)$(atf_shpkgconfigdir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(pkgtestsdir)" "$(DESTDIR)$(tests_atf_cdir)" "$(DESTDIR)$(tests_atf_c__dir)" "$(DESTDIR)$(tests_atf_c___detaildir)" "$(DESTDIR)$(tests_atf_c_detaildir)" "$(DESTDIR)$(tests_atf_shdir)" "$(DESTDIR)$(tests_test_programsdir)" "$(DESTDIR)$(atf_cdir)" "$(DESTDIR)$(atf_c__dir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(atf_cdir)"; do \
|
||||
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(tests_atf_cdir)" "$(DESTDIR)$(tests_atf_c__dir)" "$(DESTDIR)$(tests_atf_c___detaildir)" "$(DESTDIR)$(tests_atf_c_detaildir)" "$(DESTDIR)$(tests_test_programsdir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(tests_atf_cdir)" "$(DESTDIR)$(tests_atf_c__dir)" "$(DESTDIR)$(tests_atf_shdir)" "$(DESTDIR)$(tests_test_programsdir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man7dir)" "$(DESTDIR)$(atf_aclocaldir)" "$(DESTDIR)$(atf_c__dirpkgconfigdir)" "$(DESTDIR)$(atf_cpkgconfigdir)" "$(DESTDIR)$(atf_shdir)" "$(DESTDIR)$(atf_shpkgconfigdir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(pkgtestsdir)" "$(DESTDIR)$(tests_atf_cdir)" "$(DESTDIR)$(tests_atf_c__dir)" "$(DESTDIR)$(tests_atf_c___detaildir)" "$(DESTDIR)$(tests_atf_c_detaildir)" "$(DESTDIR)$(tests_atf_shdir)" "$(DESTDIR)$(tests_test_programsdir)" "$(DESTDIR)$(atf_cdir)" "$(DESTDIR)$(atf_c__dir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(atf_cdir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: $(BUILT_SOURCES)
|
||||
@@ -3630,31 +3572,32 @@ install-strip:
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
-$(am__rm_f) $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
-rm -f atf-c++/$(DEPDIR)/$(am__dirstamp)
|
||||
-rm -f atf-c++/$(am__dirstamp)
|
||||
-rm -f atf-c++/detail/$(DEPDIR)/$(am__dirstamp)
|
||||
-rm -f atf-c++/detail/$(am__dirstamp)
|
||||
-rm -f atf-c/$(DEPDIR)/$(am__dirstamp)
|
||||
-rm -f atf-c/$(am__dirstamp)
|
||||
-rm -f atf-c/detail/$(DEPDIR)/$(am__dirstamp)
|
||||
-rm -f atf-c/detail/$(am__dirstamp)
|
||||
-rm -f atf-sh/$(DEPDIR)/$(am__dirstamp)
|
||||
-rm -f atf-sh/$(am__dirstamp)
|
||||
-rm -f bootstrap/$(DEPDIR)/$(am__dirstamp)
|
||||
-rm -f bootstrap/$(am__dirstamp)
|
||||
-rm -f test-programs/$(DEPDIR)/$(am__dirstamp)
|
||||
-rm -f test-programs/$(am__dirstamp)
|
||||
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
|
||||
-$(am__rm_f) $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES)
|
||||
-$(am__rm_f) $(DISTCLEANFILES)
|
||||
-$(am__rm_f) atf-c++/$(DEPDIR)/$(am__dirstamp)
|
||||
-$(am__rm_f) atf-c++/$(am__dirstamp)
|
||||
-$(am__rm_f) atf-c++/detail/$(DEPDIR)/$(am__dirstamp)
|
||||
-$(am__rm_f) atf-c++/detail/$(am__dirstamp)
|
||||
-$(am__rm_f) atf-c/$(DEPDIR)/$(am__dirstamp)
|
||||
-$(am__rm_f) atf-c/$(am__dirstamp)
|
||||
-$(am__rm_f) atf-c/detail/$(DEPDIR)/$(am__dirstamp)
|
||||
-$(am__rm_f) atf-c/detail/$(am__dirstamp)
|
||||
-$(am__rm_f) atf-sh/$(DEPDIR)/$(am__dirstamp)
|
||||
-$(am__rm_f) atf-sh/$(am__dirstamp)
|
||||
-$(am__rm_f) bootstrap/$(DEPDIR)/$(am__dirstamp)
|
||||
-$(am__rm_f) bootstrap/$(am__dirstamp)
|
||||
-$(am__rm_f) test-programs/$(DEPDIR)/$(am__dirstamp)
|
||||
-$(am__rm_f) test-programs/$(am__dirstamp)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
-$(am__rm_f) $(BUILT_SOURCES)
|
||||
@CODE_COVERAGE_FALSE@mostlyclean-local:
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \
|
||||
@@ -3666,7 +3609,7 @@ clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -f atf-c++/$(DEPDIR)/atf_c___build_test-build_test.Po
|
||||
-rm -f atf-c++/$(DEPDIR)/atf_c___build_test-build_test.Po
|
||||
-rm -f atf-c++/$(DEPDIR)/atf_c___check_test-check_test.Po
|
||||
-rm -f atf-c++/$(DEPDIR)/atf_c___macros_test-macros_test.Po
|
||||
-rm -f atf-c++/$(DEPDIR)/atf_c___test-atf_c++_test.Po
|
||||
@@ -3679,7 +3622,6 @@ distclean: distclean-am
|
||||
-rm -f atf-c++/detail/$(DEPDIR)/application.Plo
|
||||
-rm -f atf-c++/detail/$(DEPDIR)/application_test.Po
|
||||
-rm -f atf-c++/detail/$(DEPDIR)/atf_c___detail_libtest_helpers_la-test_helpers.Plo
|
||||
-rm -f atf-c++/detail/$(DEPDIR)/auto_array_test.Po
|
||||
-rm -f atf-c++/detail/$(DEPDIR)/env.Plo
|
||||
-rm -f atf-c++/detail/$(DEPDIR)/env_test.Po
|
||||
-rm -f atf-c++/detail/$(DEPDIR)/exceptions.Plo
|
||||
@@ -3764,8 +3706,7 @@ install-data-am: install-atf_aclocalDATA install-atf_cHEADERS \
|
||||
install-tests_atf_shSCRIPTS install-tests_test_programsDATA \
|
||||
install-tests_test_programsPROGRAMS \
|
||||
install-tests_test_programsSCRIPTS
|
||||
@$(NORMAL_INSTALL)
|
||||
$(MAKE) $(AM_MAKEFLAGS) install-data-hook
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
@@ -3781,7 +3722,7 @@ install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man: install-man1 install-man3 install-man4 install-man7
|
||||
install-man: install-man1 install-man3 install-man7
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
@@ -3796,7 +3737,7 @@ installcheck-am: installcheck-local
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf $(top_srcdir)/autom4te.cache
|
||||
-rm -f atf-c++/$(DEPDIR)/atf_c___build_test-build_test.Po
|
||||
-rm -f atf-c++/$(DEPDIR)/atf_c___build_test-build_test.Po
|
||||
-rm -f atf-c++/$(DEPDIR)/atf_c___check_test-check_test.Po
|
||||
-rm -f atf-c++/$(DEPDIR)/atf_c___macros_test-macros_test.Po
|
||||
-rm -f atf-c++/$(DEPDIR)/atf_c___test-atf_c++_test.Po
|
||||
@@ -3809,7 +3750,6 @@ maintainer-clean: maintainer-clean-am
|
||||
-rm -f atf-c++/detail/$(DEPDIR)/application.Plo
|
||||
-rm -f atf-c++/detail/$(DEPDIR)/application_test.Po
|
||||
-rm -f atf-c++/detail/$(DEPDIR)/atf_c___detail_libtest_helpers_la-test_helpers.Plo
|
||||
-rm -f atf-c++/detail/$(DEPDIR)/auto_array_test.Po
|
||||
-rm -f atf-c++/detail/$(DEPDIR)/env.Plo
|
||||
-rm -f atf-c++/detail/$(DEPDIR)/env_test.Po
|
||||
-rm -f atf-c++/detail/$(DEPDIR)/exceptions.Plo
|
||||
@@ -3869,7 +3809,7 @@ maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
mostlyclean-libtool mostlyclean-local
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
@@ -3899,11 +3839,10 @@ uninstall-am: uninstall-atf_aclocalDATA uninstall-atf_cHEADERS \
|
||||
uninstall-tests_test_programsPROGRAMS \
|
||||
uninstall-tests_test_programsSCRIPTS
|
||||
|
||||
uninstall-man: uninstall-man1 uninstall-man3 uninstall-man4 \
|
||||
uninstall-man7
|
||||
uninstall-man: uninstall-man1 uninstall-man3 uninstall-man7
|
||||
|
||||
.MAKE: all check check-am install install-am install-data-am \
|
||||
install-exec install-strip
|
||||
.MAKE: all check check-am install install-am install-exec \
|
||||
install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles am--refresh check \
|
||||
check-am clean clean-binPROGRAMS clean-checkPROGRAMS \
|
||||
@@ -3913,27 +3852,28 @@ uninstall-man: uninstall-man1 uninstall-man3 uninstall-man4 \
|
||||
clean-tests_atf_c___detailPROGRAMS \
|
||||
clean-tests_atf_c_detailPROGRAMS \
|
||||
clean-tests_test_programsPROGRAMS cscope cscopelist-am ctags \
|
||||
ctags-am dist dist-all dist-bzip2 dist-gzip dist-hook \
|
||||
dist-lzip dist-shar dist-tarZ dist-xz dist-zip dist-zstd \
|
||||
distcheck distclean distclean-compile distclean-generic \
|
||||
distclean-hdr distclean-libtool distclean-local distclean-tags \
|
||||
distcleancheck distdir distuninstallcheck dvi dvi-am html \
|
||||
html-am info info-am install install-am \
|
||||
install-atf_aclocalDATA install-atf_cHEADERS \
|
||||
install-atf_c__HEADERS install-atf_c__dirpkgconfigDATA \
|
||||
install-atf_cpkgconfigDATA install-atf_shDATA \
|
||||
install-atf_shpkgconfigDATA install-binPROGRAMS install-data \
|
||||
install-data-am install-data-hook install-docDATA install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-includeHEADERS install-info \
|
||||
install-info-am install-libLTLIBRARIES install-libexecPROGRAMS \
|
||||
install-man install-man1 install-man3 install-man4 \
|
||||
install-man7 install-nodist_atf_cHEADERS install-pdf \
|
||||
install-pdf-am install-pkgtestsDATA install-ps install-ps-am \
|
||||
install-strip install-tests_atf_cDATA \
|
||||
install-tests_atf_cPROGRAMS install-tests_atf_cSCRIPTS \
|
||||
install-tests_atf_c__DATA install-tests_atf_c__PROGRAMS \
|
||||
install-tests_atf_c__SCRIPTS install-tests_atf_c___detailDATA \
|
||||
ctags-am dist dist-all dist-bzip2 dist-bzip3 dist-gzip \
|
||||
dist-hook dist-lzip dist-shar dist-tarZ dist-xz dist-zip \
|
||||
dist-zstd distcheck distclean distclean-compile \
|
||||
distclean-generic distclean-hdr distclean-libtool \
|
||||
distclean-local distclean-tags distcleancheck distdir \
|
||||
distuninstallcheck dvi dvi-am html html-am info info-am \
|
||||
install install-am install-atf_aclocalDATA \
|
||||
install-atf_cHEADERS install-atf_c__HEADERS \
|
||||
install-atf_c__dirpkgconfigDATA install-atf_cpkgconfigDATA \
|
||||
install-atf_shDATA install-atf_shpkgconfigDATA \
|
||||
install-binPROGRAMS install-data install-data-am \
|
||||
install-docDATA install-dvi install-dvi-am install-exec \
|
||||
install-exec-am install-html install-html-am \
|
||||
install-includeHEADERS install-info install-info-am \
|
||||
install-libLTLIBRARIES install-libexecPROGRAMS install-man \
|
||||
install-man1 install-man3 install-man7 \
|
||||
install-nodist_atf_cHEADERS install-pdf install-pdf-am \
|
||||
install-pkgtestsDATA install-ps install-ps-am install-strip \
|
||||
install-tests_atf_cDATA install-tests_atf_cPROGRAMS \
|
||||
install-tests_atf_cSCRIPTS install-tests_atf_c__DATA \
|
||||
install-tests_atf_c__PROGRAMS install-tests_atf_c__SCRIPTS \
|
||||
install-tests_atf_c___detailDATA \
|
||||
install-tests_atf_c___detailPROGRAMS \
|
||||
install-tests_atf_c_detailDATA \
|
||||
install-tests_atf_c_detailPROGRAMS install-tests_atf_shDATA \
|
||||
@@ -3943,19 +3883,18 @@ uninstall-man: uninstall-man1 uninstall-man3 uninstall-man4 \
|
||||
installcheck-am installcheck-local installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
|
||||
pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
|
||||
uninstall-atf_aclocalDATA uninstall-atf_cHEADERS \
|
||||
mostlyclean-local pdf pdf-am ps ps-am tags tags-am uninstall \
|
||||
uninstall-am uninstall-atf_aclocalDATA uninstall-atf_cHEADERS \
|
||||
uninstall-atf_c__HEADERS uninstall-atf_c__dirpkgconfigDATA \
|
||||
uninstall-atf_cpkgconfigDATA uninstall-atf_shDATA \
|
||||
uninstall-atf_shpkgconfigDATA uninstall-binPROGRAMS \
|
||||
uninstall-docDATA uninstall-includeHEADERS \
|
||||
uninstall-libLTLIBRARIES uninstall-libexecPROGRAMS \
|
||||
uninstall-man uninstall-man1 uninstall-man3 uninstall-man4 \
|
||||
uninstall-man7 uninstall-nodist_atf_cHEADERS \
|
||||
uninstall-pkgtestsDATA uninstall-tests_atf_cDATA \
|
||||
uninstall-tests_atf_cPROGRAMS uninstall-tests_atf_cSCRIPTS \
|
||||
uninstall-tests_atf_c__DATA uninstall-tests_atf_c__PROGRAMS \
|
||||
uninstall-tests_atf_c__SCRIPTS \
|
||||
uninstall-man uninstall-man1 uninstall-man3 uninstall-man7 \
|
||||
uninstall-nodist_atf_cHEADERS uninstall-pkgtestsDATA \
|
||||
uninstall-tests_atf_cDATA uninstall-tests_atf_cPROGRAMS \
|
||||
uninstall-tests_atf_cSCRIPTS uninstall-tests_atf_c__DATA \
|
||||
uninstall-tests_atf_c__PROGRAMS uninstall-tests_atf_c__SCRIPTS \
|
||||
uninstall-tests_atf_c___detailDATA \
|
||||
uninstall-tests_atf_c___detailPROGRAMS \
|
||||
uninstall-tests_atf_c_detailDATA \
|
||||
@@ -3979,6 +3918,8 @@ atf-c/atf-c.pc: $(srcdir)/atf-c/atf-c.pc.in Makefile
|
||||
-e 's#__CC__#$(ATF_BUILD_CC)#g' \
|
||||
-e 's#__INCLUDEDIR__#$(includedir)#g' \
|
||||
-e 's#__LIBDIR__#$(libdir)#g' \
|
||||
-e 's#__PC_CFLAGS__#$(pc_cflags)#g' \
|
||||
-e 's#__PC_LDFLAGS__#$(pc_ldflags)#g' \
|
||||
<$(srcdir)/atf-c/atf-c.pc.in >atf-c/atf-c.pc.tmp; \
|
||||
mv atf-c/atf-c.pc.tmp atf-c/atf-c.pc
|
||||
atf-c/pkg_config_test: $(srcdir)/atf-c/pkg_config_test.sh
|
||||
@@ -3994,6 +3935,8 @@ atf-c++/atf-c++.pc: $(srcdir)/atf-c++/atf-c++.pc.in Makefile
|
||||
-e 's#__CXX__#$(ATF_BUILD_CXX)#g' \
|
||||
-e 's#__INCLUDEDIR__#$(includedir)#g' \
|
||||
-e 's#__LIBDIR__#$(libdir)#g' \
|
||||
-e 's#__PC_CXXFLAGS__#$(pc_cxxflags)#g' \
|
||||
-e 's#__PC_LDFLAGS__#$(pc_ldflags)#g' \
|
||||
<$(srcdir)/atf-c++/atf-c++.pc.in >atf-c++/atf-c++.pc.tmp; \
|
||||
mv atf-c++/atf-c++.pc.tmp atf-c++/atf-c++.pc
|
||||
atf-c++/pkg_config_test: $(srcdir)/atf-c++/pkg_config_test.sh
|
||||
@@ -4099,6 +4042,7 @@ test-programs/srcdir_test: $(srcdir)/test-programs/srcdir_test.sh
|
||||
dst="test-programs/srcdir_test"; $(BUILD_SH_TP)
|
||||
|
||||
# vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8
|
||||
|
||||
@HAVE_KYUA_TRUE@installcheck-kyua:
|
||||
@HAVE_KYUA_TRUE@ set +e; cd $(pkgtestsdir) && $(TESTS_ENVIRONMENT) \
|
||||
@HAVE_KYUA_TRUE@ $(KYUA) --config='$(KYUA_TEST_CONFIG_FILE)' test; \
|
||||
@@ -4108,11 +4052,29 @@ test-programs/srcdir_test: $(srcdir)/test-programs/srcdir_test.sh
|
||||
@HAVE_KYUA_TRUE@ cd $(pkgtestsdir) && $(TESTS_ENVIRONMENT) \
|
||||
@HAVE_KYUA_TRUE@ $(KYUA) --config='$(KYUA_TEST_CONFIG_FILE)' \
|
||||
@HAVE_KYUA_TRUE@ report-junit --output="$$JUNIT_OUTPUT"; \
|
||||
@HAVE_KYUA_TRUE@ sed -i '' 's/encoding="iso-8859-1"/econding="utf-8"/' "$$JUNIT_OUTPUT"; \
|
||||
@HAVE_KYUA_TRUE@ sed -i '.orig' 's/encoding="iso-8859-1"/encoding="utf-8"/' "$$JUNIT_OUTPUT"; \
|
||||
@HAVE_KYUA_TRUE@ rm -f "$$JUNIT_OUTPUT.orig"; \
|
||||
@HAVE_KYUA_TRUE@ fi; \
|
||||
@HAVE_KYUA_TRUE@ cd $(pkgtestsdir) && $(TESTS_ENVIRONMENT) \
|
||||
@HAVE_KYUA_TRUE@ $(KYUA) --config='$(KYUA_TEST_CONFIG_FILE)' report --verbose; \
|
||||
@HAVE_KYUA_TRUE@ exit $$ret
|
||||
@CODE_COVERAGE_TRUE@@HAVE_KYUA_TRUE@CODE_COVERAGE_OUTPUT_DIR ?= code_coverage
|
||||
@CODE_COVERAGE_TRUE@@HAVE_KYUA_TRUE@EXTRA_GENHTML_ARGS ?=
|
||||
|
||||
@CODE_COVERAGE_TRUE@@HAVE_KYUA_TRUE@installcheck-kyua-lcov: installcheck-kyua
|
||||
@CODE_COVERAGE_TRUE@@HAVE_KYUA_TRUE@ mkdir -p $(CODE_COVERAGE_OUTPUT_DIR)/html
|
||||
@CODE_COVERAGE_TRUE@@HAVE_KYUA_TRUE@ $(LCOV) --capture --directory $(srcdir) \
|
||||
@CODE_COVERAGE_TRUE@@HAVE_KYUA_TRUE@ --output-file $(CODE_COVERAGE_OUTPUT_DIR)/lcov.info
|
||||
@CODE_COVERAGE_TRUE@@HAVE_KYUA_TRUE@ $(LCOV) --remove $(CODE_COVERAGE_OUTPUT_DIR)/lcov.info \
|
||||
@CODE_COVERAGE_TRUE@@HAVE_KYUA_TRUE@ $(CODE_COVERAGE_EXCLUDES) \
|
||||
@CODE_COVERAGE_TRUE@@HAVE_KYUA_TRUE@ --output-file $(CODE_COVERAGE_OUTPUT_DIR)/lcov-filtered.info
|
||||
@CODE_COVERAGE_TRUE@@HAVE_KYUA_TRUE@ $(GENHTML) -o $(CODE_COVERAGE_OUTPUT_DIR)/html $(EXTRA_GENHTML_ARGS) \
|
||||
@CODE_COVERAGE_TRUE@@HAVE_KYUA_TRUE@ $(CODE_COVERAGE_OUTPUT_DIR)/lcov-filtered.info
|
||||
@CODE_COVERAGE_TRUE@mostlyclean-local: mostlyclean-code-coverage
|
||||
@CODE_COVERAGE_TRUE@mostlyclean-code-coverage:
|
||||
@CODE_COVERAGE_TRUE@ -for dir in $(CODE_COVERAGE_DIRS); do \
|
||||
@CODE_COVERAGE_TRUE@ find $$dir \( -name \*.gcda -or -name \*.gcno \) -delete -print; \
|
||||
@CODE_COVERAGE_TRUE@ done
|
||||
|
||||
installcheck-local: $(INSTALLCHECK_TARGETS)
|
||||
clean-all:
|
||||
@@ -4120,16 +4082,15 @@ clean-all:
|
||||
|
||||
.PHONY: $(PHONY_TARGETS)
|
||||
|
||||
# TODO(jmmv): Remove after atf 0.22.
|
||||
install-data-hook:
|
||||
cd $(DESTDIR)$(man3dir) && \
|
||||
for binding in c c++ sh; do \
|
||||
rm -f "atf-$${binding}-api.3"; \
|
||||
$(LN_S) "atf-$${binding}.3" "atf-$${binding}-api.3"; \
|
||||
done
|
||||
|
||||
# vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8
|
||||
|
||||
# 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:
|
||||
|
||||
# Tell GNU make to disable its built-in pattern rules.
|
||||
%:: %,v
|
||||
%:: RCS/%,v
|
||||
%:: RCS/%
|
||||
%:: s.%
|
||||
%:: SCCS/s.%
|
||||
@@ -1,26 +1,112 @@
|
||||
Major changes between releases Automated Testing Framework
|
||||
===========================================================================
|
||||
# Major changes between releases
|
||||
|
||||
Changes in version 0.22
|
||||
***********************
|
||||
## Changes in version 0.24
|
||||
|
||||
STILL UNDER DEVELOPMENT; NOT RELEASED YET.
|
||||
DON'T FORGET TO BUMP THE -version-info PRE-RELEASE IF NECESSARY!
|
||||
Released on August, 17, 2026
|
||||
|
||||
### Major Changes
|
||||
* This version of ATF requires C++-20 to build/function.
|
||||
* This version of ATF focused heavily on correctness and memory management
|
||||
issues discussed in #77. While most of the issues are believed to be resolved,
|
||||
some issues may still remain.
|
||||
* The `atf::text::duplicate(..)` API and tests were removed.
|
||||
|
||||
### Feature Enhancements
|
||||
* Issue #105: Widen our process status capabilties
|
||||
|
||||
### Docs
|
||||
* Issue #107: Clarify the semantics of ATF_{CHECK,REQUIRE}_ERRNO()
|
||||
* Issue #124: atf-check.1: Add missing -r flag to synopsis
|
||||
* Issue #127: atf-c.3: Fix test case addition in ATF_TP_ADD_TCS synopsis example
|
||||
|
||||
### Developer Workflow Changes
|
||||
* GitHub Actions support was added.
|
||||
* Cirrus CI support was removed.
|
||||
* FreeBSD vmactions CI support was added.
|
||||
* ASAN/LSAN/UBSAN support was added for Linux and macOS.
|
||||
* (Initial) runtime code coverage support was added.
|
||||
* (Initial) pre-commit support was added.
|
||||
|
||||
**Full Changelog**: https://github.com/freebsd/atf/compare/atf-0.23...atf-0.24
|
||||
|
||||
## Changes in version 0.23
|
||||
|
||||
Released on March, 29, 2025
|
||||
|
||||
* Issue #101: fix release tarballs by using `make dist` instead of
|
||||
alternative ad hoc method.
|
||||
|
||||
* Issue #76: `atf_check`: fix `std::length_error` thrown from `temp_file`.
|
||||
|
||||
* #87: Update documentation/build files to point to FreeBSD repo/mailing lists.
|
||||
|
||||
* #86: Improve diagnostics when paths cannot be opened
|
||||
|
||||
* #85: various build-related changes. Highlights:
|
||||
* Remove leftover references of `auto_array` (bugfix).
|
||||
* Remove the `atf-*-api` manpages (enhancement).
|
||||
* Require -std=C++14 with ATF (enhancement).
|
||||
* Expose `WCOREDUMP(..)` on platforms that support it (bugfix).
|
||||
* Add `__attribute__((nonnull))` support (enhancement).
|
||||
* Restore `AC_PROG_CPP` (bugfix).
|
||||
|
||||
### General fixes
|
||||
|
||||
* Fix various style issues which were blocking `make dist` from completing
|
||||
cleanly.
|
||||
|
||||
* Fix `atf_utils_file_exists` declaration in atf-c(3).
|
||||
|
||||
* Fix various memory leaks and logic errors.
|
||||
|
||||
* `atf-test-case(4)`: update reference to the "descr" metadata property so it's
|
||||
marked Optional.
|
||||
|
||||
* `atf-check.cpp`: remove unnecessary data copy in `temp_file`.
|
||||
|
||||
## Changes in version 0.22
|
||||
|
||||
Released on November 25th, 2024.
|
||||
|
||||
* Issue #23: Fix double-free triggered by atf_map_insert in low memory
|
||||
scenarios, caused by an overlook in the atf_list code.
|
||||
|
||||
* Issue #29: Fixed various typos and formatting errors in manual pages.
|
||||
|
||||
* Issue #31: Added require.progs metadata properties to the tests that
|
||||
need a compiler to run.
|
||||
|
||||
* Added the atf_check_not_equal function to atf-sh to check for
|
||||
unequal values.
|
||||
|
||||
* Add `-r timeout` flag to `atf-check`.
|
||||
|
||||
Changes in version 0.21
|
||||
***********************
|
||||
* Open results files before executing tests to fix an issue ATF tests that
|
||||
adjust the processes' Capsicum rights as part of the testcase(s)
|
||||
executed.
|
||||
|
||||
* Add Cirrus CI integration for FreeBSD CI/CD support.
|
||||
|
||||
* Address compilation issues on OpenSolaris distributions.
|
||||
|
||||
* Replace `auto_array` with `std::vector` (fixes modern C++ compliance).
|
||||
|
||||
* Replace `auto_ptr` with `std::unique_ptr` (fixes modern C++ compliance).
|
||||
|
||||
* Update autotools idioms and requirements. The minimum required version of
|
||||
autoconf is now 2.68.
|
||||
|
||||
* Modify `ATF_CHECK*` and `ATF_REQUIRE*` macros to avoid double
|
||||
evaluation/allow the gcc toolchain to detect accidental single
|
||||
assignment typos.
|
||||
|
||||
* Always define CPP to fix use of ATF_BUILD_CPP when the user did not
|
||||
define CPP when invoking the configure script.
|
||||
|
||||
### General fixes
|
||||
|
||||
* Fix various typos and formatting errors in manual pages and markdown
|
||||
documents.
|
||||
|
||||
## Changes in version 0.21
|
||||
|
||||
Released on October 23rd, 2014.
|
||||
|
||||
@@ -76,8 +162,7 @@ Released on October 23rd, 2014.
|
||||
* Issue #19: Removed stale references to atf-config and atf-run.
|
||||
|
||||
|
||||
Changes in version 0.20
|
||||
***********************
|
||||
## Changes in version 0.20
|
||||
|
||||
Experimental version released on February 7th, 2014.
|
||||
|
||||
@@ -89,8 +174,7 @@ the 'tools' directory for your own consumption.
|
||||
atf-run and atf-version.
|
||||
|
||||
|
||||
Changes in version 0.19
|
||||
***********************
|
||||
## Changes in version 0.19
|
||||
|
||||
Experimental version released on February 7th, 2014.
|
||||
|
||||
@@ -109,7 +193,7 @@ does not depend on any internal details of atf-c++ any longer.
|
||||
* Project hosting moved from Google Code (as a subproject of Kyua) to
|
||||
GitHub (as a first-class project). The main reason for the change is
|
||||
the suppression of binary downloads in Google Code on Jan 15th, 2014.
|
||||
See https://github.com/jmmv/atf/
|
||||
See https://github.com/freebsd/atf/
|
||||
|
||||
* Removed builtin help from atf-sh(1) and atf-check(1) for simplicity
|
||||
reasons. In other words, their -h option is gone.
|
||||
@@ -121,8 +205,7 @@ does not depend on any internal details of atf-c++ any longer.
|
||||
atf-c++ would break the stale tools.
|
||||
|
||||
|
||||
Changes in version 0.18
|
||||
***********************
|
||||
## Changes in version 0.18
|
||||
|
||||
Experimental version released on November 16th, 2013.
|
||||
|
||||
@@ -139,8 +222,7 @@ Experimental version released on November 16th, 2013.
|
||||
* NetBSD PR bin/48285: Fixed atf_check examples in atf-sh-api(3).
|
||||
|
||||
|
||||
Changes in version 0.17
|
||||
***********************
|
||||
## Changes in version 0.17
|
||||
|
||||
Experimental version released on February 14th, 2013.
|
||||
|
||||
@@ -173,8 +255,7 @@ Experimental version released on February 14th, 2013.
|
||||
cases from breaking xsltproc later.
|
||||
|
||||
|
||||
Changes in version 0.16
|
||||
***********************
|
||||
## Changes in version 0.16
|
||||
|
||||
Experimental version released on July 10th, 2012.
|
||||
|
||||
@@ -208,8 +289,7 @@ Experimental version released on July 10th, 2012.
|
||||
lives in a subcomponent of the Kyua project.
|
||||
|
||||
|
||||
Changes in version 0.15
|
||||
***********************
|
||||
## Changes in version 0.15
|
||||
|
||||
Experimental version released on January 16th, 2012.
|
||||
|
||||
@@ -245,8 +325,7 @@ Experimental version released on January 16th, 2012.
|
||||
mangle our report.
|
||||
|
||||
|
||||
Changes in version 0.14
|
||||
***********************
|
||||
## Changes in version 0.14
|
||||
|
||||
Experimental version released on June 14th, 2011.
|
||||
|
||||
@@ -274,8 +353,7 @@ Experimental version released on June 14th, 2011.
|
||||
case to run.
|
||||
|
||||
|
||||
Changes in version 0.13
|
||||
***********************
|
||||
## Changes in version 0.13
|
||||
|
||||
Experimental version released on March 31st, 2011.
|
||||
|
||||
@@ -320,8 +398,7 @@ The changes in this release are:
|
||||
instead of just listing them as having 0 test cases.
|
||||
|
||||
|
||||
Changes in version 0.12
|
||||
***********************
|
||||
## Changes in version 0.12
|
||||
|
||||
Experimental version released on November 7th, 2010.
|
||||
|
||||
@@ -356,8 +433,7 @@ Experimental version released on November 7th, 2010.
|
||||
general, not be blindly run as root in the first place.
|
||||
|
||||
|
||||
Changes in version 0.11
|
||||
***********************
|
||||
## Changes in version 0.11
|
||||
|
||||
Experimental version released on October 20th, 2010.
|
||||
|
||||
@@ -379,8 +455,7 @@ Experimental version released on October 20th, 2010.
|
||||
* Fixed the XSTL and CSS stylesheets to support expected failures.
|
||||
|
||||
|
||||
Changes in version 0.10
|
||||
***********************
|
||||
## Changes in version 0.10
|
||||
|
||||
Experimental version released on July 2nd, 2010.
|
||||
|
||||
@@ -407,7 +482,7 @@ Miscellaneous features
|
||||
take the expected exception as the first argument and the statement to
|
||||
execute as the second argument.
|
||||
|
||||
Changes in atf-check
|
||||
### Changes in atf-check
|
||||
|
||||
* Changed atf-check to support negating the status and output checks by
|
||||
prefixing them with not- and added support to specify multiple checkers
|
||||
@@ -460,8 +535,7 @@ Code simplifications and cleanups
|
||||
easier to maintain.
|
||||
|
||||
|
||||
Changes in version 0.9
|
||||
**********************
|
||||
## Changes in version 0.9
|
||||
|
||||
Experimental version released on June 3rd, 2010.
|
||||
|
||||
@@ -488,8 +562,7 @@ Experimental version released on June 3rd, 2010.
|
||||
ATF_TEST_CASE_WITHOUT_HEAD.
|
||||
|
||||
|
||||
Changes in version 0.8
|
||||
**********************
|
||||
## Changes in version 0.8
|
||||
|
||||
Experimental version released on May 7th, 2010.
|
||||
|
||||
@@ -538,8 +611,7 @@ Experimental version released on May 7th, 2010.
|
||||
name of their own.
|
||||
|
||||
|
||||
Changes in version 0.7
|
||||
**********************
|
||||
## Changes in version 0.7
|
||||
|
||||
Experimental version released on December 22nd, 2009.
|
||||
|
||||
@@ -568,8 +640,7 @@ Experimental version released on December 22nd, 2009.
|
||||
* Fixed many memory and object leaks.
|
||||
|
||||
|
||||
Changes in version 0.6
|
||||
**********************
|
||||
## Changes in version 0.6
|
||||
|
||||
Experimental version released on January 18th, 2009.
|
||||
|
||||
@@ -602,8 +673,7 @@ Experimental version released on January 18th, 2009.
|
||||
_STREQ_MSG.
|
||||
|
||||
|
||||
Changes in version 0.5
|
||||
**********************
|
||||
## Changes in version 0.5
|
||||
|
||||
Experimental version released on May 1st, 2008.
|
||||
|
||||
@@ -629,8 +699,7 @@ Experimental version released on May 1st, 2008.
|
||||
executed multiple times to comply with the user's requests.
|
||||
|
||||
|
||||
Changes in version 0.4
|
||||
**********************
|
||||
## Changes in version 0.4
|
||||
|
||||
Experimental version released on February 4th, 2008.
|
||||
|
||||
@@ -662,8 +731,7 @@ Experimental version released on February 4th, 2008.
|
||||
were likely affected too.
|
||||
|
||||
|
||||
Changes in version 0.3
|
||||
**********************
|
||||
## Changes in version 0.3
|
||||
|
||||
Experimental version released on November 11th, 2007.
|
||||
|
||||
@@ -696,8 +764,7 @@ Experimental version released on November 11th, 2007.
|
||||
incomplete.
|
||||
|
||||
|
||||
Changes in version 0.2
|
||||
**********************
|
||||
## Changes in version 0.2
|
||||
|
||||
Experimental version released on September 20th, 2007.
|
||||
|
||||
@@ -728,8 +795,7 @@ Experimental version released on September 20th, 2007.
|
||||
* Multiple bug fixes and improvements all around.
|
||||
|
||||
|
||||
Changes in version 0.1
|
||||
**********************
|
||||
## Changes in version 0.1
|
||||
|
||||
Experimental version released on August 20th, 2007.
|
||||
|
||||
@@ -738,4 +804,4 @@ Experimental version released on August 20th, 2007.
|
||||
|
||||
|
||||
===========================================================================
|
||||
vim: filetype=text:textwidth=75:expandtab:shiftwidth=2:softtabstop=2
|
||||
# vim: syntax=markdown:textwidth=75:expandtab:shiftwidth=2:softtabstop=2
|
||||
@@ -1,37 +0,0 @@
|
||||
Introductory information Automated Testing Framework
|
||||
===========================================================================
|
||||
|
||||
|
||||
Introduction
|
||||
************
|
||||
|
||||
The Automated Testing Framework (ATF) is a collection of libraries to
|
||||
implement test programs in a variety of languages. At the moment, ATF
|
||||
offers C, C++ and POSIX shell bindings with which to implement tests.
|
||||
These bindings all offer a similar set of functionality and any test
|
||||
program written with them exposes a consistent user interface.
|
||||
|
||||
ATF-based test programs rely on a separate runtime engine to execute them.
|
||||
The runtime engine is in charge of isolating the test programs from the
|
||||
rest of the system to ensure that their results are deterministic and that
|
||||
they cannot affect the running system. The runtime engine is also
|
||||
responsible for gathering the results of all tests and composing reports.
|
||||
The current runtime of choice is Kyua.
|
||||
|
||||
|
||||
Other documents
|
||||
***************
|
||||
|
||||
* AUTHORS: List of authors and contributors for this project.
|
||||
|
||||
* COPYING: License information.
|
||||
|
||||
* INSTALL: Compilation and installation instructions. These is not the
|
||||
standard document shipped with many packages, so be sure to read it for
|
||||
things that are specific to ATF's build.
|
||||
|
||||
* NEWS: List of major changes between formal, published releases.
|
||||
|
||||
|
||||
===========================================================================
|
||||
vim: filetype=text:textwidth=75:expandtab:shiftwidth=2:softtabstop=2
|
||||
@@ -12,36 +12,57 @@ interface** to allow both humans and automation to run the tests.
|
||||
|
||||
ATF-based test programs **rely on an execution engine** to be run and
|
||||
this execution engine is *not* shipped with ATF.
|
||||
**[Kyua](https://github.com/jmmv/kyua/) is the engine of choice.**
|
||||
**[Kyua](https://github.com/freebsd/kyua/) is the engine of choice.**
|
||||
|
||||
## Download
|
||||
|
||||
Formal releases for source files are available for download from GitHub:
|
||||
|
||||
* [atf 0.20](../../releases/tag/atf-0.20), released on February 7th, 2014.
|
||||
* [atf 0.23](../../releases/tag/atf-0.23), released on March 29th, 2025.
|
||||
|
||||
## Installation
|
||||
|
||||
You are encouraged to install binary packages for your operating system
|
||||
wherever available:
|
||||
|
||||
* Fedora 20 and above: install the `atf` package with `yum install atf`.
|
||||
|
||||
* FreeBSD 10.0 and above: install the `atf` package with `pkg install atf`.
|
||||
|
||||
* NetBSD with pkgsrc: install the `pkgsrc/devel/atf` package.
|
||||
|
||||
* OpenBSD: install the `devel/atf` package with `pkg_add atf`.
|
||||
|
||||
* Ubuntu: install the `libatf-dev` and `atf-sh` packages with
|
||||
`apt install libatf-dev atf-sh`.
|
||||
|
||||
Should you want to build and install ATF from the source tree provided
|
||||
here, follow the instructions in the [INSTALL file](INSTALL).
|
||||
here, follow the instructions in the [INSTALL file](INSTALL.md).
|
||||
|
||||
## More Reading
|
||||
|
||||
* AUTHORS: List of authors and contributors for this project.
|
||||
|
||||
* COPYING: License information.
|
||||
|
||||
* INSTALL.md: Compilation and installation instructions. These is not the
|
||||
standard document shipped with many packages, so be sure to read it for
|
||||
things that are specific to ATF's build.
|
||||
|
||||
* NEWS.md: List of major changes between formal, published releases.
|
||||
|
||||
## Other documents
|
||||
|
||||
* `AUTHORS`: List of authors and contributors for this project.
|
||||
|
||||
* `COPYING`: License information.
|
||||
|
||||
* `INSTALL.md`: Compilation and installation instructions. These is not the
|
||||
standard document shipped with many packages, so be sure to read it for
|
||||
things that are specific to ATF's build.
|
||||
|
||||
* `NEWS.md`: List of major changes between formal, published releases.
|
||||
|
||||
## Support
|
||||
|
||||
Please use the
|
||||
[atf-discuss mailing list](https://groups.google.com/forum/#!forum/atf-discuss)
|
||||
for any support inquiries related to `atf-c`, `atf-c++` or `atf-sh`.
|
||||
|
||||
If you have any questions on Kyua proper, please use the
|
||||
[kyua-discuss mailing list](https://groups.google.com/forum/#!forum/kyua-discuss)
|
||||
instead.
|
||||
[[email protected]](mailto:[email protected]) mailing list
|
||||
for any support inquiries related to `atf-c`, `atf-c++`, `atf-sh`, or `kyua`.
|
||||
Vendored
+328
-9165
File diff suppressed because it is too large.
Load diff
@@ -1,8 +0,0 @@
|
||||
ar-lib
|
||||
compile
|
||||
config.guess
|
||||
config.sub
|
||||
depcomp
|
||||
install-sh
|
||||
ltmain.sh
|
||||
missing
|
||||
+30
-10
@@ -2,9 +2,9 @@
|
||||
# Wrapper for Microsoft lib.exe
|
||||
|
||||
me=ar-lib
|
||||
scriptversion=2012-03-01.08; # UTC
|
||||
scriptversion=2025-02-03.05; # UTC
|
||||
|
||||
# Copyright (C) 2010-2013 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2010-2025 Free Software Foundation, Inc.
|
||||
# Written by Peter Rosin <[email protected]>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
@@ -18,7 +18,7 @@ scriptversion=2012-03-01.08; # UTC
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
@@ -51,9 +51,20 @@ func_file_conv ()
|
||||
# lazily determine how to convert abs files
|
||||
case `uname -s` in
|
||||
MINGW*)
|
||||
file_conv=mingw
|
||||
if test -n "$MSYSTEM" && (cygpath --version) >/dev/null 2>&1; then
|
||||
# MSYS2 environment.
|
||||
file_conv=cygwin
|
||||
else
|
||||
# Original MinGW environment.
|
||||
file_conv=mingw
|
||||
fi
|
||||
;;
|
||||
MSYS*)
|
||||
# Old MSYS environment, or MSYS2 with 32-bit MSYS2 shell.
|
||||
file_conv=cygwin
|
||||
;;
|
||||
CYGWIN*)
|
||||
# Cygwin environment.
|
||||
file_conv=cygwin
|
||||
;;
|
||||
*)
|
||||
@@ -66,7 +77,7 @@ func_file_conv ()
|
||||
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||
;;
|
||||
cygwin)
|
||||
file=`cygpath -m "$file" || echo "$file"`
|
||||
file=`cygpath -w "$file" || echo "$file"`
|
||||
;;
|
||||
wine)
|
||||
file=`winepath -w "$file" || echo "$file"`
|
||||
@@ -105,11 +116,15 @@ case $1 in
|
||||
Usage: $me [--help] [--version] PROGRAM ACTION ARCHIVE [MEMBER...]
|
||||
|
||||
Members may be specified in a file named with @FILE.
|
||||
|
||||
Report bugs to <[email protected]>.
|
||||
GNU Automake home page: <https://www.gnu.org/software/automake/>.
|
||||
General help using GNU software: <https://www.gnu.org/gethelp/>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "$me, version $scriptversion"
|
||||
echo "$me (GNU Automake) $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
@@ -135,6 +150,10 @@ do
|
||||
AR="$AR $1"
|
||||
shift
|
||||
;;
|
||||
-nologo | -NOLOGO)
|
||||
# We always invoke AR with -nologo, so don't need to add it again.
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
action=$1
|
||||
shift
|
||||
@@ -224,10 +243,11 @@ elif test -n "$extract"; then
|
||||
esac
|
||||
done
|
||||
else
|
||||
$AR -NOLOGO -LIST "$archive" | sed -e 's/\\/\\\\/g' | while read member
|
||||
do
|
||||
$AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $?
|
||||
done
|
||||
$AR -NOLOGO -LIST "$archive" | tr -d '\r' | sed -e 's/\\/\\\\/g' \
|
||||
| while read member
|
||||
do
|
||||
$AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $?
|
||||
done
|
||||
fi
|
||||
|
||||
elif test -n "$quick$replace"; then
|
||||
|
||||
@@ -64,10 +64,6 @@ BEGIN {
|
||||
warn("Trailing spaces or tabs");
|
||||
}
|
||||
|
||||
/#![^ ]/ { # NO_CHECK_STYLE
|
||||
warn("Invalid shellbang: missing space after !");
|
||||
}
|
||||
|
||||
END {
|
||||
if (skip)
|
||||
warn("Missing NO_CHECK_STYLE_END");
|
||||
|
||||
@@ -78,7 +78,7 @@ find_sources() {
|
||||
-name "COPYING" -o \
|
||||
-name "ChangeLog" -o \
|
||||
-name "NEWS" -o \
|
||||
-name "README" -o \
|
||||
-name "README.md" -o \
|
||||
-name "TODO" -o \
|
||||
-name "*.[0-9]" -o \
|
||||
-name "*.ac" -o \
|
||||
@@ -95,6 +95,7 @@ find_sources() {
|
||||
\! -path "*/atf-[0-9]*" -a \
|
||||
\! -path "*autom4te*" -a \
|
||||
-type f -a \
|
||||
\! -name "ac_cxx_compile_stdcxx.m4" \
|
||||
\! -name "aclocal.m4" \
|
||||
\! -name "config.h" \
|
||||
\! -name "defs.h" \
|
||||
|
||||
@@ -1,84 +0,0 @@
|
||||
#! /bin/sh
|
||||
# Copyright (c) 2007 The NetBSD Foundation, Inc.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND
|
||||
# CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
# IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
||||
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Prog_Name=${0##*/}
|
||||
|
||||
if [ ! -f ./atf-c.h ]; then
|
||||
echo "${Prog_Name}: must be run from atf source's top directory" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f configure ]; then
|
||||
echo "${Prog_Name}: nothing to clean" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
[ -f Makefile ] || ./configure
|
||||
make distclean
|
||||
|
||||
# Top-level directory.
|
||||
rm -f .gdb_history
|
||||
rm -f Makefile.in
|
||||
rm -f aclocal.m4
|
||||
rm -rf autom4te.cache
|
||||
rm -f config.h.in*
|
||||
rm -f configure
|
||||
rm -f mkinstalldirs
|
||||
rm -f atf-*.tar.gz
|
||||
rm -rf release-test
|
||||
|
||||
# `admin' directory.
|
||||
rm -f admin/compile
|
||||
rm -f admin/config.guess
|
||||
rm -f admin/config.sub
|
||||
rm -f admin/depcomp
|
||||
rm -f admin/install-sh
|
||||
rm -f admin/ltmain.sh
|
||||
rm -f admin/missing
|
||||
|
||||
# `m4' directory.
|
||||
rm -f m4/libtool.m4
|
||||
rm -f m4/lt*.m4
|
||||
|
||||
# `bootstrap' directory.
|
||||
rm -f bootstrap/package.m4
|
||||
rm -f bootstrap/testsuite
|
||||
|
||||
# Files and directories spread all around the tree.
|
||||
find . -name '#*' | xargs rm -rf
|
||||
find . -name '*~' | xargs rm -rf
|
||||
find . -name .deps | xargs rm -rf
|
||||
find . -name .gdb_history | xargs rm -rf
|
||||
find . -name .libs | xargs rm -rf
|
||||
find . -name .tmp | xargs rm -rf
|
||||
|
||||
# Show remaining files
|
||||
if [ -n "${GIT}" ]; then
|
||||
echo ">>> untracked and ignored files"
|
||||
"${GIT}" status --porcelain --ignored | grep -E '^(\?\?|!!)'
|
||||
fi
|
||||
|
||||
# vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4
|
||||
+31
-14
@@ -1,9 +1,9 @@
|
||||
#! /bin/sh
|
||||
# Wrapper for compilers which do not understand '-c -o'.
|
||||
|
||||
scriptversion=2012-10-14.11; # UTC
|
||||
scriptversion=2025-06-18.21; # UTC
|
||||
|
||||
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1999-2025 Free Software Foundation, Inc.
|
||||
# Written by Tom Tromey <[email protected]>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
@@ -17,7 +17,7 @@ scriptversion=2012-10-14.11; # UTC
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
@@ -37,11 +37,11 @@ IFS=" "" $nl"
|
||||
|
||||
file_conv=
|
||||
|
||||
# func_file_conv build_file lazy
|
||||
# func_file_conv build_file unneeded_conversions
|
||||
# Convert a $build file to $host form and store it in $file
|
||||
# Currently only supports Windows hosts. If the determined conversion
|
||||
# type is listed in (the comma separated) LAZY, no conversion will
|
||||
# take place.
|
||||
# type is listed in (the comma separated) UNNEEDED_CONVERSIONS, no
|
||||
# conversion will take place.
|
||||
func_file_conv ()
|
||||
{
|
||||
file=$1
|
||||
@@ -51,9 +51,20 @@ func_file_conv ()
|
||||
# lazily determine how to convert abs files
|
||||
case `uname -s` in
|
||||
MINGW*)
|
||||
file_conv=mingw
|
||||
if test -n "$MSYSTEM" && (cygpath --version) >/dev/null 2>&1; then
|
||||
# MSYS2 environment.
|
||||
file_conv=cygwin
|
||||
else
|
||||
# Original MinGW environment.
|
||||
file_conv=mingw
|
||||
fi
|
||||
;;
|
||||
MSYS*)
|
||||
# Old MSYS environment, or MSYS2 with 32-bit MSYS2 shell.
|
||||
file_conv=cygwin
|
||||
;;
|
||||
CYGWIN*)
|
||||
# Cygwin environment.
|
||||
file_conv=cygwin
|
||||
;;
|
||||
*)
|
||||
@@ -63,12 +74,14 @@ func_file_conv ()
|
||||
fi
|
||||
case $file_conv/,$2, in
|
||||
*,$file_conv,*)
|
||||
# This is the optimization mentioned above:
|
||||
# If UNNEEDED_CONVERSIONS contains $file_conv, don't convert.
|
||||
;;
|
||||
mingw/*)
|
||||
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||
;;
|
||||
cygwin/*)
|
||||
file=`cygpath -m "$file" || echo "$file"`
|
||||
file=`cygpath -w "$file" || echo "$file"`
|
||||
;;
|
||||
wine/*)
|
||||
file=`winepath -w "$file" || echo "$file"`
|
||||
@@ -143,7 +156,7 @@ func_cl_wrapper ()
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.[oO][bB][jJ])
|
||||
*.o | *.lo | *.[oO][bB][jJ])
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fo"$file"
|
||||
shift
|
||||
@@ -248,14 +261,18 @@ If you are trying to build a whole package this is not the
|
||||
right script to run: please start by reading the file 'INSTALL'.
|
||||
|
||||
Report bugs to <[email protected]>.
|
||||
GNU Automake home page: <https://www.gnu.org/software/automake/>.
|
||||
General help using GNU software: <https://www.gnu.org/gethelp/>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "compile $scriptversion"
|
||||
echo "compile (GNU Automake) $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
|
||||
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
|
||||
clang-cl | *[/\\]clang-cl | clang-cl.exe | *[/\\]clang-cl.exe | \
|
||||
icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
|
||||
func_cl_wrapper "$@" # Doesn't return...
|
||||
;;
|
||||
esac
|
||||
@@ -339,9 +356,9 @@ exit $ret
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp nil t)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-format: "%Y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
Vendored
+430
-497
File diff suppressed because it is too large.
Load diff
Vendored
+869
-849
File diff suppressed because it is too large.
Load diff
+12
-11
@@ -1,9 +1,9 @@
|
||||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2013-05-30.07; # UTC
|
||||
scriptversion=2025-06-18.21; # UTC
|
||||
|
||||
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1999-2025 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -16,7 +16,7 @@ scriptversion=2013-05-30.07; # UTC
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
@@ -47,11 +47,13 @@ Environment variables:
|
||||
libtool Whether libtool is used (yes/no).
|
||||
|
||||
Report bugs to <[email protected]>.
|
||||
GNU Automake home page: <https://www.gnu.org/software/automake/>.
|
||||
General help using GNU software: <https://www.gnu.org/gethelp/>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "depcomp $scriptversion"
|
||||
echo "depcomp (GNU Automake) $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
@@ -113,7 +115,6 @@ nl='
|
||||
# These definitions help.
|
||||
upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||
lower=abcdefghijklmnopqrstuvwxyz
|
||||
digits=0123456789
|
||||
alpha=${upper}${lower}
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
@@ -128,7 +129,7 @@ tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Avoid interferences from the environment.
|
||||
# Avoid interference from the environment.
|
||||
gccflag= dashmflag=
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
@@ -198,8 +199,8 @@ gcc3)
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
|
||||
## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
|
||||
## Note that this doesn't just cater to obsolete pre-3.x GCC compilers.
|
||||
## but also to in-use compilers like IBM xlc/xlC and the HP C compiler.
|
||||
## (see the conditional assignment to $gccflag above).
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
@@ -783,9 +784,9 @@ exit 0
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp nil t)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-format: "%Y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
+217
-203
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2011-11-20.07; # UTC
|
||||
scriptversion=2025-06-18.21; # UTC
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
@@ -41,19 +41,15 @@ scriptversion=2011-11-20.07; # UTC
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch.
|
||||
|
||||
tab=' '
|
||||
nl='
|
||||
'
|
||||
IFS=" "" $nl"
|
||||
IFS=" $tab$nl"
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
# Set DOITPROG to "echo" to test this script.
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit=${DOITPROG-}
|
||||
if test -z "$doit"; then
|
||||
doit_exec=exec
|
||||
else
|
||||
doit_exec=$doit
|
||||
fi
|
||||
doit_exec=${doit:-exec}
|
||||
|
||||
# Put in absolute file names if you don't have them in your path;
|
||||
# or use environment vars.
|
||||
@@ -68,22 +64,16 @@ mvprog=${MVPROG-mv}
|
||||
rmprog=${RMPROG-rm}
|
||||
stripprog=${STRIPPROG-strip}
|
||||
|
||||
posix_glob='?'
|
||||
initialize_posix_glob='
|
||||
test "$posix_glob" != "?" || {
|
||||
if (set -f) 2>/dev/null; then
|
||||
posix_glob=
|
||||
else
|
||||
posix_glob=:
|
||||
fi
|
||||
}
|
||||
'
|
||||
|
||||
posix_mkdir=
|
||||
|
||||
# Desired mode of installed file.
|
||||
mode=0755
|
||||
|
||||
# Create dirs (including intermediate dirs) using mode 755.
|
||||
# This is like GNU 'install' as of coreutils 8.32 (2020).
|
||||
mkdir_umask=22
|
||||
|
||||
backupsuffix=
|
||||
chgrpcmd=
|
||||
chmodcmd=$chmodprog
|
||||
chowncmd=
|
||||
@@ -97,7 +87,7 @@ dir_arg=
|
||||
dst_arg=
|
||||
|
||||
copy_on_change=false
|
||||
no_target_directory=
|
||||
is_target_a_directory=possibly
|
||||
|
||||
usage="\
|
||||
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
@@ -114,19 +104,29 @@ Options:
|
||||
--version display version info and exit.
|
||||
|
||||
-c (ignored)
|
||||
-C install only if different (preserve the last data modification time)
|
||||
-C install only if different (preserve data modification time)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-p pass -p to $cpprog.
|
||||
-s $stripprog installed files.
|
||||
-S SUFFIX attempt to back up existing files, with suffix SUFFIX.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||
RMPROG STRIPPROG
|
||||
"
|
||||
|
||||
By default, rm is invoked with -f; when overridden with RMPROG,
|
||||
it's up to you to specify -f if you want it.
|
||||
|
||||
If -S is not specified, no backups are attempted.
|
||||
|
||||
Report bugs to <[email protected]>.
|
||||
GNU Automake home page: <https://www.gnu.org/software/automake/>.
|
||||
General help using GNU software: <https://www.gnu.org/gethelp/>."
|
||||
|
||||
while test $# -ne 0; do
|
||||
case $1 in
|
||||
@@ -137,46 +137,62 @@ while test $# -ne 0; do
|
||||
-d) dir_arg=true;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift;;
|
||||
shift;;
|
||||
|
||||
--help) echo "$usage"; exit $?;;
|
||||
|
||||
-m) mode=$2
|
||||
case $mode in
|
||||
*' '* | *' '* | *'
|
||||
'* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
case $mode in
|
||||
*' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
shift;;
|
||||
|
||||
-p) cpprog="$cpprog -p";;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-t) dst_arg=$2
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
shift;;
|
||||
-S) backupsuffix="$2"
|
||||
shift;;
|
||||
|
||||
-T) no_target_directory=true;;
|
||||
-t)
|
||||
is_target_a_directory=always
|
||||
dst_arg=$2
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
-T) is_target_a_directory=never;;
|
||||
|
||||
--) shift
|
||||
break;;
|
||||
--version) echo "$0 (GNU Automake) $scriptversion"; exit $?;;
|
||||
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
--) shift
|
||||
break;;
|
||||
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# We allow the use of options -d and -T together, by making -d
|
||||
# take the precedence; this is for compatibility with GNU install.
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
if test -n "$dst_arg"; then
|
||||
echo "$0: target directory not allowed when installing a directory." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||
# When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
@@ -207,6 +223,15 @@ if test $# -eq 0; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
if test $# -gt 1 || test "$is_target_a_directory" = always; then
|
||||
if test ! -d "$dst_arg"; then
|
||||
echo "$0: $dst_arg: Is not a directory." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
do_exit='(exit $ret); exit $ret'
|
||||
trap "ret=129; $do_exit" 1
|
||||
@@ -223,16 +248,16 @@ if test -z "$dir_arg"; then
|
||||
|
||||
*[0-7])
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw='% 200'
|
||||
u_plus_rw='% 200'
|
||||
fi
|
||||
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
||||
*)
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw=,u+rw
|
||||
u_plus_rw=,u+rw
|
||||
fi
|
||||
cp_umask=$mode$u_plus_rw;;
|
||||
esac
|
||||
@@ -250,6 +275,10 @@ do
|
||||
dstdir=$dst
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
# Don't chown directories that already exist.
|
||||
if test $dstdir_status = 0; then
|
||||
chowncmd=""
|
||||
fi
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
@@ -266,178 +295,148 @@ do
|
||||
fi
|
||||
dst=$dst_arg
|
||||
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
# If destination is a directory, append the input filename.
|
||||
if test -d "$dst"; then
|
||||
if test -n "$no_target_directory"; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
if test "$is_target_a_directory" = never; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dstdir=$dst
|
||||
dst=$dstdir/`basename "$src"`
|
||||
dstbase=`basename "$src"`
|
||||
case $dst in
|
||||
*/) dst=$dst$dstbase;;
|
||||
*) dst=$dst/$dstbase;;
|
||||
esac
|
||||
dstdir_status=0
|
||||
else
|
||||
# Prefer dirname, but fall back on a substitute if dirname fails.
|
||||
dstdir=`
|
||||
(dirname "$dst") 2>/dev/null ||
|
||||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||
X"$dst" : 'X\(//\)[^/]' \| \
|
||||
X"$dst" : 'X\(//\)$' \| \
|
||||
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
|
||||
echo X"$dst" |
|
||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)[^/].*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\).*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
s/.*/./; q'
|
||||
`
|
||||
|
||||
dstdir=`dirname "$dst"`
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
case $dstdir in
|
||||
*/) dstdirslash=$dstdir;;
|
||||
*) dstdirslash=$dstdir/;;
|
||||
esac
|
||||
|
||||
obsolete_mkdir_used=false
|
||||
|
||||
if test $dstdir_status != 0; then
|
||||
case $posix_mkdir in
|
||||
'')
|
||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||
umask=`umask`
|
||||
case $stripcmd.$umask in
|
||||
# Optimize common cases.
|
||||
*[2367][2367]) mkdir_umask=$umask;;
|
||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
mkdir_mode=-m$mode
|
||||
else
|
||||
mkdir_mode=
|
||||
fi
|
||||
|
||||
*[0-7])
|
||||
mkdir_umask=`expr $umask + 22 \
|
||||
- $umask % 100 % 40 + $umask % 20 \
|
||||
- $umask % 10 % 4 + $umask % 2
|
||||
`;;
|
||||
*) mkdir_umask=$umask,go-w;;
|
||||
esac
|
||||
posix_mkdir=false
|
||||
# The $RANDOM variable is not portable (e.g., dash). Use it
|
||||
# here however when possible just to lower collision chance.
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
mkdir_mode=-m$mode
|
||||
trap '
|
||||
ret=$?
|
||||
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
|
||||
exit $ret
|
||||
' 0
|
||||
|
||||
# Because "mkdir -p" follows existing symlinks and we likely work
|
||||
# directly in world-writable /tmp, make sure that the '$tmpdir'
|
||||
# directory is successfully created first before we actually test
|
||||
# 'mkdir -p'.
|
||||
if (umask $mkdir_umask &&
|
||||
$mkdirprog $mkdir_mode "$tmpdir" &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibility with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
test_tmpdir="$tmpdir/a"
|
||||
ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
|
||||
else
|
||||
mkdir_mode=
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
|
||||
fi
|
||||
|
||||
posix_mkdir=false
|
||||
case $umask in
|
||||
*[123567][0-7][0-7])
|
||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
|
||||
if (umask $mkdir_umask &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/d" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
trap '' 0;;
|
||||
esac
|
||||
|
||||
if
|
||||
$posix_mkdir && (
|
||||
umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||
umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||
)
|
||||
then :
|
||||
else
|
||||
|
||||
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
||||
# mkdir does not conform to POSIX,
|
||||
# or it failed possibly due to a race condition. Create the
|
||||
# directory the slow way, step by step, checking for races as we go.
|
||||
|
||||
case $dstdir in
|
||||
/*) prefix='/';;
|
||||
[-=\(\)!]*) prefix='./';;
|
||||
*) prefix='';;
|
||||
/*) prefix='/';;
|
||||
[-=\(\)!]*) prefix='./';;
|
||||
*) prefix='';;
|
||||
esac
|
||||
|
||||
eval "$initialize_posix_glob"
|
||||
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
$posix_glob set -f
|
||||
set -f
|
||||
set fnord $dstdir
|
||||
shift
|
||||
$posix_glob set +f
|
||||
set +f
|
||||
IFS=$oIFS
|
||||
|
||||
prefixes=
|
||||
|
||||
for d
|
||||
do
|
||||
test X"$d" = X && continue
|
||||
test X"$d" = X && continue
|
||||
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask=$mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
else
|
||||
case $prefix in
|
||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||
*) qprefix=$prefix;;
|
||||
esac
|
||||
prefixes="$prefixes '$qprefix'"
|
||||
fi
|
||||
fi
|
||||
prefix=$prefix/
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
else
|
||||
case $prefix in
|
||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||
*) qprefix=$prefix;;
|
||||
esac
|
||||
prefixes="$prefixes '$qprefix'"
|
||||
fi
|
||||
fi
|
||||
prefix=$prefix/
|
||||
done
|
||||
|
||||
if test -n "$prefixes"; then
|
||||
# Don't fail if two instances are running concurrently.
|
||||
(umask $mkdir_umask &&
|
||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||
test -d "$dstdir" || exit 1
|
||||
obsolete_mkdir_used=true
|
||||
# Don't fail if two instances are running concurrently.
|
||||
(umask $mkdir_umask &&
|
||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||
test -d "$dstdir" || exit 1
|
||||
obsolete_mkdir_used=true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -450,14 +449,25 @@ do
|
||||
else
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
dsttmp=${dstdirslash}_inst.$$_
|
||||
rmtmp=${dstdirslash}_rm.$$_
|
||||
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
|
||||
# Copy the file name to the temp name.
|
||||
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
(umask $cp_umask &&
|
||||
{ test -z "$stripcmd" || {
|
||||
# Create $dsttmp read-write so that cp doesn't create it read-only,
|
||||
# which would cause strip to fail.
|
||||
if test -z "$doit"; then
|
||||
: >"$dsttmp" # No need to fork-exec 'touch'.
|
||||
else
|
||||
$doit touch "$dsttmp"
|
||||
fi
|
||||
}
|
||||
} &&
|
||||
$doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits.
|
||||
#
|
||||
@@ -472,20 +482,24 @@ do
|
||||
|
||||
# If -C, don't bother to copy if it wouldn't change the file.
|
||||
if $copy_on_change &&
|
||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||
|
||||
eval "$initialize_posix_glob" &&
|
||||
$posix_glob set -f &&
|
||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||
set -f &&
|
||||
set X $old && old=:$2:$4:$5:$6 &&
|
||||
set X $new && new=:$2:$4:$5:$6 &&
|
||||
$posix_glob set +f &&
|
||||
|
||||
set +f &&
|
||||
test "$old" = "$new" &&
|
||||
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||
then
|
||||
rm -f "$dsttmp"
|
||||
else
|
||||
# If $backupsuffix is set, and the file being installed
|
||||
# already exists, attempt a backup. Don't worry if it fails,
|
||||
# e.g., if mv doesn't support -f.
|
||||
if test -n "$backupsuffix" && test -f "$dst"; then
|
||||
$doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
|
||||
fi
|
||||
|
||||
# Rename the file to the real destination.
|
||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||
|
||||
@@ -493,24 +507,24 @@ do
|
||||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
{
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
} &&
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dst"
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dst"
|
||||
}
|
||||
fi || exit 1
|
||||
|
||||
@@ -519,9 +533,9 @@ do
|
||||
done
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp nil t)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-format: "%Y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
+1286
-695
File diff suppressed because it is too large.
Load diff
+56
-35
@@ -1,9 +1,11 @@
|
||||
#! /bin/sh
|
||||
# Common wrapper for a few potentially missing GNU programs.
|
||||
# Common wrapper for a few potentially missing GNU and other programs.
|
||||
|
||||
scriptversion=2012-06-26.16; # UTC
|
||||
scriptversion=2025-06-18.21; # UTC
|
||||
|
||||
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
||||
# shellcheck disable=SC2006,SC2268 # we must support pre-POSIX shells
|
||||
|
||||
# Copyright (C) 1996-2025 Free Software Foundation, Inc.
|
||||
# Originally written by Fran,cois Pinard <[email protected]>, 1996.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
@@ -17,7 +19,7 @@ scriptversion=2012-06-26.16; # UTC
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
@@ -54,18 +56,20 @@ Options:
|
||||
-v, --version output version information and exit
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal autoconf autoheader autom4te automake makeinfo
|
||||
bison yacc flex lex help2man
|
||||
aclocal autoconf autogen autoheader autom4te automake autoreconf
|
||||
bison flex help2man lex makeinfo perl yacc
|
||||
|
||||
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
|
||||
'g' are ignored when checking the name.
|
||||
|
||||
Send bug reports to <[email protected]>."
|
||||
Report bugs to <[email protected]>.
|
||||
GNU Automake home page: <https://www.gnu.org/software/automake/>.
|
||||
General help using GNU software: <https://www.gnu.org/gethelp/>."
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing $scriptversion (GNU Automake)"
|
||||
echo "missing (GNU Automake) $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
|
||||
@@ -101,14 +105,14 @@ else
|
||||
exit $st
|
||||
fi
|
||||
|
||||
perl_URL=http://www.perl.org/
|
||||
flex_URL=http://flex.sourceforge.net/
|
||||
gnu_software_URL=http://www.gnu.org/software
|
||||
perl_URL=https://www.perl.org/
|
||||
flex_URL=https://github.com/westes/flex
|
||||
gnu_software_URL=https://www.gnu.org/software
|
||||
|
||||
program_details ()
|
||||
{
|
||||
case $1 in
|
||||
aclocal|automake)
|
||||
aclocal|automake|autoreconf)
|
||||
echo "The '$1' program is part of the GNU Automake package:"
|
||||
echo "<$gnu_software_URL/automake>"
|
||||
echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
|
||||
@@ -123,6 +127,9 @@ program_details ()
|
||||
echo "<$gnu_software_URL/m4/>"
|
||||
echo "<$perl_URL>"
|
||||
;;
|
||||
*)
|
||||
:
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
@@ -137,48 +144,55 @@ give_advice ()
|
||||
printf '%s\n' "'$1' is $msg."
|
||||
|
||||
configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
|
||||
autoheader_deps="'acconfig.h'"
|
||||
automake_deps="'Makefile.am'"
|
||||
aclocal_deps="'acinclude.m4'"
|
||||
case $normalized_program in
|
||||
aclocal*)
|
||||
echo "You should only need it if you modified $aclocal_deps or"
|
||||
echo "$configure_deps."
|
||||
;;
|
||||
autoconf*)
|
||||
echo "You should only need it if you modified 'configure.ac',"
|
||||
echo "or m4 files included by it."
|
||||
program_details 'autoconf'
|
||||
echo "You should only need it if you modified $configure_deps."
|
||||
;;
|
||||
autogen*)
|
||||
echo "You should only need it if you modified a '.def' or '.tpl' file."
|
||||
echo "You may want to install the GNU AutoGen package:"
|
||||
echo "<$gnu_software_URL/autogen/>"
|
||||
;;
|
||||
autoheader*)
|
||||
echo "You should only need it if you modified 'acconfig.h' or"
|
||||
echo "You should only need it if you modified $autoheader_deps or"
|
||||
echo "$configure_deps."
|
||||
program_details 'autoheader'
|
||||
;;
|
||||
automake*)
|
||||
echo "You should only need it if you modified 'Makefile.am' or"
|
||||
echo "You should only need it if you modified $automake_deps or"
|
||||
echo "$configure_deps."
|
||||
program_details 'automake'
|
||||
;;
|
||||
aclocal*)
|
||||
echo "You should only need it if you modified 'acinclude.m4' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'aclocal'
|
||||
;;
|
||||
autom4te*)
|
||||
autom4te*)
|
||||
echo "You might have modified some maintainer files that require"
|
||||
echo "the 'automa4te' program to be rebuilt."
|
||||
program_details 'autom4te'
|
||||
echo "the 'autom4te' program to be rebuilt."
|
||||
;;
|
||||
autoreconf*)
|
||||
echo "You should only need it if you modified $aclocal_deps or"
|
||||
echo "$automake_deps or $autoheader_deps or $automake_deps or"
|
||||
echo "$configure_deps."
|
||||
;;
|
||||
bison*|yacc*)
|
||||
echo "You should only need it if you modified a '.y' file."
|
||||
echo "You may want to install the GNU Bison package:"
|
||||
echo "<$gnu_software_URL/bison/>"
|
||||
;;
|
||||
lex*|flex*)
|
||||
echo "You should only need it if you modified a '.l' file."
|
||||
echo "You may want to install the Fast Lexical Analyzer package:"
|
||||
echo "<$flex_URL>"
|
||||
;;
|
||||
help2man*)
|
||||
echo "You should only need it if you modified a dependency" \
|
||||
"of a man page."
|
||||
echo "You may want to install the GNU Help2man package:"
|
||||
echo "<$gnu_software_URL/help2man/>"
|
||||
;;
|
||||
lex*|flex*)
|
||||
echo "You should only need it if you modified a '.l' file."
|
||||
echo "You may want to install the Fast Lexical Analyzer package:"
|
||||
echo "<$flex_URL>"
|
||||
;;
|
||||
makeinfo*)
|
||||
echo "You should only need it if you modified a '.texi' file, or"
|
||||
echo "any other file indirectly affecting the aspect of the manual."
|
||||
@@ -189,6 +203,12 @@ give_advice ()
|
||||
echo "want to install GNU make:"
|
||||
echo "<$gnu_software_URL/make/>"
|
||||
;;
|
||||
perl*)
|
||||
echo "You should only need it to run GNU Autoconf, GNU Automake, "
|
||||
echo " assorted other tools, or if you modified a Perl source file."
|
||||
echo "You may want to install the Perl 5 language interpreter:"
|
||||
echo "<$perl_URL>"
|
||||
;;
|
||||
*)
|
||||
echo "You might have modified some files without having the proper"
|
||||
echo "tools for further handling them. Check the 'README' file, it"
|
||||
@@ -197,6 +217,7 @@ give_advice ()
|
||||
echo "case some other package contains this missing '$1' program."
|
||||
;;
|
||||
esac
|
||||
program_details "$normalized_program"
|
||||
}
|
||||
|
||||
give_advice "$1" | sed -e '1s/^/WARNING: /' \
|
||||
@@ -207,9 +228,9 @@ give_advice "$1" | sed -e '1s/^/WARNING: /' \
|
||||
exit $st
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp nil t)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-format: "%Y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
@@ -1,78 +0,0 @@
|
||||
#! /bin/sh
|
||||
# Copyright 2014 Google Inc.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of Google Inc. nor the names of its contributors
|
||||
# may be used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
set -e -x
|
||||
|
||||
if [ -d /usr/local/share/aclocal ]; then
|
||||
autoreconf -isv -I/usr/local/share/aclocal
|
||||
else
|
||||
autoreconf -isv
|
||||
fi
|
||||
|
||||
ret=0
|
||||
./configure || ret=${?}
|
||||
if [ ${ret} -ne 0 ]; then
|
||||
cat config.log || true
|
||||
exit ${ret}
|
||||
fi
|
||||
|
||||
archflags=
|
||||
[ "${ARCH?}" != i386 ] || archflags=-m32
|
||||
|
||||
f=
|
||||
|
||||
if [ -n "${archflags}" ]; then
|
||||
CC=${CC-"cc"}
|
||||
CXX=${CXX-"c++"}
|
||||
|
||||
f="${f} ATF_BUILD_CC='${CC} ${archflags}'"
|
||||
f="${f} ATF_BUILD_CXX='${CXX} ${archflags}'"
|
||||
f="${f} CFLAGS='${archflags}'"
|
||||
f="${f} CXXFLAGS='${archflags}'"
|
||||
f="${f} LDFLAGS='${archflags}'"
|
||||
fi
|
||||
|
||||
if [ "${AS_ROOT:-no}" = yes ]; then
|
||||
cat >root-kyua.conf <<EOF
|
||||
syntax(2)
|
||||
unprivileged_user = 'nobody'
|
||||
EOF
|
||||
ret=0
|
||||
sudo -H PATH="${PATH}" make distcheck DISTCHECK_CONFIGURE_FLAGS="${f}" \
|
||||
KYUA_TEST_CONFIG_FILE="$(pwd)/root-kyua.conf" || ret=${?}
|
||||
else
|
||||
ret=0
|
||||
make distcheck DISTCHECK_CONFIGURE_FLAGS="${f}" || ret=${?}
|
||||
fi
|
||||
if [ ${ret} -ne 0 ]; then
|
||||
cat atf-*/_build/sub/config.log || true
|
||||
exit ${ret}
|
||||
fi
|
||||
|
||||
# vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4
|
||||
@@ -1,108 +0,0 @@
|
||||
#! /bin/sh
|
||||
# Copyright 2014 Google Inc.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of Google Inc. nor the names of its contributors
|
||||
# may be used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
set -e -x
|
||||
|
||||
install_deps() {
|
||||
sudo apt-get update -qq
|
||||
|
||||
local pkgsuffix=
|
||||
local packages=
|
||||
if [ "${ARCH?}" = i386 ]; then
|
||||
pkgsuffix=:i386
|
||||
packages="${packages} gcc-multilib"
|
||||
packages="${packages} g++-multilib"
|
||||
fi
|
||||
packages="${packages} gdb"
|
||||
packages="${packages} liblua5.2-0${pkgsuffix}"
|
||||
packages="${packages} liblua5.2-dev${pkgsuffix}"
|
||||
packages="${packages} libsqlite3-0${pkgsuffix}"
|
||||
packages="${packages} libsqlite3-dev${pkgsuffix}"
|
||||
packages="${packages} pkg-config${pkgsuffix}"
|
||||
packages="${packages} sqlite3"
|
||||
sudo apt-get install -y ${packages}
|
||||
}
|
||||
|
||||
install_from_github() {
|
||||
local name="${1}"; shift
|
||||
local release="${1}"; shift
|
||||
|
||||
local distname="${name}-${release}"
|
||||
|
||||
local baseurl="https://github.com/jmmv/${name}"
|
||||
wget --no-check-certificate \
|
||||
"${baseurl}/releases/download/${distname}/${distname}.tar.gz"
|
||||
tar -xzvf "${distname}.tar.gz"
|
||||
|
||||
local archflags=
|
||||
[ "${ARCH?}" != i386 ] || archflags=-m32
|
||||
|
||||
cd "${distname}"
|
||||
./configure \
|
||||
--disable-developer \
|
||||
--without-atf \
|
||||
--without-doxygen \
|
||||
CFLAGS="${archflags}" \
|
||||
CPPFLAGS="-I/usr/local/include" \
|
||||
CXXFLAGS="${archflags}" \
|
||||
LDFLAGS="-L/usr/local/lib -Wl,-R/usr/local/lib" \
|
||||
PKG_CONFIG_PATH="/usr/local/lib/pkgconfig"
|
||||
make
|
||||
sudo make install
|
||||
cd -
|
||||
|
||||
rm -rf "${distname}" "${distname}.tar.gz"
|
||||
}
|
||||
|
||||
install_from_bintray() {
|
||||
case "${ARCH?}" in
|
||||
amd64)
|
||||
name="20160204-usr-local-kyua-ubuntu-12-04-amd64-${CC?}.tar.gz"
|
||||
;;
|
||||
i386)
|
||||
name="20160714-usr-local-kyua-ubuntu-12-04-i386-${CC?}.tar.gz"
|
||||
;;
|
||||
*)
|
||||
echo "ERROR: Unknown ARCH value ${ARCH}" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
wget "http://dl.bintray.com/jmmv/kyua/${name}" || return 1
|
||||
sudo tar -xzvp -C / -f "${name}"
|
||||
rm -f "${name}"
|
||||
}
|
||||
|
||||
install_deps
|
||||
if ! install_from_bintray; then
|
||||
install_from_github atf 0.21
|
||||
install_from_github lutok 0.4
|
||||
install_from_github kyua 0.12
|
||||
fi
|
||||
|
||||
# vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4
|
||||
@@ -23,6 +23,8 @@
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
CODE_COVERAGE_DIRS+= atf-c++
|
||||
|
||||
ATF_CXX_LIBS = libatf-c++.la libatf-c.la
|
||||
|
||||
lib_LTLIBRARIES += libatf-c++.la
|
||||
@@ -61,6 +63,8 @@ atf-c++/atf-c++.pc: $(srcdir)/atf-c++/atf-c++.pc.in Makefile
|
||||
-e 's#__CXX__#$(ATF_BUILD_CXX)#g' \
|
||||
-e 's#__INCLUDEDIR__#$(includedir)#g' \
|
||||
-e 's#__LIBDIR__#$(libdir)#g' \
|
||||
-e 's#__PC_CXXFLAGS__#$(pc_cxxflags)#g' \
|
||||
-e 's#__PC_LDFLAGS__#$(pc_ldflags)#g' \
|
||||
<$(srcdir)/atf-c++/atf-c++.pc.in >atf-c++/atf-c++.pc.tmp; \
|
||||
mv atf-c++/atf-c++.pc.tmp atf-c++/atf-c++.pc
|
||||
|
||||
|
||||
@@ -7,5 +7,5 @@ libdir=__LIBDIR__
|
||||
Name: atf-c++
|
||||
Description: Automated Testing Framework (C++ binding)
|
||||
Version: __ATF_VERSION__
|
||||
Cflags: -I${includedir}
|
||||
Libs: -L${libdir} -latf-c++ -latf-c
|
||||
Cflags: -I${includedir} __PC_CXXFLAGS__
|
||||
Libs: -L${libdir} -latf-c++ -latf-c __PC_LDFLAGS__
|
||||
+3
-2
@@ -141,7 +141,7 @@ impl::build_cxx_o(const std::string& sfile, const std::string& ofile,
|
||||
return success;
|
||||
}
|
||||
|
||||
std::auto_ptr< impl::check_result >
|
||||
std::unique_ptr< impl::check_result >
|
||||
impl::exec(const atf::process::argv_array& argva)
|
||||
{
|
||||
atf_check_result_t result;
|
||||
@@ -150,5 +150,6 @@ impl::exec(const atf::process::argv_array& argva)
|
||||
if (atf_is_error(err))
|
||||
throw_atf_error(err);
|
||||
|
||||
return std::auto_ptr< impl::check_result >(new impl::check_result(&result));
|
||||
return std::unique_ptr< impl::check_result >(
|
||||
new impl::check_result(&result));
|
||||
}
|
||||
+3
-2
@@ -71,7 +71,8 @@ class check_result {
|
||||
check_result(const atf_check_result_t* result);
|
||||
|
||||
friend check_result test_constructor(const char* const*);
|
||||
friend std::auto_ptr< check_result > exec(const atf::process::argv_array&);
|
||||
friend std::unique_ptr< check_result >
|
||||
exec(const atf::process::argv_array&);
|
||||
|
||||
public:
|
||||
//!
|
||||
@@ -120,7 +121,7 @@ bool build_cpp(const std::string&, const std::string&,
|
||||
const atf::process::argv_array&);
|
||||
bool build_cxx_o(const std::string&, const std::string&,
|
||||
const atf::process::argv_array&);
|
||||
std::auto_ptr< check_result > exec(const atf::process::argv_array&);
|
||||
std::unique_ptr< check_result > exec(const atf::process::argv_array&);
|
||||
|
||||
// Useful for testing only.
|
||||
check_result test_constructor(void);
|
||||
|
||||
+11
-11
@@ -52,7 +52,7 @@ extern "C" {
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
static
|
||||
std::auto_ptr< atf::check::check_result >
|
||||
std::unique_ptr< atf::check::check_result >
|
||||
do_exec(const atf::tests::tc* tc, const char* helper_name)
|
||||
{
|
||||
std::vector< std::string > argv;
|
||||
@@ -65,7 +65,7 @@ do_exec(const atf::tests::tc* tc, const char* helper_name)
|
||||
}
|
||||
|
||||
static
|
||||
std::auto_ptr< atf::check::check_result >
|
||||
std::unique_ptr< atf::check::check_result >
|
||||
do_exec(const atf::tests::tc* tc, const char* helper_name, const char *carg2)
|
||||
{
|
||||
std::vector< std::string > argv;
|
||||
@@ -248,11 +248,11 @@ ATF_TEST_CASE_HEAD(exec_cleanup)
|
||||
}
|
||||
ATF_TEST_CASE_BODY(exec_cleanup)
|
||||
{
|
||||
std::auto_ptr< atf::fs::path > out;
|
||||
std::auto_ptr< atf::fs::path > err;
|
||||
std::unique_ptr< atf::fs::path > out;
|
||||
std::unique_ptr< atf::fs::path > err;
|
||||
|
||||
{
|
||||
std::auto_ptr< atf::check::check_result > r =
|
||||
std::unique_ptr< atf::check::check_result > r =
|
||||
do_exec(this, "exit-success");
|
||||
out.reset(new atf::fs::path(r->stdout_path()));
|
||||
err.reset(new atf::fs::path(r->stderr_path()));
|
||||
@@ -272,7 +272,7 @@ ATF_TEST_CASE_HEAD(exec_exitstatus)
|
||||
ATF_TEST_CASE_BODY(exec_exitstatus)
|
||||
{
|
||||
{
|
||||
std::auto_ptr< atf::check::check_result > r =
|
||||
std::unique_ptr< atf::check::check_result > r =
|
||||
do_exec(this, "exit-success");
|
||||
ATF_REQUIRE(r->exited());
|
||||
ATF_REQUIRE(!r->signaled());
|
||||
@@ -280,7 +280,7 @@ ATF_TEST_CASE_BODY(exec_exitstatus)
|
||||
}
|
||||
|
||||
{
|
||||
std::auto_ptr< atf::check::check_result > r =
|
||||
std::unique_ptr< atf::check::check_result > r =
|
||||
do_exec(this, "exit-failure");
|
||||
ATF_REQUIRE(r->exited());
|
||||
ATF_REQUIRE(!r->signaled());
|
||||
@@ -288,7 +288,7 @@ ATF_TEST_CASE_BODY(exec_exitstatus)
|
||||
}
|
||||
|
||||
{
|
||||
std::auto_ptr< atf::check::check_result > r =
|
||||
std::unique_ptr< atf::check::check_result > r =
|
||||
do_exec(this, "exit-signal");
|
||||
ATF_REQUIRE(!r->exited());
|
||||
ATF_REQUIRE(r->signaled());
|
||||
@@ -321,12 +321,12 @@ ATF_TEST_CASE_HEAD(exec_stdout_stderr)
|
||||
}
|
||||
ATF_TEST_CASE_BODY(exec_stdout_stderr)
|
||||
{
|
||||
std::auto_ptr< atf::check::check_result > r1 =
|
||||
std::unique_ptr< atf::check::check_result > r1 =
|
||||
do_exec(this, "stdout-stderr", "result1");
|
||||
ATF_REQUIRE(r1->exited());
|
||||
ATF_REQUIRE_EQ(r1->exitcode(), EXIT_SUCCESS);
|
||||
|
||||
std::auto_ptr< atf::check::check_result > r2 =
|
||||
std::unique_ptr< atf::check::check_result > r2 =
|
||||
do_exec(this, "stdout-stderr", "result2");
|
||||
ATF_REQUIRE(r2->exited());
|
||||
ATF_REQUIRE_EQ(r2->exitcode(), EXIT_SUCCESS);
|
||||
@@ -372,7 +372,7 @@ ATF_TEST_CASE_BODY(exec_unknown)
|
||||
argv.push_back("/foo/bar/non-existent");
|
||||
|
||||
atf::process::argv_array argva(argv);
|
||||
std::auto_ptr< atf::check::check_result > r = atf::check::exec(argva);
|
||||
std::unique_ptr< atf::check::check_result > r = atf::check::exec(argva);
|
||||
ATF_REQUIRE(r->exited());
|
||||
ATF_REQUIRE_EQ(r->exitcode(), 127);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ syntax("kyuafile", 1)
|
||||
test_suite("atf")
|
||||
|
||||
atf_test_program{name="application_test"}
|
||||
atf_test_program{name="auto_array_test"}
|
||||
atf_test_program{name="env_test"}
|
||||
atf_test_program{name="exceptions_test"}
|
||||
atf_test_program{name="fs_test"}
|
||||
|
||||
@@ -23,9 +23,10 @@
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
CODE_COVERAGE_DIRS+= atf-c++/detail
|
||||
|
||||
libatf_c___la_SOURCES += atf-c++/detail/application.cpp \
|
||||
atf-c++/detail/application.hpp \
|
||||
atf-c++/detail/auto_array.hpp \
|
||||
atf-c++/detail/env.cpp \
|
||||
atf-c++/detail/env.hpp \
|
||||
atf-c++/detail/exceptions.cpp \
|
||||
@@ -51,10 +52,6 @@ tests_atf_c___detail_PROGRAMS = atf-c++/detail/application_test
|
||||
atf_c___detail_application_test_SOURCES = atf-c++/detail/application_test.cpp
|
||||
atf_c___detail_application_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
|
||||
|
||||
tests_atf_c___detail_PROGRAMS += atf-c++/detail/auto_array_test
|
||||
atf_c___detail_auto_array_test_SOURCES = atf-c++/detail/auto_array_test.cpp
|
||||
atf_c___detail_auto_array_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
|
||||
|
||||
tests_atf_c___detail_PROGRAMS += atf-c++/detail/env_test
|
||||
atf_c___detail_env_test_SOURCES = atf-c++/detail/env_test.cpp
|
||||
atf_c___detail_env_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
|
||||
|
||||
@@ -37,6 +37,7 @@ extern "C" {
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <filesystem>
|
||||
#include <iostream>
|
||||
|
||||
extern "C" {
|
||||
@@ -205,19 +206,8 @@ impl::app::run(int argc, char* const* argv)
|
||||
m_argc = argc;
|
||||
m_argv = argv;
|
||||
|
||||
m_argv0 = m_argv[0];
|
||||
|
||||
m_prog_name = std::strrchr(m_argv[0], '/');
|
||||
if (m_prog_name == NULL)
|
||||
m_prog_name = m_argv[0];
|
||||
else
|
||||
m_prog_name++;
|
||||
|
||||
// Libtool workaround: if running from within the source tree (binaries
|
||||
// that are not installed yet), skip the "lt-" prefix added to files in
|
||||
// the ".libs" directory to show the real (not temporary) name.
|
||||
if (std::strncmp(m_prog_name, "lt-", 3) == 0)
|
||||
m_prog_name += 3;
|
||||
auto m_prog_filename = std::filesystem::path(m_argv[0]).filename();
|
||||
m_prog_name = m_prog_filename.c_str();
|
||||
|
||||
const std::string bug =
|
||||
std::string("This is probably a bug in ") + m_prog_name +
|
||||
|
||||
@@ -81,7 +81,6 @@ protected:
|
||||
int m_argc;
|
||||
char* const* m_argv;
|
||||
|
||||
const char* m_argv0;
|
||||
const char* m_prog_name;
|
||||
std::string m_description;
|
||||
std::string m_manpage;
|
||||
|
||||
@@ -1,175 +0,0 @@
|
||||
// Copyright (c) 2007 The NetBSD Foundation, Inc.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND
|
||||
// CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
// IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY
|
||||
// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
||||
// IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||
// IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#if !defined(ATF_CXX_DETAIL_AUTO_ARRAY_HPP)
|
||||
#define ATF_CXX_DETAIL_AUTO_ARRAY_HPP
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
namespace atf {
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// The "auto_array" class.
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
template< class T >
|
||||
struct auto_array_ref {
|
||||
T* m_ptr;
|
||||
|
||||
explicit auto_array_ref(T*);
|
||||
};
|
||||
|
||||
template< class T >
|
||||
auto_array_ref< T >::auto_array_ref(T* ptr) :
|
||||
m_ptr(ptr)
|
||||
{
|
||||
}
|
||||
|
||||
template< class T >
|
||||
class auto_array {
|
||||
T* m_ptr;
|
||||
|
||||
public:
|
||||
auto_array(T* = NULL) throw();
|
||||
auto_array(auto_array< T >&) throw();
|
||||
auto_array(auto_array_ref< T >) throw();
|
||||
~auto_array(void) throw();
|
||||
|
||||
T* get(void) throw();
|
||||
const T* get(void) const throw();
|
||||
T* release(void) throw();
|
||||
void reset(T* = NULL) throw();
|
||||
|
||||
auto_array< T >& operator=(auto_array< T >&) throw();
|
||||
auto_array< T >& operator=(auto_array_ref< T >) throw();
|
||||
|
||||
T& operator[](int) throw();
|
||||
operator auto_array_ref< T >(void) throw();
|
||||
};
|
||||
|
||||
template< class T >
|
||||
auto_array< T >::auto_array(T* ptr)
|
||||
throw() :
|
||||
m_ptr(ptr)
|
||||
{
|
||||
}
|
||||
|
||||
template< class T >
|
||||
auto_array< T >::auto_array(auto_array< T >& ptr)
|
||||
throw() :
|
||||
m_ptr(ptr.release())
|
||||
{
|
||||
}
|
||||
|
||||
template< class T >
|
||||
auto_array< T >::auto_array(auto_array_ref< T > ref)
|
||||
throw() :
|
||||
m_ptr(ref.m_ptr)
|
||||
{
|
||||
}
|
||||
|
||||
template< class T >
|
||||
auto_array< T >::~auto_array(void)
|
||||
throw()
|
||||
{
|
||||
if (m_ptr != NULL)
|
||||
delete [] m_ptr;
|
||||
}
|
||||
|
||||
template< class T >
|
||||
T*
|
||||
auto_array< T >::get(void)
|
||||
throw()
|
||||
{
|
||||
return m_ptr;
|
||||
}
|
||||
|
||||
template< class T >
|
||||
const T*
|
||||
auto_array< T >::get(void)
|
||||
const throw()
|
||||
{
|
||||
return m_ptr;
|
||||
}
|
||||
|
||||
template< class T >
|
||||
T*
|
||||
auto_array< T >::release(void)
|
||||
throw()
|
||||
{
|
||||
T* ptr = m_ptr;
|
||||
m_ptr = NULL;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
template< class T >
|
||||
void
|
||||
auto_array< T >::reset(T* ptr)
|
||||
throw()
|
||||
{
|
||||
if (m_ptr != NULL)
|
||||
delete [] m_ptr;
|
||||
m_ptr = ptr;
|
||||
}
|
||||
|
||||
template< class T >
|
||||
auto_array< T >&
|
||||
auto_array< T >::operator=(auto_array< T >& ptr)
|
||||
throw()
|
||||
{
|
||||
reset(ptr.release());
|
||||
return *this;
|
||||
}
|
||||
|
||||
template< class T >
|
||||
auto_array< T >&
|
||||
auto_array< T >::operator=(auto_array_ref< T > ref)
|
||||
throw()
|
||||
{
|
||||
if (m_ptr != ref.m_ptr) {
|
||||
delete [] m_ptr;
|
||||
m_ptr = ref.m_ptr;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
template< class T >
|
||||
T&
|
||||
auto_array< T >::operator[](int pos)
|
||||
throw()
|
||||
{
|
||||
return m_ptr[pos];
|
||||
}
|
||||
|
||||
template< class T >
|
||||
auto_array< T >::operator auto_array_ref< T >(void)
|
||||
throw()
|
||||
{
|
||||
return auto_array_ref< T >(release());
|
||||
}
|
||||
|
||||
} // namespace atf
|
||||
|
||||
#endif // !defined(ATF_CXX_DETAIL_AUTO_ARRAY_HPP)
|
||||
@@ -1,302 +0,0 @@
|
||||
// Copyright (c) 2007 The NetBSD Foundation, Inc.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND
|
||||
// CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
// IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY
|
||||
// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
||||
// IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||
// IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include "atf-c++/detail/auto_array.hpp"
|
||||
|
||||
extern "C" {
|
||||
#include <sys/types.h>
|
||||
}
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include <atf-c++.hpp>
|
||||
|
||||
extern "C" {
|
||||
#include "atf-c/defs.h"
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Tests for the "auto_array" class.
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
class test_array {
|
||||
public:
|
||||
int m_value;
|
||||
|
||||
static ssize_t m_nblocks;
|
||||
|
||||
static
|
||||
atf::auto_array< test_array >
|
||||
do_copy(atf::auto_array< test_array >& ta)
|
||||
{
|
||||
return atf::auto_array< test_array >(ta);
|
||||
}
|
||||
|
||||
void* operator new(size_t size ATF_DEFS_ATTRIBUTE_UNUSED)
|
||||
{
|
||||
ATF_FAIL("New called but should have been new[]");
|
||||
return new int(5);
|
||||
}
|
||||
|
||||
void* operator new[](size_t size)
|
||||
{
|
||||
m_nblocks++;
|
||||
void* mem = ::operator new(size);
|
||||
std::cout << "Allocated 'test_array' object " << mem << "\n";
|
||||
return mem;
|
||||
}
|
||||
|
||||
void operator delete(void* mem ATF_DEFS_ATTRIBUTE_UNUSED)
|
||||
{
|
||||
ATF_FAIL("Delete called but should have been delete[]");
|
||||
}
|
||||
|
||||
void operator delete[](void* mem)
|
||||
{
|
||||
std::cout << "Releasing 'test_array' object " << mem << "\n";
|
||||
if (m_nblocks == 0)
|
||||
ATF_FAIL("Unbalanced delete[]");
|
||||
m_nblocks--;
|
||||
::operator delete(mem);
|
||||
}
|
||||
};
|
||||
|
||||
ssize_t test_array::m_nblocks = 0;
|
||||
|
||||
ATF_TEST_CASE(auto_array_scope);
|
||||
ATF_TEST_CASE_HEAD(auto_array_scope)
|
||||
{
|
||||
set_md_var("descr", "Tests the automatic scope handling in the "
|
||||
"auto_array smart pointer class");
|
||||
}
|
||||
ATF_TEST_CASE_BODY(auto_array_scope)
|
||||
{
|
||||
using atf::auto_array;
|
||||
|
||||
ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
|
||||
{
|
||||
auto_array< test_array > t(new test_array[10]);
|
||||
ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
|
||||
}
|
||||
ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
|
||||
}
|
||||
|
||||
ATF_TEST_CASE(auto_array_copy);
|
||||
ATF_TEST_CASE_HEAD(auto_array_copy)
|
||||
{
|
||||
set_md_var("descr", "Tests the auto_array smart pointer class' copy "
|
||||
"constructor");
|
||||
}
|
||||
ATF_TEST_CASE_BODY(auto_array_copy)
|
||||
{
|
||||
using atf::auto_array;
|
||||
|
||||
ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
|
||||
{
|
||||
auto_array< test_array > t1(new test_array[10]);
|
||||
ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
|
||||
|
||||
{
|
||||
auto_array< test_array > t2(t1);
|
||||
ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
|
||||
}
|
||||
ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
|
||||
}
|
||||
ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
|
||||
}
|
||||
|
||||
ATF_TEST_CASE(auto_array_copy_ref);
|
||||
ATF_TEST_CASE_HEAD(auto_array_copy_ref)
|
||||
{
|
||||
set_md_var("descr", "Tests the auto_array smart pointer class' copy "
|
||||
"constructor through the auxiliary auto_array_ref object");
|
||||
}
|
||||
ATF_TEST_CASE_BODY(auto_array_copy_ref)
|
||||
{
|
||||
using atf::auto_array;
|
||||
|
||||
ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
|
||||
{
|
||||
auto_array< test_array > t1(new test_array[10]);
|
||||
ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
|
||||
|
||||
{
|
||||
auto_array< test_array > t2 = test_array::do_copy(t1);
|
||||
ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
|
||||
}
|
||||
ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
|
||||
}
|
||||
ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
|
||||
}
|
||||
|
||||
ATF_TEST_CASE(auto_array_get);
|
||||
ATF_TEST_CASE_HEAD(auto_array_get)
|
||||
{
|
||||
set_md_var("descr", "Tests the auto_array smart pointer class' get "
|
||||
"method");
|
||||
}
|
||||
ATF_TEST_CASE_BODY(auto_array_get)
|
||||
{
|
||||
using atf::auto_array;
|
||||
|
||||
test_array* ta = new test_array[10];
|
||||
auto_array< test_array > t(ta);
|
||||
ATF_REQUIRE_EQ(t.get(), ta);
|
||||
}
|
||||
|
||||
ATF_TEST_CASE(auto_array_release);
|
||||
ATF_TEST_CASE_HEAD(auto_array_release)
|
||||
{
|
||||
set_md_var("descr", "Tests the auto_array smart pointer class' release "
|
||||
"method");
|
||||
}
|
||||
ATF_TEST_CASE_BODY(auto_array_release)
|
||||
{
|
||||
using atf::auto_array;
|
||||
|
||||
test_array* ta1 = new test_array[10];
|
||||
{
|
||||
auto_array< test_array > t(ta1);
|
||||
ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
|
||||
test_array* ta2 = t.release();
|
||||
ATF_REQUIRE_EQ(ta2, ta1);
|
||||
ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
|
||||
}
|
||||
ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
|
||||
delete [] ta1;
|
||||
}
|
||||
|
||||
ATF_TEST_CASE(auto_array_reset);
|
||||
ATF_TEST_CASE_HEAD(auto_array_reset)
|
||||
{
|
||||
set_md_var("descr", "Tests the auto_array smart pointer class' reset "
|
||||
"method");
|
||||
}
|
||||
ATF_TEST_CASE_BODY(auto_array_reset)
|
||||
{
|
||||
using atf::auto_array;
|
||||
|
||||
test_array* ta1 = new test_array[10];
|
||||
test_array* ta2 = new test_array[10];
|
||||
ATF_REQUIRE_EQ(test_array::m_nblocks, 2);
|
||||
|
||||
{
|
||||
auto_array< test_array > t(ta1);
|
||||
ATF_REQUIRE_EQ(test_array::m_nblocks, 2);
|
||||
t.reset(ta2);
|
||||
ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
|
||||
t.reset();
|
||||
ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
|
||||
}
|
||||
ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
|
||||
}
|
||||
|
||||
ATF_TEST_CASE(auto_array_assign);
|
||||
ATF_TEST_CASE_HEAD(auto_array_assign)
|
||||
{
|
||||
set_md_var("descr", "Tests the auto_array smart pointer class' "
|
||||
"assignment operator");
|
||||
}
|
||||
ATF_TEST_CASE_BODY(auto_array_assign)
|
||||
{
|
||||
using atf::auto_array;
|
||||
|
||||
ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
|
||||
{
|
||||
auto_array< test_array > t1(new test_array[10]);
|
||||
ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
|
||||
|
||||
{
|
||||
auto_array< test_array > t2;
|
||||
t2 = t1;
|
||||
ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
|
||||
}
|
||||
ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
|
||||
}
|
||||
ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
|
||||
}
|
||||
|
||||
ATF_TEST_CASE(auto_array_assign_ref);
|
||||
ATF_TEST_CASE_HEAD(auto_array_assign_ref)
|
||||
{
|
||||
set_md_var("descr", "Tests the auto_array smart pointer class' "
|
||||
"assignment operator through the auxiliary auto_array_ref "
|
||||
"object");
|
||||
}
|
||||
ATF_TEST_CASE_BODY(auto_array_assign_ref)
|
||||
{
|
||||
using atf::auto_array;
|
||||
|
||||
ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
|
||||
{
|
||||
auto_array< test_array > t1(new test_array[10]);
|
||||
ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
|
||||
|
||||
{
|
||||
auto_array< test_array > t2;
|
||||
t2 = test_array::do_copy(t1);
|
||||
ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
|
||||
}
|
||||
ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
|
||||
}
|
||||
ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
|
||||
}
|
||||
|
||||
ATF_TEST_CASE(auto_array_access);
|
||||
ATF_TEST_CASE_HEAD(auto_array_access)
|
||||
{
|
||||
set_md_var("descr", "Tests the auto_array smart pointer class' access "
|
||||
"operator");
|
||||
}
|
||||
ATF_TEST_CASE_BODY(auto_array_access)
|
||||
{
|
||||
using atf::auto_array;
|
||||
|
||||
auto_array< test_array > t(new test_array[10]);
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
t[i].m_value = i * 2;
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
ATF_REQUIRE_EQ(t[i].m_value, i * 2);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Main.
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
ATF_INIT_TEST_CASES(tcs)
|
||||
{
|
||||
// Add the test for the "auto_array" class.
|
||||
ATF_ADD_TEST_CASE(tcs, auto_array_scope);
|
||||
ATF_ADD_TEST_CASE(tcs, auto_array_copy);
|
||||
ATF_ADD_TEST_CASE(tcs, auto_array_copy_ref);
|
||||
ATF_ADD_TEST_CASE(tcs, auto_array_get);
|
||||
ATF_ADD_TEST_CASE(tcs, auto_array_release);
|
||||
ATF_ADD_TEST_CASE(tcs, auto_array_reset);
|
||||
ATF_ADD_TEST_CASE(tcs, auto_array_assign);
|
||||
ATF_ADD_TEST_CASE(tcs, auto_array_assign_ref);
|
||||
ATF_ADD_TEST_CASE(tcs, auto_array_access);
|
||||
}
|
||||
@@ -32,7 +32,6 @@
|
||||
extern "C" {
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/wait.h>
|
||||
#include <dirent.h>
|
||||
|
||||
+10
-12
@@ -46,31 +46,29 @@ namespace impl = atf::process;
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
template< class C >
|
||||
atf::auto_array< const char* >
|
||||
std::vector<const char*>
|
||||
collection_to_argv(const C& c)
|
||||
{
|
||||
atf::auto_array< const char* > argv(new const char*[c.size() + 1]);
|
||||
std::vector<const char*> argv;
|
||||
argv.reserve(c.size() + 1);
|
||||
|
||||
std::size_t pos = 0;
|
||||
for (typename C::const_iterator iter = c.begin(); iter != c.end();
|
||||
iter++) {
|
||||
argv[pos] = (*iter).c_str();
|
||||
pos++;
|
||||
for (const auto& item : c) {
|
||||
argv.push_back(item.c_str());
|
||||
}
|
||||
INV(pos == c.size());
|
||||
argv[pos] = NULL;
|
||||
argv.push_back(nullptr);
|
||||
|
||||
return argv;
|
||||
}
|
||||
|
||||
template< class C >
|
||||
template<class C>
|
||||
C
|
||||
argv_to_collection(const char* const* argv)
|
||||
{
|
||||
C c;
|
||||
|
||||
for (const char* const* iter = argv; *iter != NULL; iter++)
|
||||
for (const char* const* iter = argv; *iter != nullptr; iter++) {
|
||||
c.push_back(std::string(*iter));
|
||||
}
|
||||
|
||||
return c;
|
||||
}
|
||||
@@ -123,7 +121,7 @@ const char* const*
|
||||
impl::argv_array::exec_argv(void)
|
||||
const
|
||||
{
|
||||
return m_exec_argv.get();
|
||||
return m_exec_argv.data();
|
||||
}
|
||||
|
||||
impl::argv_array::size_type
|
||||
|
||||
@@ -36,7 +36,6 @@ extern "C" {
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <atf-c++/detail/auto_array.hpp>
|
||||
#include <atf-c++/detail/exceptions.hpp>
|
||||
#include <atf-c++/detail/fs.hpp>
|
||||
|
||||
@@ -58,7 +57,7 @@ class argv_array {
|
||||
// std::tr1::shared_array instead when it becomes widely available.
|
||||
// The reason would be to remove all copy constructors and assignment
|
||||
// operators from this class.
|
||||
auto_array< const char* > m_exec_argv;
|
||||
std::vector< const char* > m_exec_argv;
|
||||
void ctor_init_exec_argv(void);
|
||||
|
||||
public:
|
||||
|
||||
@@ -196,22 +196,19 @@ ATF_TEST_CASE_BODY(argv_array_assign)
|
||||
const char* const carray1[] = { "arg1", NULL };
|
||||
const char* const carray2[] = { "arg1", "arg2", NULL };
|
||||
|
||||
std::auto_ptr< argv_array > argv1(new argv_array(carray1));
|
||||
std::auto_ptr< argv_array > argv2(new argv_array(carray2));
|
||||
argv_array argv1 = argv_array(carray1);
|
||||
argv_array argv2 = argv_array(carray2);
|
||||
|
||||
*argv2 = *argv1;
|
||||
ATF_REQUIRE_EQ(argv2->size(), argv1->size());
|
||||
ATF_REQUIRE(std::strcmp((*argv2)[0], (*argv1)[0]) == 0);
|
||||
argv2 = argv1;
|
||||
ATF_REQUIRE_EQ(argv2.size(), argv1.size());
|
||||
ATF_REQUIRE(std::strcmp(argv2[0], argv1[0]) == 0);
|
||||
|
||||
ATF_REQUIRE(argv2->exec_argv() != argv1->exec_argv());
|
||||
argv1.release();
|
||||
ATF_REQUIRE(argv2.exec_argv() != argv1.exec_argv());
|
||||
{
|
||||
const char* const* eargv2 = argv2->exec_argv();
|
||||
const char* const* eargv2 = argv2.exec_argv();
|
||||
ATF_REQUIRE(std::strcmp(eargv2[0], carray1[0]) == 0);
|
||||
ATF_REQUIRE_EQ(eargv2[1], static_cast< const char* >(NULL));
|
||||
}
|
||||
|
||||
argv2.release();
|
||||
}
|
||||
|
||||
ATF_TEST_CASE(argv_array_copy);
|
||||
@@ -226,21 +223,18 @@ ATF_TEST_CASE_BODY(argv_array_copy)
|
||||
|
||||
const char* const carray[] = { "arg0", NULL };
|
||||
|
||||
std::auto_ptr< argv_array > argv1(new argv_array(carray));
|
||||
std::auto_ptr< argv_array > argv2(new argv_array(*argv1));
|
||||
argv_array argv1 = argv_array(carray);
|
||||
argv_array argv2 = argv1;
|
||||
|
||||
ATF_REQUIRE_EQ(argv2->size(), argv1->size());
|
||||
ATF_REQUIRE(std::strcmp((*argv2)[0], (*argv1)[0]) == 0);
|
||||
ATF_REQUIRE_EQ(argv2.size(), argv1.size());
|
||||
ATF_REQUIRE(std::strcmp(argv2[0], argv1[0]) == 0);
|
||||
|
||||
ATF_REQUIRE(argv2->exec_argv() != argv1->exec_argv());
|
||||
argv1.release();
|
||||
ATF_REQUIRE(argv2.exec_argv() != argv1.exec_argv());
|
||||
{
|
||||
const char* const* eargv2 = argv2->exec_argv();
|
||||
const char* const* eargv2 = argv2.exec_argv();
|
||||
ATF_REQUIRE(std::strcmp(eargv2[0], carray[0]) == 0);
|
||||
ATF_REQUIRE_EQ(eargv2[1], static_cast< const char* >(NULL));
|
||||
}
|
||||
|
||||
argv2.release();
|
||||
}
|
||||
|
||||
ATF_TEST_CASE(argv_array_exec_argv);
|
||||
|
||||
@@ -45,8 +45,6 @@
|
||||
{ \
|
||||
set_md_var("descr", "Tests that the " hdrname " file can be " \
|
||||
"included on its own, without any prerequisites"); \
|
||||
const std::string cxx = atf::env::get("ATF_BUILD_CXX", ATF_BUILD_CXX); \
|
||||
set_md_var("require.progs", cxx); \
|
||||
} \
|
||||
ATF_TEST_CASE_BODY(name) \
|
||||
{ \
|
||||
@@ -58,8 +56,6 @@
|
||||
ATF_TEST_CASE_HEAD(name) \
|
||||
{ \
|
||||
set_md_var("descr", descr); \
|
||||
const std::string cxx = atf::env::get("ATF_BUILD_CXX", ATF_BUILD_CXX); \
|
||||
set_md_var("require.progs", cxx); \
|
||||
} \
|
||||
ATF_TEST_CASE_BODY(name) \
|
||||
{ \
|
||||
|
||||
@@ -42,14 +42,6 @@ extern "C" {
|
||||
namespace impl = atf::text;
|
||||
#define IMPL_NAME "atf::text"
|
||||
|
||||
char*
|
||||
impl::duplicate(const char* str)
|
||||
{
|
||||
char* copy = new char[std::strlen(str) + 1];
|
||||
std::strcpy(copy, str);
|
||||
return copy;
|
||||
}
|
||||
|
||||
bool
|
||||
impl::match(const std::string& str, const std::string& regex)
|
||||
{
|
||||
|
||||
@@ -38,14 +38,6 @@ extern "C" {
|
||||
namespace atf {
|
||||
namespace text {
|
||||
|
||||
//!
|
||||
//! \brief Duplicates a C string using the new[] allocator.
|
||||
//!
|
||||
//! Replaces the functionality of strdup by using the new[] allocator and
|
||||
//! thus allowing the resulting memory to be managed by utils::auto_array.
|
||||
//!
|
||||
char* duplicate(const char*);
|
||||
|
||||
//!
|
||||
//! \brief Joins multiple words into a string.
|
||||
//!
|
||||
|
||||
@@ -35,26 +35,6 @@
|
||||
// Test cases for the free functions.
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
ATF_TEST_CASE(duplicate);
|
||||
ATF_TEST_CASE_HEAD(duplicate)
|
||||
{
|
||||
set_md_var("descr", "Tests the duplicate function");
|
||||
}
|
||||
ATF_TEST_CASE_BODY(duplicate)
|
||||
{
|
||||
using atf::text::duplicate;
|
||||
|
||||
const char* orig = "foo";
|
||||
|
||||
char* copy = duplicate(orig);
|
||||
ATF_REQUIRE_EQ(std::strlen(copy), 3);
|
||||
ATF_REQUIRE(std::strcmp(copy, "foo") == 0);
|
||||
|
||||
std::strcpy(copy, "bar");
|
||||
ATF_REQUIRE(std::strcmp(copy, "bar") == 0);
|
||||
ATF_REQUIRE(std::strcmp(orig, "foo") == 0);
|
||||
}
|
||||
|
||||
ATF_TEST_CASE(join);
|
||||
ATF_TEST_CASE_HEAD(join)
|
||||
{
|
||||
@@ -373,7 +353,6 @@ ATF_TEST_CASE_BODY(to_type)
|
||||
ATF_INIT_TEST_CASES(tcs)
|
||||
{
|
||||
// Add the test cases for the free functions.
|
||||
ATF_ADD_TEST_CASE(tcs, duplicate);
|
||||
ATF_ADD_TEST_CASE(tcs, join);
|
||||
ATF_ADD_TEST_CASE(tcs, match);
|
||||
ATF_ADD_TEST_CASE(tcs, split);
|
||||
|
||||
+19
-29
@@ -58,7 +58,6 @@ extern "C" {
|
||||
}
|
||||
|
||||
#include "atf-c++/detail/application.hpp"
|
||||
#include "atf-c++/detail/auto_array.hpp"
|
||||
#include "atf-c++/detail/env.hpp"
|
||||
#include "atf-c++/detail/exceptions.hpp"
|
||||
#include "atf-c++/detail/fs.hpp"
|
||||
@@ -123,13 +122,7 @@ static void
|
||||
set_program_name(const char* argv0)
|
||||
{
|
||||
const std::string program_name = atf::fs::path(argv0).leaf_name();
|
||||
// Libtool workaround: if running from within the source tree (binaries
|
||||
// that are not installed yet), skip the "lt-" prefix added to files in
|
||||
// the ".libs" directory to show the real (not temporary) name.
|
||||
if (program_name.substr(0, 3) == "lt-")
|
||||
Program_Name = program_name.substr(3);
|
||||
else
|
||||
Program_Name = program_name;
|
||||
Program_Name = program_name;
|
||||
}
|
||||
|
||||
bool
|
||||
@@ -207,22 +200,22 @@ impl::tc::init(const vars_map& config)
|
||||
{
|
||||
atf_error_t err;
|
||||
|
||||
auto_array< const char * > array(new const char*[(config.size() * 2) + 1]);
|
||||
const char **ptr = array.get();
|
||||
std::vector< const char * > array;
|
||||
array.reserve((config.size() * 2) + 1);
|
||||
|
||||
for (vars_map::const_iterator iter = config.begin();
|
||||
iter != config.end(); iter++) {
|
||||
*ptr = (*iter).first.c_str();
|
||||
*(ptr + 1) = (*iter).second.c_str();
|
||||
ptr += 2;
|
||||
array.push_back((*iter).first.c_str());
|
||||
array.push_back((*iter).second.c_str());
|
||||
}
|
||||
*ptr = NULL;
|
||||
array.push_back(nullptr);
|
||||
|
||||
wraps[&pimpl->m_tc] = this;
|
||||
cwraps[&pimpl->m_tc] = this;
|
||||
|
||||
err = atf_tc_init(&pimpl->m_tc, pimpl->m_ident.c_str(), pimpl->wrap_head,
|
||||
pimpl->wrap_body, pimpl->m_has_cleanup ? pimpl->wrap_cleanup : NULL,
|
||||
array.get());
|
||||
array.data());
|
||||
if (atf_is_error(err))
|
||||
throw_atf_error(err);
|
||||
}
|
||||
@@ -273,6 +266,7 @@ impl::tc::get_md_vars(void)
|
||||
char **ptr;
|
||||
for (ptr = array; *ptr != NULL; ptr += 2)
|
||||
vars[*ptr] = *(ptr + 1);
|
||||
atf_utils_free_charpp(array);
|
||||
} catch (...) {
|
||||
atf_utils_free_charpp(array);
|
||||
throw;
|
||||
@@ -454,9 +448,7 @@ init_tcs(void (*add_tcs)(tc_vector&), tc_vector& tcs,
|
||||
const atf::tests::vars_map& vars)
|
||||
{
|
||||
add_tcs(tcs);
|
||||
for (tc_vector::iterator iter = tcs.begin(); iter != tcs.end(); iter++) {
|
||||
impl::tc* tc = *iter;
|
||||
|
||||
for (auto& tc : tcs) {
|
||||
tc->init(vars);
|
||||
}
|
||||
}
|
||||
@@ -609,27 +601,25 @@ safe_main(int argc, char** argv, void (*add_tcs)(tc_vector&))
|
||||
|
||||
int errcode;
|
||||
|
||||
tc_vector tcs;
|
||||
if (lflag) {
|
||||
if (argc > 0)
|
||||
throw usage_error("Cannot provide test case names with -l");
|
||||
|
||||
init_tcs(add_tcs, tcs, vars);
|
||||
errcode = list_tcs(tcs);
|
||||
} else {
|
||||
if (argc == 0)
|
||||
throw usage_error("Must provide a test case name");
|
||||
else if (argc > 1)
|
||||
throw usage_error("Cannot provide more than one test case name");
|
||||
INV(argc == 1);
|
||||
|
||||
init_tcs(add_tcs, tcs, vars);
|
||||
errcode = run_tc(tcs, argv[0], resfile);
|
||||
}
|
||||
for (tc_vector::iterator iter = tcs.begin(); iter != tcs.end(); iter++) {
|
||||
impl::tc* tc = *iter;
|
||||
|
||||
delete tc;
|
||||
tc_vector tcs;
|
||||
try {
|
||||
init_tcs(add_tcs, tcs, vars);
|
||||
errcode = lflag ? list_tcs(tcs) : run_tc(tcs, argv[0], resfile);
|
||||
} catch (...) {
|
||||
for (auto& tc: tcs) {
|
||||
delete tc;
|
||||
}
|
||||
throw;
|
||||
}
|
||||
|
||||
return errcode;
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
defs.h
|
||||
@@ -23,6 +23,7 @@
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
CODE_COVERAGE_DIRS+= atf-c
|
||||
lib_LTLIBRARIES += libatf-c.la
|
||||
libatf_c_la_SOURCES = atf-c/build.c \
|
||||
atf-c/build.h \
|
||||
@@ -74,6 +75,8 @@ atf-c/atf-c.pc: $(srcdir)/atf-c/atf-c.pc.in Makefile
|
||||
-e 's#__CC__#$(ATF_BUILD_CC)#g' \
|
||||
-e 's#__INCLUDEDIR__#$(includedir)#g' \
|
||||
-e 's#__LIBDIR__#$(libdir)#g' \
|
||||
-e 's#__PC_CFLAGS__#$(pc_cflags)#g' \
|
||||
-e 's#__PC_LDFLAGS__#$(pc_ldflags)#g' \
|
||||
<$(srcdir)/atf-c/atf-c.pc.in >atf-c/atf-c.pc.tmp; \
|
||||
mv atf-c/atf-c.pc.tmp atf-c/atf-c.pc
|
||||
|
||||
|
||||
+8
-10
@@ -22,7 +22,7 @@
|
||||
.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||
.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
.Dd February 23, 2021
|
||||
.Dd October 10, 2025
|
||||
.Dt ATF-C 3
|
||||
.Os
|
||||
.Sh NAME
|
||||
@@ -167,7 +167,7 @@
|
||||
.Fa "const char *contents"
|
||||
.Fa "..."
|
||||
.Fc
|
||||
.Ft void
|
||||
.Ft bool
|
||||
.Fo atf_utils_file_exists
|
||||
.Fa "const char *file"
|
||||
.Fc
|
||||
@@ -249,9 +249,9 @@ ATF_TC_BODY(tc3, tc)
|
||||
|
||||
ATF_TP_ADD_TCS(tp)
|
||||
{
|
||||
ATF_TP_ADD_TC(tcs, tc1);
|
||||
ATF_TP_ADD_TC(tcs, tc2);
|
||||
ATF_TP_ADD_TC(tcs, tc3);
|
||||
ATF_TP_ADD_TC(tp, tc1);
|
||||
ATF_TP_ADD_TC(tp, tc2);
|
||||
ATF_TP_ADD_TC(tp, tc3);
|
||||
... add additional test cases ...
|
||||
|
||||
return atf_no_error();
|
||||
@@ -535,12 +535,10 @@ observed integer in the second parameter.
|
||||
.Fn ATF_CHECK_ERRNO
|
||||
and
|
||||
.Fn ATF_REQUIRE_ERRNO
|
||||
take, first, the error code that the check is expecting to find in the
|
||||
take an expected error code and a boolean expression, and fail the
|
||||
test if either the expression is false or
|
||||
.Va errno
|
||||
variable and, second, a boolean expression that, if evaluates to true,
|
||||
means that a call failed and
|
||||
.Va errno
|
||||
has to be checked against the first value.
|
||||
is not equal to the expected error code.
|
||||
.Ss Utility functions
|
||||
The following functions are provided as part of the
|
||||
.Nm
|
||||
|
||||
+2
-2
@@ -7,5 +7,5 @@ libdir=__LIBDIR__
|
||||
Name: atf-c
|
||||
Description: Automated Testing Framework (C binding)
|
||||
Version: __ATF_VERSION__
|
||||
Cflags: -I${includedir}
|
||||
Libs: -L${libdir} -latf-c
|
||||
Cflags: -I${includedir} __PC_CFLAGS__
|
||||
Libs: -L${libdir} -latf-c __PC_LDFLAGS__
|
||||
+1
-1
@@ -83,7 +83,7 @@ append_optargs(const char *const optargs[], atf_list_t *argv)
|
||||
|
||||
err = atf_no_error();
|
||||
while (*optargs != NULL && !atf_is_error(err)) {
|
||||
err = append_arg1(strdup(*optargs), argv);
|
||||
err = append_arg1(*optargs, argv);
|
||||
optargs++;
|
||||
}
|
||||
|
||||
|
||||
@@ -348,6 +348,7 @@ atf_check_result_fini(atf_check_result_t *r)
|
||||
atf_list_fini(&r->pimpl->m_argv);
|
||||
|
||||
free(r->pimpl);
|
||||
r->pimpl = NULL;
|
||||
}
|
||||
|
||||
const char *
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#define ATF_C_DEFS_H
|
||||
|
||||
#define ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(a, b) @ATTRIBUTE_FORMAT_PRINTF@
|
||||
#define ATF_DEFS_ATTRIBUTE_NONNULL @ATTRIBUTE_NONNULL@
|
||||
#define ATF_DEFS_ATTRIBUTE_NORETURN @ATTRIBUTE_NORETURN@
|
||||
#define ATF_DEFS_ATTRIBUTE_UNUSED @ATTRIBUTE_UNUSED@
|
||||
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
CODE_COVERAGE_DIRS+= atf-c/detail
|
||||
|
||||
libatf_c_la_SOURCES += atf-c/detail/dynstr.c \
|
||||
atf-c/detail/dynstr.h \
|
||||
atf-c/detail/env.c \
|
||||
|
||||
+14
-21
@@ -45,22 +45,18 @@ atf_error_t
|
||||
resize(atf_dynstr_t *ad, size_t newsize)
|
||||
{
|
||||
char *newdata;
|
||||
atf_error_t err;
|
||||
|
||||
PRE(newsize > ad->m_datasize);
|
||||
|
||||
newdata = (char *)malloc(newsize);
|
||||
if (newdata == NULL) {
|
||||
err = atf_no_memory_error();
|
||||
} else {
|
||||
strcpy(newdata, ad->m_data);
|
||||
free(ad->m_data);
|
||||
ad->m_data = newdata;
|
||||
ad->m_datasize = newsize;
|
||||
err = atf_no_error();
|
||||
}
|
||||
newdata = realloc(ad->m_data, newsize);
|
||||
if (newdata == NULL)
|
||||
return atf_no_memory_error();
|
||||
|
||||
return err;
|
||||
newdata[newsize - 1] = '\0';
|
||||
ad->m_data = newdata;
|
||||
ad->m_datasize = newsize;
|
||||
|
||||
return atf_no_error();
|
||||
}
|
||||
|
||||
static
|
||||
@@ -117,21 +113,16 @@ const size_t atf_dynstr_npos = SIZE_MAX;
|
||||
atf_error_t
|
||||
atf_dynstr_init(atf_dynstr_t *ad)
|
||||
{
|
||||
atf_error_t err;
|
||||
|
||||
ad->m_data = (char *)malloc(sizeof(char));
|
||||
if (ad->m_data == NULL) {
|
||||
err = atf_no_memory_error();
|
||||
goto out;
|
||||
}
|
||||
ad->m_data = malloc(sizeof(char));
|
||||
if (ad->m_data == NULL)
|
||||
return atf_no_memory_error();
|
||||
|
||||
ad->m_data[0] = '\0';
|
||||
ad->m_datasize = 1;
|
||||
ad->m_length = 0;
|
||||
err = atf_no_error();
|
||||
|
||||
out:
|
||||
return err;
|
||||
return atf_no_error();
|
||||
}
|
||||
|
||||
atf_error_t
|
||||
@@ -158,6 +149,7 @@ atf_dynstr_init_ap(atf_dynstr_t *ad, const char *fmt, va_list ap)
|
||||
va_end(ap2);
|
||||
if (ret < 0) {
|
||||
free(ad->m_data);
|
||||
ad->m_data = NULL;
|
||||
err = atf_libc_error(errno, "Cannot format string");
|
||||
goto out;
|
||||
}
|
||||
@@ -278,6 +270,7 @@ atf_dynstr_fini(atf_dynstr_t *ad)
|
||||
{
|
||||
INV(ad->m_data != NULL);
|
||||
free(ad->m_data);
|
||||
ad->m_data = NULL;
|
||||
}
|
||||
|
||||
char *
|
||||
|
||||
+10
-11
@@ -43,6 +43,8 @@
|
||||
* Constructors and destructors.
|
||||
*/
|
||||
|
||||
#define MAXLEN 8192
|
||||
|
||||
ATF_TC(init);
|
||||
ATF_TC_HEAD(init, tc)
|
||||
{
|
||||
@@ -173,13 +175,12 @@ ATF_TC_HEAD(init_rep, tc)
|
||||
}
|
||||
ATF_TC_BODY(init_rep, tc)
|
||||
{
|
||||
const size_t maxlen = 8192;
|
||||
char buf[maxlen + 1];
|
||||
char buf[MAXLEN + 1];
|
||||
size_t i;
|
||||
|
||||
buf[0] = '\0';
|
||||
|
||||
for (i = 0; i < maxlen; i++) {
|
||||
for (i = 0; i < MAXLEN; i++) {
|
||||
atf_dynstr_t str;
|
||||
|
||||
RE(atf_dynstr_init_rep(&str, i, 'a'));
|
||||
@@ -371,15 +372,14 @@ static
|
||||
void
|
||||
check_append(atf_error_t (*append)(atf_dynstr_t *, const char *, ...))
|
||||
{
|
||||
const size_t maxlen = 8192;
|
||||
char buf[maxlen + 1];
|
||||
char buf[MAXLEN + 1];
|
||||
size_t i;
|
||||
atf_dynstr_t str;
|
||||
|
||||
printf("Appending with plain string\n");
|
||||
buf[0] = '\0';
|
||||
RE(atf_dynstr_init(&str));
|
||||
for (i = 0; i < maxlen; i++) {
|
||||
for (i = 0; i < MAXLEN; i++) {
|
||||
if (strcmp(atf_dynstr_cstring(&str), buf) != 0) {
|
||||
fprintf(stderr, "Failed at iteration %zd\n", i);
|
||||
atf_tc_fail("Failed to append character at iteration %zd", i);
|
||||
@@ -393,7 +393,7 @@ check_append(atf_error_t (*append)(atf_dynstr_t *, const char *, ...))
|
||||
printf("Appending with formatted string\n");
|
||||
buf[0] = '\0';
|
||||
RE(atf_dynstr_init(&str));
|
||||
for (i = 0; i < maxlen; i++) {
|
||||
for (i = 0; i < MAXLEN; i++) {
|
||||
if (strcmp(atf_dynstr_cstring(&str), buf) != 0) {
|
||||
fprintf(stderr, "Failed at iteration %zd\n", i);
|
||||
atf_tc_fail("Failed to append character at iteration %zd", i);
|
||||
@@ -471,15 +471,14 @@ static
|
||||
void
|
||||
check_prepend(atf_error_t (*prepend)(atf_dynstr_t *, const char *, ...))
|
||||
{
|
||||
const size_t maxlen = 8192;
|
||||
char buf[maxlen + 1];
|
||||
char buf[MAXLEN + 1];
|
||||
size_t i;
|
||||
atf_dynstr_t str;
|
||||
|
||||
printf("Prepending with plain string\n");
|
||||
buf[0] = '\0';
|
||||
RE(atf_dynstr_init(&str));
|
||||
for (i = 0; i < maxlen; i++) {
|
||||
for (i = 0; i < MAXLEN; i++) {
|
||||
if (strcmp(atf_dynstr_cstring(&str), buf) != 0) {
|
||||
fprintf(stderr, "Failed at iteration %zd\n", i);
|
||||
atf_tc_fail("Failed to prepend character at iteration %zd", i);
|
||||
@@ -499,7 +498,7 @@ check_prepend(atf_error_t (*prepend)(atf_dynstr_t *, const char *, ...))
|
||||
printf("Prepending with formatted string\n");
|
||||
buf[0] = '\0';
|
||||
RE(atf_dynstr_init(&str));
|
||||
for (i = 0; i < maxlen; i++) {
|
||||
for (i = 0; i < MAXLEN; i++) {
|
||||
if (strcmp(atf_dynstr_cstring(&str), buf) != 0) {
|
||||
fprintf(stderr, "Failed at iteration %zd\n", i);
|
||||
atf_tc_fail("Failed to prepend character at iteration %zd", i);
|
||||
|
||||
+3
-38
@@ -25,10 +25,6 @@
|
||||
|
||||
#include "atf-c/detail/env.h"
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -65,25 +61,11 @@ atf_env_set(const char *name, const char *val)
|
||||
{
|
||||
atf_error_t err;
|
||||
|
||||
#if defined(HAVE_SETENV)
|
||||
if (setenv(name, val, 1) == -1)
|
||||
err = atf_libc_error(errno, "Cannot set environment variable "
|
||||
"'%s' to '%s'", name, val);
|
||||
err = atf_libc_error(errno,
|
||||
"Cannot set environment variable '%s' to '%s'", name, val);
|
||||
else
|
||||
err = atf_no_error();
|
||||
#elif defined(HAVE_PUTENV)
|
||||
char *buf;
|
||||
|
||||
err = atf_text_format(&buf, "%s=%s", name, val);
|
||||
if (!atf_is_error(err)) {
|
||||
if (putenv(buf) == -1)
|
||||
err = atf_libc_error(errno, "Cannot set environment variable "
|
||||
"'%s' to '%s'", name, val);
|
||||
free(buf);
|
||||
}
|
||||
#else
|
||||
# error "Don't know how to set an environment variable."
|
||||
#endif
|
||||
|
||||
return err;
|
||||
}
|
||||
@@ -91,24 +73,7 @@ atf_env_set(const char *name, const char *val)
|
||||
atf_error_t
|
||||
atf_env_unset(const char *name)
|
||||
{
|
||||
atf_error_t err;
|
||||
|
||||
#if defined(HAVE_UNSETENV)
|
||||
unsetenv(name);
|
||||
err = atf_no_error();
|
||||
#elif defined(HAVE_PUTENV)
|
||||
char *buf;
|
||||
|
||||
err = atf_text_format(&buf, "%s=", name);
|
||||
if (!atf_is_error(err)) {
|
||||
if (putenv(buf) == -1)
|
||||
err = atf_libc_error(errno, "Cannot unset environment variable"
|
||||
" '%s'", name);
|
||||
free(buf);
|
||||
}
|
||||
#else
|
||||
# error "Don't know how to unset an environment variable."
|
||||
#endif
|
||||
|
||||
return err;
|
||||
return (atf_no_error());
|
||||
}
|
||||
+12
-22
@@ -31,7 +31,6 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
@@ -175,16 +174,12 @@ atf_error_t
|
||||
copy_contents(const atf_fs_path_t *p, char **buf)
|
||||
{
|
||||
atf_error_t err;
|
||||
char *str;
|
||||
|
||||
str = (char *)malloc(atf_dynstr_length(&p->m_data) + 1);
|
||||
if (str == NULL)
|
||||
*buf = strdup(atf_fs_path_cstring(p));
|
||||
if (*buf == NULL)
|
||||
err = atf_no_memory_error();
|
||||
else {
|
||||
strcpy(str, atf_dynstr_cstring(&p->m_data));
|
||||
*buf = str;
|
||||
else
|
||||
err = atf_no_error();
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
@@ -286,6 +281,7 @@ normalize_ap(atf_dynstr_t *d, const char *p, va_list ap)
|
||||
else {
|
||||
err = normalize(d, str);
|
||||
free(str);
|
||||
str = NULL;
|
||||
}
|
||||
|
||||
out:
|
||||
@@ -795,10 +791,8 @@ atf_fs_mkdtemp(atf_fs_path_t *p)
|
||||
atf_error_t err;
|
||||
char *buf;
|
||||
|
||||
if (!check_umask(S_IRWXU, S_IRWXU)) {
|
||||
err = invalid_umask_error(p, atf_fs_stat_dir_type, current_umask());
|
||||
goto out;
|
||||
}
|
||||
if (!check_umask(S_IRWXU, S_IRWXU))
|
||||
return invalid_umask_error(p, atf_fs_stat_dir_type, current_umask());
|
||||
|
||||
err = copy_contents(p, &buf);
|
||||
if (atf_is_error(err))
|
||||
@@ -806,14 +800,13 @@ atf_fs_mkdtemp(atf_fs_path_t *p)
|
||||
|
||||
err = do_mkdtemp(buf);
|
||||
if (atf_is_error(err))
|
||||
goto out_buf;
|
||||
goto out;
|
||||
|
||||
replace_contents(p, buf);
|
||||
|
||||
INV(!atf_is_error(err));
|
||||
out_buf:
|
||||
free(buf);
|
||||
out:
|
||||
free(buf);
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -824,10 +817,8 @@ atf_fs_mkstemp(atf_fs_path_t *p, int *fdout)
|
||||
char *buf;
|
||||
int fd;
|
||||
|
||||
if (!check_umask(S_IRWXU, S_IRWXU)) {
|
||||
err = invalid_umask_error(p, atf_fs_stat_reg_type, current_umask());
|
||||
goto out;
|
||||
}
|
||||
if (!check_umask(S_IRWXU, S_IRWXU))
|
||||
return invalid_umask_error(p, atf_fs_stat_reg_type, current_umask());
|
||||
|
||||
err = copy_contents(p, &buf);
|
||||
if (atf_is_error(err))
|
||||
@@ -835,15 +826,14 @@ atf_fs_mkstemp(atf_fs_path_t *p, int *fdout)
|
||||
|
||||
err = do_mkstemp(buf, &fd);
|
||||
if (atf_is_error(err))
|
||||
goto out_buf;
|
||||
goto out;
|
||||
|
||||
replace_contents(p, buf);
|
||||
*fdout = fd;
|
||||
|
||||
INV(!atf_is_error(err));
|
||||
out_buf:
|
||||
free(buf);
|
||||
out:
|
||||
free(buf);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
+4
-1
@@ -84,8 +84,10 @@ static
|
||||
void
|
||||
delete_entry(struct list_entry *le)
|
||||
{
|
||||
if (le->m_managed)
|
||||
if (le->m_managed) {
|
||||
free(le->m_object);
|
||||
le->m_object = NULL;
|
||||
}
|
||||
|
||||
free(le);
|
||||
}
|
||||
@@ -204,6 +206,7 @@ atf_list_init(atf_list_t *l)
|
||||
leend = new_entry(NULL, false);
|
||||
if (leend == NULL) {
|
||||
free(lebeg);
|
||||
lebeg = NULL;
|
||||
return atf_no_memory_error();
|
||||
}
|
||||
|
||||
|
||||
+17
-5
@@ -188,7 +188,12 @@ atf_map_init_charpp(atf_map_t *m, const char *const *array)
|
||||
}
|
||||
ptr++;
|
||||
|
||||
err = atf_map_insert(m, key, strdup(value), true);
|
||||
char *tmp_value = strdup(value);
|
||||
if (tmp_value == NULL) {
|
||||
err = atf_no_memory_error();
|
||||
break;
|
||||
}
|
||||
err = atf_map_insert(m, key, tmp_value, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -206,9 +211,12 @@ atf_map_fini(atf_map_t *m)
|
||||
atf_list_for_each(iter, &m->m_list) {
|
||||
struct map_entry *me = atf_list_iter_data(iter);
|
||||
|
||||
if (me->m_managed)
|
||||
if (me->m_managed) {
|
||||
free(me->m_value);
|
||||
me->m_value = NULL;
|
||||
}
|
||||
free(me->m_key);
|
||||
me->m_key = NULL;
|
||||
free(me);
|
||||
}
|
||||
atf_list_fini(&m->m_list);
|
||||
@@ -353,9 +361,11 @@ atf_map_insert(atf_map_t *m, const char *key, void *value, bool managed)
|
||||
iter = atf_map_find(m, key);
|
||||
if (atf_equal_map_iter_map_iter(iter, atf_map_end(m))) {
|
||||
me = new_entry(key, value, managed);
|
||||
if (me == NULL)
|
||||
if (me == NULL) {
|
||||
err = atf_no_memory_error();
|
||||
else {
|
||||
if (managed)
|
||||
free(value);
|
||||
} else {
|
||||
err = atf_list_append(&m->m_list, me, false);
|
||||
if (atf_is_error(err)) {
|
||||
if (managed)
|
||||
@@ -365,8 +375,10 @@ atf_map_insert(atf_map_t *m, const char *key, void *value, bool managed)
|
||||
}
|
||||
} else {
|
||||
me = iter.m_entry;
|
||||
if (me->m_managed)
|
||||
if (me->m_managed) {
|
||||
free(me->m_value);
|
||||
me->m_value = NULL;
|
||||
}
|
||||
|
||||
INV(strcmp(me->m_key, key) == 0);
|
||||
me->m_value = value;
|
||||
|
||||
@@ -108,6 +108,7 @@ ATF_TC_BODY(map_init_charpp_short, tc)
|
||||
atf_error_t err = atf_map_init_charpp(&map, array);
|
||||
ATF_REQUIRE(atf_is_error(err));
|
||||
ATF_REQUIRE(atf_error_is(err, "libc"));
|
||||
atf_error_free(err);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+23
-35
@@ -23,6 +23,8 @@
|
||||
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "atf-c/detail/process.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
@@ -42,7 +44,7 @@
|
||||
|
||||
/* This prototype is not in the header file because this is a private
|
||||
* function; however, we need to access it during testing. */
|
||||
atf_error_t atf_process_status_init(atf_process_status_t *, int);
|
||||
atf_error_t atf_process_status_init(atf_process_status_t *, siginfo_t *);
|
||||
|
||||
/* ---------------------------------------------------------------------
|
||||
* The "stream_prepare" auxiliary type.
|
||||
@@ -65,6 +67,8 @@ stream_prepare_init(stream_prepare_t *sp, const atf_process_stream_t *sb)
|
||||
const int type = atf_process_stream_type(sb);
|
||||
|
||||
sp->m_sb = sb;
|
||||
sp->m_pipefds[0] = -1;
|
||||
sp->m_pipefds[1] = -1;
|
||||
sp->m_pipefds_ok = false;
|
||||
|
||||
if (type == atf_process_stream_type_capture) {
|
||||
@@ -186,10 +190,10 @@ atf_process_stream_type(const atf_process_stream_t *sb)
|
||||
* --------------------------------------------------------------------- */
|
||||
|
||||
atf_error_t
|
||||
atf_process_status_init(atf_process_status_t *s, int status)
|
||||
atf_process_status_init(atf_process_status_t *s, siginfo_t *info)
|
||||
{
|
||||
s->m_status = status;
|
||||
|
||||
s->m_info = *info;
|
||||
return atf_no_error();
|
||||
}
|
||||
|
||||
@@ -201,43 +205,35 @@ atf_process_status_fini(atf_process_status_t *s ATF_DEFS_ATTRIBUTE_UNUSED)
|
||||
bool
|
||||
atf_process_status_exited(const atf_process_status_t *s)
|
||||
{
|
||||
int mutable_status = s->m_status;
|
||||
return WIFEXITED(mutable_status);
|
||||
return s->m_info.si_code == CLD_EXITED;
|
||||
}
|
||||
|
||||
int
|
||||
atf_process_status_exitstatus(const atf_process_status_t *s)
|
||||
{
|
||||
PRE(atf_process_status_exited(s));
|
||||
int mutable_status = s->m_status;
|
||||
return WEXITSTATUS(mutable_status);
|
||||
return s->m_info.si_status;
|
||||
}
|
||||
|
||||
bool
|
||||
atf_process_status_signaled(const atf_process_status_t *s)
|
||||
{
|
||||
int mutable_status = s->m_status;
|
||||
return WIFSIGNALED(mutable_status);
|
||||
int si_code = s->m_info.si_code;
|
||||
return si_code == CLD_KILLED || si_code == CLD_DUMPED;
|
||||
}
|
||||
|
||||
int
|
||||
atf_process_status_termsig(const atf_process_status_t *s)
|
||||
{
|
||||
PRE(atf_process_status_signaled(s));
|
||||
int mutable_status = s->m_status;
|
||||
return WTERMSIG(mutable_status);
|
||||
return s->m_info.si_status;
|
||||
}
|
||||
|
||||
bool
|
||||
atf_process_status_coredump(const atf_process_status_t *s)
|
||||
{
|
||||
PRE(atf_process_status_signaled(s));
|
||||
#if defined(WCOREDUMP)
|
||||
int mutable_status = s->m_status;
|
||||
return WCOREDUMP(mutable_status);
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
return s->m_info.si_code == CLD_DUMPED;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------
|
||||
@@ -245,14 +241,12 @@ atf_process_status_coredump(const atf_process_status_t *s)
|
||||
* --------------------------------------------------------------------- */
|
||||
|
||||
static
|
||||
atf_error_t
|
||||
void
|
||||
atf_process_child_init(atf_process_child_t *c)
|
||||
{
|
||||
c->m_pid = 0;
|
||||
c->m_stdout = -1;
|
||||
c->m_stderr = -1;
|
||||
|
||||
return atf_no_error();
|
||||
}
|
||||
|
||||
static
|
||||
@@ -269,14 +263,14 @@ atf_error_t
|
||||
atf_process_child_wait(atf_process_child_t *c, atf_process_status_t *s)
|
||||
{
|
||||
atf_error_t err;
|
||||
int status;
|
||||
siginfo_t info;
|
||||
|
||||
if (waitpid(c->m_pid, &status, 0) == -1)
|
||||
if (waitid(P_PID, c->m_pid, &info, WEXITED) == -1)
|
||||
err = atf_libc_error(errno, "Failed waiting for process %d",
|
||||
c->m_pid);
|
||||
else {
|
||||
atf_process_child_fini(c);
|
||||
err = atf_process_status_init(s, status);
|
||||
err = atf_process_status_init(s, &info);
|
||||
}
|
||||
|
||||
return err;
|
||||
@@ -347,7 +341,7 @@ child_connect(const stream_prepare_t *sp, int procfd)
|
||||
err = safe_dup(sp->m_sb->m_fd, procfd);
|
||||
} else if (type == atf_process_stream_type_redirect_path) {
|
||||
int aux = open(atf_fs_path_cstring(sp->m_sb->m_path),
|
||||
O_WRONLY | O_CREAT | O_TRUNC, 0644);
|
||||
O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC, 0644);
|
||||
if (aux == -1)
|
||||
err = atf_libc_error(errno, "Could not create %s",
|
||||
atf_fs_path_cstring(sp->m_sb->m_path));
|
||||
@@ -387,25 +381,17 @@ parent_connect(const stream_prepare_t *sp, int *fd)
|
||||
}
|
||||
|
||||
static
|
||||
atf_error_t
|
||||
void
|
||||
do_parent(atf_process_child_t *c,
|
||||
const pid_t pid,
|
||||
const stream_prepare_t *outsp,
|
||||
const stream_prepare_t *errsp)
|
||||
{
|
||||
atf_error_t err;
|
||||
|
||||
err = atf_process_child_init(c);
|
||||
if (atf_is_error(err))
|
||||
goto out;
|
||||
|
||||
c->m_pid = pid;
|
||||
|
||||
parent_connect(outsp, &c->m_stdout);
|
||||
parent_connect(errsp, &c->m_stderr);
|
||||
|
||||
out:
|
||||
return err;
|
||||
}
|
||||
|
||||
static
|
||||
@@ -481,7 +467,7 @@ fork_with_streams(atf_process_child_t *c,
|
||||
abort();
|
||||
err = atf_no_error();
|
||||
} else {
|
||||
err = do_parent(c, pid, &outsp, &errsp);
|
||||
do_parent(c, pid, &outsp, &errsp);
|
||||
if (atf_is_error(err))
|
||||
goto err_errpipe;
|
||||
}
|
||||
@@ -528,6 +514,8 @@ atf_process_fork(atf_process_child_t *c,
|
||||
atf_process_stream_t inherit_outsb, inherit_errsb;
|
||||
const atf_process_stream_t *real_outsb, *real_errsb;
|
||||
|
||||
atf_process_child_init(c);
|
||||
|
||||
real_outsb = NULL; /* Shut up GCC warning. */
|
||||
err = init_stream_w_default(outsb, &inherit_outsb, &real_outsb);
|
||||
if (atf_is_error(err))
|
||||
@@ -665,7 +653,7 @@ atf_process_exec_list(atf_process_status_t *s,
|
||||
|
||||
err = atf_process_exec_array(s, prog, argv2, outsb, errsb, prehook);
|
||||
|
||||
free(argv2);
|
||||
out:
|
||||
free(argv2);
|
||||
return err;
|
||||
}
|
||||
@@ -28,6 +28,7 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <signal.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include <atf-c/detail/fs.h>
|
||||
@@ -76,7 +77,7 @@ int atf_process_stream_type(const atf_process_stream_t *);
|
||||
* --------------------------------------------------------------------- */
|
||||
|
||||
struct atf_process_status {
|
||||
int m_status;
|
||||
siginfo_t m_info;
|
||||
};
|
||||
typedef struct atf_process_status atf_process_status_t;
|
||||
|
||||
|
||||
+32
-18
@@ -44,7 +44,7 @@
|
||||
#include "atf-c/detail/sanity.h"
|
||||
#include "atf-c/detail/test_helpers.h"
|
||||
|
||||
atf_error_t atf_process_status_init(atf_process_status_t *, int);
|
||||
atf_error_t atf_process_status_init(atf_process_status_t *, siginfo_t *);
|
||||
|
||||
/* ---------------------------------------------------------------------
|
||||
* Auxiliary functions for testing of 'atf_process_fork'.
|
||||
@@ -163,6 +163,7 @@ capture_stream_fini(void *v)
|
||||
}
|
||||
|
||||
free(s->m_msg);
|
||||
s->m_msg = NULL;
|
||||
atf_process_stream_fini(&s->m_base.m_sb);
|
||||
}
|
||||
|
||||
@@ -573,23 +574,19 @@ child_sigterm(void)
|
||||
}
|
||||
|
||||
static
|
||||
int
|
||||
fork_and_wait_child(void (*child_func)(void))
|
||||
void
|
||||
fork_and_wait_child(void (*child_func)(void), siginfo_t *info)
|
||||
{
|
||||
pid_t pid;
|
||||
int status;
|
||||
|
||||
pid = fork();
|
||||
ATF_REQUIRE(pid != -1);
|
||||
if (pid == 0) {
|
||||
status = 0; /* Silence compiler warnings */
|
||||
child_func();
|
||||
UNREACHABLE;
|
||||
} else {
|
||||
ATF_REQUIRE(waitpid(pid, &status, 0) != 0);
|
||||
ATF_REQUIRE(waitid(P_PID, pid, info, WEXITED) != -1);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
ATF_TC(status_exited);
|
||||
@@ -600,10 +597,12 @@ ATF_TC_HEAD(status_exited, tc)
|
||||
}
|
||||
ATF_TC_BODY(status_exited, tc)
|
||||
{
|
||||
siginfo_t info;
|
||||
|
||||
{
|
||||
const int rawstatus = fork_and_wait_child(child_exit_success);
|
||||
fork_and_wait_child(child_exit_success, &info);
|
||||
atf_process_status_t s;
|
||||
RE(atf_process_status_init(&s, rawstatus));
|
||||
RE(atf_process_status_init(&s, &info));
|
||||
ATF_CHECK(atf_process_status_exited(&s));
|
||||
ATF_CHECK_EQ(atf_process_status_exitstatus(&s), EXIT_SUCCESS);
|
||||
ATF_CHECK(!atf_process_status_signaled(&s));
|
||||
@@ -611,9 +610,9 @@ ATF_TC_BODY(status_exited, tc)
|
||||
}
|
||||
|
||||
{
|
||||
const int rawstatus = fork_and_wait_child(child_exit_failure);
|
||||
fork_and_wait_child(child_exit_failure, &info);
|
||||
atf_process_status_t s;
|
||||
RE(atf_process_status_init(&s, rawstatus));
|
||||
RE(atf_process_status_init(&s, &info));
|
||||
ATF_CHECK(atf_process_status_exited(&s));
|
||||
ATF_CHECK_EQ(atf_process_status_exitstatus(&s), EXIT_FAILURE);
|
||||
ATF_CHECK(!atf_process_status_signaled(&s));
|
||||
@@ -629,10 +628,12 @@ ATF_TC_HEAD(status_signaled, tc)
|
||||
}
|
||||
ATF_TC_BODY(status_signaled, tc)
|
||||
{
|
||||
siginfo_t info;
|
||||
|
||||
{
|
||||
const int rawstatus = fork_and_wait_child(child_sigkill);
|
||||
fork_and_wait_child(child_sigkill, &info);
|
||||
atf_process_status_t s;
|
||||
RE(atf_process_status_init(&s, rawstatus));
|
||||
RE(atf_process_status_init(&s, &info));
|
||||
ATF_CHECK(!atf_process_status_exited(&s));
|
||||
ATF_CHECK(atf_process_status_signaled(&s));
|
||||
ATF_CHECK_EQ(atf_process_status_termsig(&s), SIGKILL);
|
||||
@@ -641,9 +642,9 @@ ATF_TC_BODY(status_signaled, tc)
|
||||
}
|
||||
|
||||
{
|
||||
const int rawstatus = fork_and_wait_child(child_sigterm);
|
||||
fork_and_wait_child(child_sigterm, &info);
|
||||
atf_process_status_t s;
|
||||
RE(atf_process_status_init(&s, rawstatus));
|
||||
RE(atf_process_status_init(&s, &info));
|
||||
ATF_CHECK(!atf_process_status_exited(&s));
|
||||
ATF_CHECK(atf_process_status_signaled(&s));
|
||||
ATF_CHECK_EQ(atf_process_status_termsig(&s), SIGTERM);
|
||||
@@ -667,9 +668,22 @@ ATF_TC_BODY(status_coredump, tc)
|
||||
atf_tc_skip("Cannot unlimit the core file size; check limits "
|
||||
"manually");
|
||||
|
||||
const int rawstatus = fork_and_wait_child(child_sigquit);
|
||||
#if defined(__APPLE__)
|
||||
/*
|
||||
* The default security policy on macOS prevents this check from being
|
||||
* tested (coredumps aren't generated for unsigned binaries).
|
||||
*
|
||||
* TODO(ngie,144): this test fails when run locally on my machines, but not
|
||||
* in the GHA container images.
|
||||
*/
|
||||
atf_tc_skip(
|
||||
"atf_process_status_coredump check fails on macOS");
|
||||
#endif
|
||||
|
||||
siginfo_t info;
|
||||
fork_and_wait_child(child_sigquit, &info);
|
||||
atf_process_status_t s;
|
||||
RE(atf_process_status_init(&s, rawstatus));
|
||||
RE(atf_process_status_init(&s, &info));
|
||||
ATF_CHECK(!atf_process_status_exited(&s));
|
||||
ATF_CHECK(atf_process_status_signaled(&s));
|
||||
ATF_CHECK_EQ(atf_process_status_termsig(&s), SIGQUIT);
|
||||
|
||||
@@ -85,6 +85,8 @@ do_test_child(void *v)
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
#define MAX_LINES 3
|
||||
|
||||
static
|
||||
void
|
||||
do_test(enum type t, bool cond)
|
||||
@@ -92,7 +94,7 @@ do_test(enum type t, bool cond)
|
||||
atf_process_child_t child;
|
||||
atf_process_status_t status;
|
||||
int nlines;
|
||||
char *lines[3];
|
||||
char *lines[MAX_LINES] = { 0 };
|
||||
|
||||
{
|
||||
atf_process_stream_t outsb, errsb;
|
||||
@@ -106,16 +108,17 @@ do_test(enum type t, bool cond)
|
||||
}
|
||||
|
||||
nlines = 0;
|
||||
while (nlines < 3 && (lines[nlines] =
|
||||
while (nlines < MAX_LINES && (lines[nlines] =
|
||||
atf_utils_readline(atf_process_child_stderr(&child))) != NULL)
|
||||
nlines++;
|
||||
ATF_REQUIRE(nlines == 0 || nlines == 3);
|
||||
|
||||
RE(atf_process_child_wait(&child, &status));
|
||||
if (!cond) {
|
||||
ATF_REQUIRE(nlines == MAX_LINES);
|
||||
ATF_REQUIRE(atf_process_status_signaled(&status));
|
||||
ATF_REQUIRE(atf_process_status_termsig(&status) == SIGABRT);
|
||||
} else {
|
||||
ATF_REQUIRE(nlines == 0);
|
||||
ATF_REQUIRE(atf_process_status_exited(&status));
|
||||
ATF_REQUIRE(atf_process_status_exitstatus(&status) == EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
@@ -56,6 +56,7 @@ atf_text_for_each_word(const char *instr, const char *sep,
|
||||
}
|
||||
|
||||
free(str);
|
||||
str = NULL;
|
||||
out:
|
||||
return err;
|
||||
}
|
||||
|
||||
+26
-33
@@ -198,8 +198,8 @@ params_fini(struct params *p)
|
||||
atf_map_fini(&p->m_config);
|
||||
atf_fs_path_fini(&p->m_resfile);
|
||||
atf_fs_path_fini(&p->m_srcdir);
|
||||
if (p->m_tcname != NULL)
|
||||
free(p->m_tcname);
|
||||
free(p->m_tcname);
|
||||
p->m_tcname = NULL;
|
||||
}
|
||||
|
||||
static
|
||||
@@ -248,7 +248,7 @@ static
|
||||
void
|
||||
list_tcs(const atf_tp_t *tp)
|
||||
{
|
||||
const atf_tc_t *const *tcs;
|
||||
const atf_tc_t **tcs;
|
||||
const atf_tc_t *const *tcsptr;
|
||||
|
||||
printf("Content-Type: application/X-atf-tp; version=\"1\"\n\n");
|
||||
@@ -280,6 +280,8 @@ list_tcs(const atf_tp_t *tp)
|
||||
|
||||
atf_utils_free_charpp(vars);
|
||||
}
|
||||
free(tcs);
|
||||
tcs = NULL;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------
|
||||
@@ -288,19 +290,20 @@ list_tcs(const atf_tp_t *tp)
|
||||
|
||||
static
|
||||
atf_error_t
|
||||
handle_tcarg(const char *tcarg, char **tcname, enum tc_part *tcpart)
|
||||
handle_tcarg(const char *tcarg, char **tcname_out, enum tc_part *tcpart)
|
||||
{
|
||||
char *delim, *tcname;
|
||||
atf_error_t err;
|
||||
|
||||
*tcname_out = NULL;
|
||||
tcname = strdup(tcarg);
|
||||
if (tcname == NULL) {
|
||||
return atf_no_memory_error();
|
||||
}
|
||||
|
||||
err = atf_no_error();
|
||||
|
||||
*tcname = strdup(tcarg);
|
||||
if (*tcname == NULL) {
|
||||
err = atf_no_memory_error();
|
||||
goto out;
|
||||
}
|
||||
|
||||
char *delim = strchr(*tcname, ':');
|
||||
delim = strchr(tcname, ':');
|
||||
if (delim != NULL) {
|
||||
*delim = '\0';
|
||||
|
||||
@@ -311,11 +314,12 @@ handle_tcarg(const char *tcarg, char **tcname, enum tc_part *tcpart)
|
||||
*tcpart = CLEANUP;
|
||||
} else {
|
||||
err = usage_error("Invalid test case part `%s'", delim);
|
||||
goto out;
|
||||
free(tcname);
|
||||
}
|
||||
}
|
||||
|
||||
out:
|
||||
if (!atf_is_error(err))
|
||||
*tcname_out = tcname;
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -327,9 +331,7 @@ process_params(int argc, char **argv, struct params *p)
|
||||
int ch;
|
||||
int old_opterr;
|
||||
|
||||
err = params_init(p, argv[0]);
|
||||
if (atf_is_error(err))
|
||||
goto out;
|
||||
err = atf_no_error();
|
||||
|
||||
old_opterr = opterr;
|
||||
opterr = 0;
|
||||
@@ -387,10 +389,6 @@ process_params(int argc, char **argv, struct params *p)
|
||||
}
|
||||
}
|
||||
|
||||
if (atf_is_error(err))
|
||||
params_fini(p);
|
||||
|
||||
out:
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -484,12 +482,10 @@ run_tc(const atf_tp_t *tp, struct params *p, int *exitcode)
|
||||
{
|
||||
atf_error_t err;
|
||||
|
||||
err = atf_no_error();
|
||||
if (!atf_tp_has_tc(tp, p->m_tcname))
|
||||
return usage_error("Unknown test case `%s'", p->m_tcname);
|
||||
|
||||
if (!atf_tp_has_tc(tp, p->m_tcname)) {
|
||||
err = usage_error("Unknown test case `%s'", p->m_tcname);
|
||||
goto out;
|
||||
}
|
||||
err = atf_no_error();
|
||||
|
||||
if (!atf_env_has("__RUNNING_INSIDE_ATF_RUN") || strcmp(atf_env_get(
|
||||
"__RUNNING_INSIDE_ATF_RUN"), "internal-yes-value") != 0)
|
||||
@@ -529,7 +525,6 @@ run_tc(const atf_tp_t *tp, struct params *p, int *exitcode)
|
||||
}
|
||||
|
||||
INV(!atf_is_error(err));
|
||||
out:
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -544,10 +539,14 @@ controlled_main(int argc, char **argv,
|
||||
atf_tp_t tp;
|
||||
char **raw_config;
|
||||
|
||||
err = process_params(argc, argv, &p);
|
||||
err = params_init(&p, argv[0]);
|
||||
if (atf_is_error(err))
|
||||
goto out;
|
||||
|
||||
err = process_params(argc, argv, &p);
|
||||
if (atf_is_error(err))
|
||||
goto out_p;
|
||||
|
||||
err = handle_srcdir(&p);
|
||||
if (atf_is_error(err))
|
||||
goto out_p;
|
||||
@@ -594,12 +593,6 @@ atf_tp_main(int argc, char **argv, atf_error_t (*add_tcs_hook)(atf_tp_t *))
|
||||
else
|
||||
progname++;
|
||||
|
||||
/* Libtool workaround: if running from within the source tree (binaries
|
||||
* that are not installed yet), skip the "lt-" prefix added to files in
|
||||
* the ".libs" directory to show the real (not temporary) name. */
|
||||
if (strncmp(progname, "lt-", 3) == 0)
|
||||
progname += 3;
|
||||
|
||||
exitcode = EXIT_FAILURE; /* Silence GCC warning. */
|
||||
err = controlled_main(argc, argv, add_tcs_hook, &exitcode);
|
||||
if (atf_is_error(err)) {
|
||||
|
||||
+6
-4
@@ -32,7 +32,7 @@
|
||||
|
||||
#include "atf-c/detail/sanity.h"
|
||||
|
||||
/* Theoretically, there can only be a single error intance at any given
|
||||
/* Theoretically, there can only be a single error instance at any given
|
||||
* point in time, because errors are raised at one point and must be
|
||||
* handled immediately. If another error has to be raised during the
|
||||
* handling process, something else has to be done with the previous
|
||||
@@ -124,11 +124,13 @@ atf_error_free(atf_error_t err)
|
||||
|
||||
freeit = err->m_free;
|
||||
|
||||
if (err->m_data != NULL)
|
||||
free(err->m_data);
|
||||
free(err->m_data);
|
||||
err->m_data = NULL;
|
||||
|
||||
if (freeit)
|
||||
if (freeit) {
|
||||
free(err);
|
||||
err = NULL;
|
||||
}
|
||||
|
||||
error_on_flight = false;
|
||||
}
|
||||
|
||||
+4
-4
@@ -129,26 +129,26 @@
|
||||
|
||||
#define ATF_REQUIRE_MSG(expression, fmt, ...) \
|
||||
do { \
|
||||
if (!(expression)) \
|
||||
if (expression) {} else \
|
||||
atf_tc_fail_requirement(__FILE__, __LINE__, fmt, ##__VA_ARGS__); \
|
||||
} while(0)
|
||||
|
||||
#define ATF_CHECK_MSG(expression, fmt, ...) \
|
||||
do { \
|
||||
if (!(expression)) \
|
||||
if (expression) {} else \
|
||||
atf_tc_fail_check(__FILE__, __LINE__, fmt, ##__VA_ARGS__); \
|
||||
} while(0)
|
||||
|
||||
#define ATF_REQUIRE(expression) \
|
||||
do { \
|
||||
if (!(expression)) \
|
||||
if (expression) {} else \
|
||||
atf_tc_fail_requirement(__FILE__, __LINE__, "%s", \
|
||||
#expression " not met"); \
|
||||
} while(0)
|
||||
|
||||
#define ATF_CHECK(expression) \
|
||||
do { \
|
||||
if (!(expression)) \
|
||||
if (expression) {} else \
|
||||
atf_tc_fail_check(__FILE__, __LINE__, "%s", \
|
||||
#expression " not met"); \
|
||||
} while(0)
|
||||
|
||||
+6
-2
@@ -137,7 +137,7 @@ context_set_resfile(struct context *ctx, const char *resfile)
|
||||
else if (strcmp(resfile, "/dev/stderr") == 0)
|
||||
ctx->resfilefd = STDERR_FILENO;
|
||||
else
|
||||
ctx->resfilefd = open(resfile, O_WRONLY | O_CREAT | O_TRUNC,
|
||||
ctx->resfilefd = open(resfile, O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC,
|
||||
S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
|
||||
if (ctx->resfilefd == -1) {
|
||||
err = atf_libc_error(errno,
|
||||
@@ -648,8 +648,10 @@ atf_tc_init_pack(atf_tc_t *tc, const atf_tc_pack_t *pack,
|
||||
void
|
||||
atf_tc_fini(atf_tc_t *tc)
|
||||
{
|
||||
atf_map_fini(&tc->pimpl->m_config);
|
||||
atf_map_fini(&tc->pimpl->m_vars);
|
||||
free(tc->pimpl);
|
||||
tc->pimpl = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -811,8 +813,10 @@ atf_tc_set_md_var(atf_tc_t *tc, const char *name, const char *fmt, ...)
|
||||
|
||||
if (!atf_is_error(err))
|
||||
err = atf_map_insert(&tc->pimpl->m_vars, name, value, true);
|
||||
else
|
||||
else {
|
||||
free(value);
|
||||
value = NULL;
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
+2
-1
@@ -112,6 +112,7 @@ atf_tp_fini(atf_tp_t *tp)
|
||||
atf_list_fini(&tp->pimpl->m_tcs);
|
||||
|
||||
free(tp->pimpl);
|
||||
tp->pimpl = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -139,7 +140,7 @@ atf_tp_get_tc(const atf_tp_t *tp, const char *id)
|
||||
return tc;
|
||||
}
|
||||
|
||||
const atf_tc_t *const *
|
||||
const atf_tc_t **
|
||||
atf_tp_get_tcs(const atf_tp_t *tp)
|
||||
{
|
||||
const atf_tc_t **array;
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@ void atf_tp_fini(atf_tp_t *);
|
||||
char **atf_tp_get_config(const atf_tp_t *);
|
||||
bool atf_tp_has_tc(const atf_tp_t *, const char *);
|
||||
const struct atf_tc *atf_tp_get_tc(const atf_tp_t *, const char *);
|
||||
const struct atf_tc *const *atf_tp_get_tcs(const atf_tp_t *);
|
||||
const struct atf_tc **atf_tp_get_tcs(const atf_tp_t *);
|
||||
|
||||
/* Modifiers. */
|
||||
atf_error_t atf_tp_add_tc(atf_tp_t *, struct atf_tc *);
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
|
||||
|
||||
#include "config.h"
|
||||
#include "atf-c/tp.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
+42
-30
@@ -32,6 +32,7 @@
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <regex.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -59,16 +60,19 @@ init_out_filename(atf_dynstr_t *name, const pid_t pid, const char *suffix,
|
||||
{
|
||||
atf_error_t error;
|
||||
|
||||
error = atf_dynstr_init_fmt(name, "atf_utils_fork_%d_%s.txt",
|
||||
(int)pid, suffix);
|
||||
if (atf_is_error(error)) {
|
||||
char buffer[1024];
|
||||
atf_error_format(error, buffer, sizeof(buffer));
|
||||
if (in_parent) {
|
||||
atf_tc_fail("Failed to create output file: %s", buffer);
|
||||
} else {
|
||||
err(EXIT_FAILURE, "Failed to create output file: %s", buffer);
|
||||
}
|
||||
error = atf_dynstr_init_fmt(name, "atf_utils_fork_%d_%s.txt", pid, suffix);
|
||||
if (!atf_is_error(error))
|
||||
return;
|
||||
|
||||
char buffer[1024];
|
||||
|
||||
atf_error_format(error, buffer, sizeof(buffer));
|
||||
atf_error_free(error);
|
||||
|
||||
if (in_parent) {
|
||||
atf_tc_fail("Failed to create output file: %s", buffer);
|
||||
} else {
|
||||
err(EXIT_FAILURE, "Failed to create output file: %s", buffer);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,8 +108,8 @@ grep_string(const char *regex, const char *str)
|
||||
void
|
||||
atf_utils_cat_file(const char *name, const char *prefix)
|
||||
{
|
||||
const int fd = open(name, O_RDONLY);
|
||||
ATF_REQUIRE_MSG(fd != -1, "Cannot open %s", name);
|
||||
const int fd = open(name, O_RDONLY | O_CLOEXEC);
|
||||
ATF_REQUIRE_MSG(fd != -1, "Cannot open %s: %s", name, strerror(errno));
|
||||
|
||||
char buffer[1024];
|
||||
ssize_t count;
|
||||
@@ -145,7 +149,7 @@ atf_utils_cat_file(const char *name, const char *prefix)
|
||||
bool
|
||||
atf_utils_compare_file(const char *name, const char *contents)
|
||||
{
|
||||
const int fd = open(name, O_RDONLY);
|
||||
const int fd = open(name, O_RDONLY | O_CLOEXEC);
|
||||
ATF_REQUIRE_MSG(fd != -1, "Cannot open %s", name);
|
||||
|
||||
const char *pos = contents;
|
||||
@@ -173,11 +177,12 @@ atf_utils_compare_file(const char *name, const char *contents)
|
||||
void
|
||||
atf_utils_copy_file(const char *source, const char *destination)
|
||||
{
|
||||
const int input = open(source, O_RDONLY);
|
||||
const int input = open(source, O_RDONLY | O_CLOEXEC);
|
||||
ATF_REQUIRE_MSG(input != -1, "Failed to open source file during "
|
||||
"copy (%s)", source);
|
||||
|
||||
const int output = open(destination, O_WRONLY | O_CREAT | O_TRUNC, 0777);
|
||||
const int output = open(destination,
|
||||
O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC, 0777);
|
||||
ATF_REQUIRE_MSG(output != -1, "Failed to open destination file during "
|
||||
"copy (%s)", destination);
|
||||
|
||||
@@ -216,7 +221,7 @@ atf_utils_create_file(const char *name, const char *contents, ...)
|
||||
va_end(ap);
|
||||
ATF_REQUIRE(!atf_is_error(error));
|
||||
|
||||
const int fd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0644);
|
||||
const int fd = open(name, O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC, 0644);
|
||||
ATF_REQUIRE_MSG(fd != -1, "Cannot create file %s", name);
|
||||
ATF_REQUIRE(write(fd, atf_dynstr_cstring(&formatted),
|
||||
atf_dynstr_length(&formatted)) != -1);
|
||||
@@ -234,14 +239,12 @@ bool
|
||||
atf_utils_file_exists(const char *path)
|
||||
{
|
||||
const int ret = access(path, F_OK);
|
||||
if (ret == -1) {
|
||||
if (errno != ENOENT)
|
||||
atf_tc_fail("Failed to check the existence of %s: %s", path,
|
||||
strerror(errno));
|
||||
else
|
||||
return false;
|
||||
} else
|
||||
if (ret != -1)
|
||||
return true;
|
||||
if (errno != ENOENT)
|
||||
atf_tc_fail("Failed to check the existence of %s: %s", path,
|
||||
strerror(errno));
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Spawns a subprocess and redirects its output to files.
|
||||
@@ -290,10 +293,13 @@ atf_utils_free_charpp(char **argv)
|
||||
{
|
||||
char **ptr;
|
||||
|
||||
for (ptr = argv; *ptr != NULL; ptr++)
|
||||
for (ptr = argv; *ptr != NULL; ptr++) {
|
||||
free(*ptr);
|
||||
*ptr = NULL;
|
||||
}
|
||||
|
||||
free(argv);
|
||||
argv = NULL;
|
||||
}
|
||||
|
||||
/** Searches for a regexp in a file.
|
||||
@@ -316,7 +322,8 @@ atf_utils_grep_file(const char *regex, const char *file, ...)
|
||||
va_end(ap);
|
||||
ATF_REQUIRE(!atf_is_error(error));
|
||||
|
||||
ATF_REQUIRE((fd = open(file, O_RDONLY)) != -1);
|
||||
fd = open(file, O_RDONLY | O_CLOEXEC);
|
||||
ATF_REQUIRE_MSG(fd != -1, "Cannot open %s: %s", file, strerror(errno));
|
||||
bool found = false;
|
||||
char *line = NULL;
|
||||
while (!found && (line = atf_utils_readline(fd)) != NULL) {
|
||||
@@ -404,7 +411,8 @@ atf_utils_redirect(const int target_fd, const char *name)
|
||||
else if (target_fd == STDERR_FILENO)
|
||||
fflush(stderr);
|
||||
|
||||
const int new_fd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0644);
|
||||
const int new_fd = open(name, O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC,
|
||||
0644);
|
||||
if (new_fd == -1)
|
||||
err(EXIT_FAILURE, "Cannot create %s", name);
|
||||
if (new_fd != target_fd) {
|
||||
@@ -425,8 +433,9 @@ void
|
||||
atf_utils_wait(const pid_t pid, const int exitstatus, const char *expout,
|
||||
const char *experr)
|
||||
{
|
||||
int status;
|
||||
ATF_REQUIRE(waitpid(pid, &status, 0) != -1);
|
||||
siginfo_t info;
|
||||
ATF_REQUIRE(waitid(P_PID, pid, &info, WEXITED) != -1);
|
||||
ATF_REQUIRE(info.si_pid == pid);
|
||||
|
||||
atf_dynstr_t out_name;
|
||||
init_out_filename(&out_name, pid, "out", true);
|
||||
@@ -437,8 +446,8 @@ atf_utils_wait(const pid_t pid, const int exitstatus, const char *expout,
|
||||
atf_utils_cat_file(atf_dynstr_cstring(&out_name), "subprocess stdout: ");
|
||||
atf_utils_cat_file(atf_dynstr_cstring(&err_name), "subprocess stderr: ");
|
||||
|
||||
ATF_REQUIRE(WIFEXITED(status));
|
||||
ATF_REQUIRE_EQ(exitstatus, WEXITSTATUS(status));
|
||||
ATF_REQUIRE(info.si_code == CLD_EXITED);
|
||||
ATF_REQUIRE_EQ(exitstatus, info.si_status);
|
||||
|
||||
const char *save_prefix = "save:";
|
||||
const size_t save_prefix_length = strlen(save_prefix);
|
||||
@@ -463,4 +472,7 @@ atf_utils_wait(const pid_t pid, const int exitstatus, const char *expout,
|
||||
|
||||
ATF_REQUIRE(unlink(atf_dynstr_cstring(&out_name)) != -1);
|
||||
ATF_REQUIRE(unlink(atf_dynstr_cstring(&err_name)) != -1);
|
||||
|
||||
atf_dynstr_fini(&out_name);
|
||||
atf_dynstr_fini(&err_name);
|
||||
}
|
||||
@@ -26,6 +26,7 @@
|
||||
#if !defined(ATF_C_UTILS_H)
|
||||
#define ATF_C_UTILS_H
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdbool.h>
|
||||
#include <unistd.h>
|
||||
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
atf-check
|
||||
atf-sh
|
||||
@@ -23,6 +23,8 @@
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
CODE_COVERAGE_DIRS+= atf-sh
|
||||
|
||||
libexec_PROGRAMS += atf-sh/atf-check
|
||||
atf_sh_atf_check_SOURCES = atf-sh/atf-check.cpp
|
||||
atf_sh_atf_check_LDADD = $(ATF_CXX_LIBS)
|
||||
|
||||
+24
-18
@@ -22,7 +22,7 @@
|
||||
.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||
.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
.Dd June 21, 2020
|
||||
.Dd August 13, 2026
|
||||
.Dt ATF-CHECK 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
@@ -34,11 +34,12 @@
|
||||
.Op Fl o Ar action:arg ...
|
||||
.Op Fl e Ar action:arg ...
|
||||
.Op Fl x
|
||||
.Op Fl r Ar timeout[:interval]
|
||||
.Ar command
|
||||
.Sh DESCRIPTION
|
||||
.Nm
|
||||
executes a given command and analyzes its results, including
|
||||
exit code, stdout and stderr.
|
||||
exit code, stdout, and stderr.
|
||||
.Pp
|
||||
.Bf Em
|
||||
Test cases must use
|
||||
@@ -47,24 +48,27 @@ Test cases must use
|
||||
builtin function instead of calling this utility directly.
|
||||
.Ef
|
||||
.Pp
|
||||
In the first synopsis form,
|
||||
.Nm
|
||||
will execute the provided command and apply checks specified
|
||||
by arguments.
|
||||
By default it will act as if it was run with
|
||||
By default
|
||||
.Nm
|
||||
acts as if it was run with
|
||||
.Fl s
|
||||
.Ar exit:0
|
||||
.Fl o
|
||||
.Ar empty
|
||||
.Fl e
|
||||
.Ar empty .
|
||||
Multiple checks for the same output channel are allowed and, if specified,
|
||||
their results will be combined as a logical and (meaning that the output must
|
||||
match all the provided checks).
|
||||
.Pp
|
||||
In the second synopsis form,
|
||||
.Nm
|
||||
will print information about all supported options and their purpose.
|
||||
.Fl o
|
||||
.Ar empty
|
||||
and
|
||||
.Fl e
|
||||
.Ar empty
|
||||
may be specified multiple times.
|
||||
If they are specified multiple times, the checks will be applied to
|
||||
the appropriate stream in the order they were provided.
|
||||
.Pp
|
||||
The following options are available:
|
||||
.Bl -tag -width XqualXvalueXX
|
||||
@@ -80,11 +84,11 @@ accepted.
|
||||
.It Ar ignore
|
||||
ignores the exit check.
|
||||
.It Ar signal:<value>
|
||||
checks that the program exited due to a signal and that the signal that
|
||||
terminated it is
|
||||
checks that the program exited due to a signal, and (optionally) checks that the
|
||||
signal which terminated the process is
|
||||
.Va value .
|
||||
The signal can be specified both as a number or as a name, or it can also
|
||||
be omitted altogether, in which case any signal is accepted.
|
||||
The signal can be specified as a number, a name, or it can be omitted
|
||||
altogether (in which case any signal is accepted).
|
||||
.El
|
||||
.Pp
|
||||
Most of these checkers can be prefixed by the
|
||||
@@ -112,7 +116,9 @@ Most of these checkers can be prefixed by the
|
||||
.Sq not-
|
||||
string, which effectively reverses the check.
|
||||
.It Fl e Ar action:arg
|
||||
Analyzes standard error (syntax identical to above)
|
||||
Analyzes standard error.
|
||||
The usage is identical to
|
||||
.Fl o .
|
||||
.It Fl x
|
||||
Executes
|
||||
.Ar command
|
||||
@@ -150,15 +156,15 @@ instead of executing
|
||||
directly:
|
||||
.Bd -literal -offset indent
|
||||
# Exit code 0, nothing on stdout/stderr
|
||||
atf_check 'true'
|
||||
atf_check true
|
||||
|
||||
# Typical usage if failure is expected
|
||||
atf_check -s not-exit:0 'false'
|
||||
atf_check -s not-exit:0 false
|
||||
|
||||
# Checking stdout/stderr
|
||||
echo foobar >expout
|
||||
atf_check -o file:expout -e inline:"xx\etyy\en" \e
|
||||
'echo foobar ; printf "xx\etyy\en" >&2'
|
||||
-x 'echo foobar ; printf "xx\etyy\en" >&2'
|
||||
|
||||
# Checking for a crash
|
||||
atf_check -s signal:sigsegv my_program
|
||||
|
||||
+46
-32
@@ -30,6 +30,7 @@ extern "C" {
|
||||
#include <limits.h>
|
||||
#include <signal.h>
|
||||
#include <stdint.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
}
|
||||
|
||||
@@ -46,7 +47,6 @@ extern "C" {
|
||||
|
||||
#include "atf-c++/check.hpp"
|
||||
#include "atf-c++/detail/application.hpp"
|
||||
#include "atf-c++/detail/auto_array.hpp"
|
||||
#include "atf-c++/detail/env.hpp"
|
||||
#include "atf-c++/detail/exceptions.hpp"
|
||||
#include "atf-c++/detail/fs.hpp"
|
||||
@@ -74,12 +74,14 @@ struct status_check {
|
||||
status_check_t type;
|
||||
bool negated;
|
||||
int value;
|
||||
bool empty;
|
||||
|
||||
status_check(const status_check_t& p_type, const bool p_negated,
|
||||
const int p_value) :
|
||||
const int p_value, const bool p_empty) :
|
||||
type(p_type),
|
||||
negated(p_negated),
|
||||
value(p_value)
|
||||
value(p_value),
|
||||
empty(p_empty)
|
||||
{
|
||||
}
|
||||
};
|
||||
@@ -108,7 +110,7 @@ struct output_check {
|
||||
};
|
||||
|
||||
class temp_file : public std::ostream {
|
||||
std::auto_ptr< atf::fs::path > m_path;
|
||||
std::unique_ptr< atf::fs::path > m_path;
|
||||
int m_fd;
|
||||
|
||||
public:
|
||||
@@ -119,23 +121,30 @@ public:
|
||||
const atf::fs::path file = atf::fs::path(
|
||||
atf::env::get("TMPDIR", "/tmp")) / pattern;
|
||||
|
||||
atf::auto_array< char > buf(new char[file.str().length() + 1]);
|
||||
std::strcpy(buf.get(), file.c_str());
|
||||
|
||||
m_fd = ::mkstemp(buf.get());
|
||||
std::string file_s = file.str();
|
||||
// C++14 returns const char* with `std::string::data()`.
|
||||
//
|
||||
// TODO(ngie): remove the else block and simplify once we are on C++17
|
||||
// or later.
|
||||
#if __cplusplus >= 201703L
|
||||
char *file_ch_arr = file_s.data();
|
||||
#else
|
||||
char *file_ch_arr = &file_s[0];
|
||||
#endif
|
||||
m_fd = ::mkstemp(file_ch_arr);
|
||||
if (m_fd == -1)
|
||||
throw atf::system_error("atf_check::temp_file::temp_file(" +
|
||||
file.str() + ")", "mkstemp(3) failed",
|
||||
file_s + ")", "mkstemp(3) failed",
|
||||
errno);
|
||||
|
||||
m_path.reset(new atf::fs::path(buf.get()));
|
||||
m_path.reset(new atf::fs::path(file_ch_arr));
|
||||
}
|
||||
|
||||
~temp_file(void)
|
||||
{
|
||||
close();
|
||||
try {
|
||||
remove(*m_path);
|
||||
atf::fs::remove(*m_path);
|
||||
} catch (const atf::system_error&) {
|
||||
// Ignore deletion errors.
|
||||
}
|
||||
@@ -200,11 +209,11 @@ parse_exit_code(const std::string& str)
|
||||
try {
|
||||
const int value = atf::text::to_type< int >(str);
|
||||
if (value < 0 || value > 255)
|
||||
throw std::runtime_error("Unused reason");
|
||||
throw std::range_error("Unused reason");
|
||||
return value;
|
||||
} catch (const std::runtime_error&) {
|
||||
} catch (const std::range_error&) {
|
||||
throw atf::application::usage_error("Invalid exit code for -s option; "
|
||||
"must be an integer in range 0-255");
|
||||
"must be an integer in the range [0, 255]");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -267,6 +276,7 @@ parse_status_check_arg(const std::string& arg)
|
||||
const std::string value_str = (
|
||||
delimiter == std::string::npos ? "" : arg.substr(delimiter + 1));
|
||||
int value;
|
||||
bool empty = false;
|
||||
|
||||
status_check_t type;
|
||||
if (action == "eq") {
|
||||
@@ -278,9 +288,10 @@ parse_status_check_arg(const std::string& arg)
|
||||
value = parse_exit_code(value_str);
|
||||
} else if (action == "exit") {
|
||||
type = sc_exit;
|
||||
if (value_str.empty())
|
||||
if (value_str.empty()) {
|
||||
value = INT_MIN;
|
||||
else
|
||||
empty = true;
|
||||
} else
|
||||
value = parse_exit_code(value_str);
|
||||
} else if (action == "ignore") {
|
||||
if (negated)
|
||||
@@ -296,14 +307,15 @@ parse_status_check_arg(const std::string& arg)
|
||||
value = parse_exit_code(value_str);
|
||||
} else if (action == "signal") {
|
||||
type = sc_signal;
|
||||
if (value_str.empty())
|
||||
if (value_str.empty()) {
|
||||
value = INT_MIN;
|
||||
else
|
||||
empty = true;
|
||||
} else
|
||||
value = parse_signal(value_str);
|
||||
} else
|
||||
throw atf::application::usage_error("Invalid status checker");
|
||||
|
||||
return status_check(type, negated, value);
|
||||
return status_check(type, negated, value, empty);
|
||||
}
|
||||
|
||||
static
|
||||
@@ -414,7 +426,7 @@ flatten_argv(char* const* argv)
|
||||
}
|
||||
|
||||
static
|
||||
std::auto_ptr< atf::check::check_result >
|
||||
std::unique_ptr< atf::check::check_result >
|
||||
execute(const char* const* argv)
|
||||
{
|
||||
// TODO: This should go to stderr... but fixing it now may be hard as test
|
||||
@@ -430,13 +442,14 @@ execute(const char* const* argv)
|
||||
}
|
||||
|
||||
static
|
||||
std::auto_ptr< atf::check::check_result >
|
||||
std::unique_ptr< atf::check::check_result >
|
||||
execute_with_shell(char* const* argv)
|
||||
{
|
||||
const std::string cmd = flatten_argv(argv);
|
||||
|
||||
const std::string shell = atf::env::get("ATF_SHELL", ATF_SHELL);
|
||||
const char* sh_argv[4];
|
||||
sh_argv[0] = atf::env::get("ATF_SHELL", ATF_SHELL).c_str();
|
||||
|
||||
sh_argv[0] = shell.c_str();
|
||||
sh_argv[1] = "-c";
|
||||
sh_argv[2] = cmd.c_str();
|
||||
sh_argv[3] = NULL;
|
||||
@@ -598,7 +611,7 @@ run_status_check(const status_check& sc, const atf::check::check_result& cr)
|
||||
bool result;
|
||||
|
||||
if (sc.type == sc_exit) {
|
||||
if (cr.exited() && sc.value != INT_MIN) {
|
||||
if (cr.exited() && !sc.empty) {
|
||||
const int status = cr.exitcode();
|
||||
|
||||
if (!sc.negated && sc.value != status) {
|
||||
@@ -613,7 +626,7 @@ run_status_check(const status_check& sc, const atf::check::check_result& cr)
|
||||
result = false;
|
||||
} else
|
||||
result = true;
|
||||
} else if (cr.exited() && sc.value == INT_MIN) {
|
||||
} else if (cr.exited() && sc.empty) {
|
||||
result = true;
|
||||
} else {
|
||||
std::cerr << "Fail: program did not exit cleanly\n";
|
||||
@@ -622,7 +635,7 @@ run_status_check(const status_check& sc, const atf::check::check_result& cr)
|
||||
} else if (sc.type == sc_ignore) {
|
||||
result = true;
|
||||
} else if (sc.type == sc_signal) {
|
||||
if (cr.signaled() && sc.value != INT_MIN) {
|
||||
if (cr.signaled() && !sc.empty) {
|
||||
const int status = cr.termsig();
|
||||
|
||||
if (!sc.negated && sc.value != status) {
|
||||
@@ -636,7 +649,7 @@ run_status_check(const status_check& sc, const atf::check::check_result& cr)
|
||||
result = false;
|
||||
} else
|
||||
result = true;
|
||||
} else if (cr.signaled() && sc.value == INT_MIN) {
|
||||
} else if (cr.signaled() && sc.empty) {
|
||||
result = true;
|
||||
} else {
|
||||
std::cerr << "Fail: program did not receive a signal\n";
|
||||
@@ -677,7 +690,7 @@ run_status_checks(const std::vector< status_check >& checks,
|
||||
|
||||
static
|
||||
bool
|
||||
run_output_check(const output_check oc, const atf::fs::path& path,
|
||||
run_output_check(const output_check& oc, const atf::fs::path& path,
|
||||
const std::string& stdxxx)
|
||||
{
|
||||
bool result;
|
||||
@@ -902,9 +915,10 @@ atf_check::main(void)
|
||||
|
||||
int status = EXIT_FAILURE;
|
||||
|
||||
if (m_status_checks.empty())
|
||||
m_status_checks.push_back(status_check(sc_exit, false, EXIT_SUCCESS));
|
||||
else if (m_status_checks.size() > 1) {
|
||||
if (m_status_checks.empty()) {
|
||||
m_status_checks.push_back(status_check(sc_exit, false, EXIT_SUCCESS,
|
||||
false));
|
||||
} else if (m_status_checks.size() > 1) {
|
||||
// TODO: Remove this restriction.
|
||||
throw atf::application::usage_error("Cannot specify -s more than once");
|
||||
}
|
||||
@@ -915,7 +929,7 @@ atf_check::main(void)
|
||||
m_stderr_checks.push_back(output_check(oc_empty, false, ""));
|
||||
|
||||
do {
|
||||
std::auto_ptr< atf::check::check_result > r =
|
||||
std::unique_ptr< atf::check::check_result > r =
|
||||
m_xflag ? execute_with_shell(m_argv) : execute(m_argv);
|
||||
|
||||
if ((run_status_checks(m_status_checks, *r) == false) ||
|
||||
|
||||
+1
-1
@@ -369,7 +369,7 @@ atf_check -s exit:0 -o file:expout -e empty echo foo
|
||||
|
||||
# Generate a file for later inspection
|
||||
atf_check -s exit:0 -o save:stdout -e empty ls
|
||||
grep foo ls || atf_fail "foo file not found in listing"
|
||||
grep foo stdout || atf_fail "foo file not found in listing"
|
||||
|
||||
# Or just do the match along the way
|
||||
atf_check -s exit:0 -o match:"^foo$" -e empty ls
|
||||
|
||||
+29
-23
@@ -31,6 +31,8 @@ extern "C" {
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <iostream>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "atf-c++/detail/application.hpp"
|
||||
#include "atf-c++/detail/env.hpp"
|
||||
@@ -55,7 +57,7 @@ fix_plain_name(const char *filename)
|
||||
}
|
||||
|
||||
static
|
||||
std::string*
|
||||
std::string
|
||||
construct_script(const char* filename)
|
||||
{
|
||||
const std::string libexecdir = atf::env::get(
|
||||
@@ -64,37 +66,35 @@ construct_script(const char* filename)
|
||||
"ATF_PKGDATADIR", ATF_PKGDATADIR);
|
||||
const std::string shell = atf::env::get("ATF_SHELL", ATF_SHELL);
|
||||
|
||||
std::string* command = new std::string();
|
||||
command->reserve(512);
|
||||
(*command) += ("Atf_Check='" + libexecdir + "/atf-check' ; " +
|
||||
"Atf_Shell='" + shell + "' ; " +
|
||||
". " + pkgdatadir + "/libatf-sh.subr ; " +
|
||||
". " + fix_plain_name(filename) + " ; " +
|
||||
"main \"${@}\"");
|
||||
std::string command;
|
||||
|
||||
command += ("Atf_Check='" + libexecdir + "/atf-check' ; " +
|
||||
"Atf_Shell='" + shell + "' ; " +
|
||||
". " + pkgdatadir + "/libatf-sh.subr ; " +
|
||||
". " + fix_plain_name(filename) + " ; " +
|
||||
"main \"${@}\"");
|
||||
return command;
|
||||
}
|
||||
|
||||
static
|
||||
const char**
|
||||
std::vector<std::string>
|
||||
construct_argv(const std::string& shell, const int interpreter_argc,
|
||||
const char* const* interpreter_argv)
|
||||
{
|
||||
PRE(interpreter_argc >= 1);
|
||||
PRE(interpreter_argv[0] != NULL);
|
||||
|
||||
const std::string* script = construct_script(interpreter_argv[0]);
|
||||
std::string script = construct_script(interpreter_argv[0]);
|
||||
|
||||
const int count = 4 + (interpreter_argc - 1) + 1;
|
||||
const char** argv = new const char*[count];
|
||||
argv[0] = shell.c_str();
|
||||
argv[1] = "-c";
|
||||
argv[2] = script->c_str();
|
||||
argv[3] = interpreter_argv[0];
|
||||
std::vector<std::string> argv;
|
||||
|
||||
argv.push_back(shell);
|
||||
argv.push_back(std::string("-c"));
|
||||
argv.push_back(std::move(script));
|
||||
argv.push_back(std::string(interpreter_argv[0]));
|
||||
|
||||
for (int i = 1; i < interpreter_argc; i++)
|
||||
argv[4 + i - 1] = interpreter_argv[i];
|
||||
|
||||
argv[count - 1] = NULL;
|
||||
argv.push_back(interpreter_argv[i]);
|
||||
|
||||
return argv;
|
||||
}
|
||||
@@ -167,12 +167,18 @@ atf_sh::main(void)
|
||||
throw std::runtime_error("The test program '" + script.str() + "' "
|
||||
"does not exist");
|
||||
|
||||
const char** argv = construct_argv(m_shell.str(), m_argc, m_argv);
|
||||
// Don't bother keeping track of the memory allocated by construct_argv:
|
||||
// we are going to exec or die immediately.
|
||||
std::vector<std::string> argvv = construct_argv(m_shell.str(), m_argc,
|
||||
m_argv);
|
||||
std::vector<const char *> argv;
|
||||
|
||||
const int ret = execv(m_shell.c_str(), const_cast< char** >(argv));
|
||||
for (std::size_t i = 0; i < argvv.size(); i++)
|
||||
argv.push_back(argvv[i].c_str());
|
||||
argv.push_back(NULL);
|
||||
|
||||
const int ret = execv(m_shell.c_str(),
|
||||
const_cast<char* const *>(argv.data()));
|
||||
INV(ret == -1);
|
||||
|
||||
std::cerr << "Failed to execute " << m_shell.str() << ": "
|
||||
<< std::strerror(errno) << "\n";
|
||||
return EXIT_FAILURE;
|
||||
|
||||
@@ -358,7 +358,7 @@ atf_require_prog()
|
||||
#
|
||||
# Sets the test case's variable 'varname' to the specified values
|
||||
# which are concatenated using a single blank space. This function
|
||||
# is supposed to be called form the test case's head only.
|
||||
# is supposed to be called from the test case's head only.
|
||||
#
|
||||
atf_set()
|
||||
{
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
atconfig
|
||||
h_app_empty
|
||||
h_app_opts_args
|
||||
h_tp_atf_check_sh
|
||||
h_tp_basic_c
|
||||
h_tp_basic_cpp
|
||||
h_tp_basic_sh
|
||||
h_tp_fail
|
||||
h_tp_pass
|
||||
package.m4
|
||||
testsuite
|
||||
@@ -23,6 +23,8 @@
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
CODE_COVERAGE_DIRS+= bootstrap
|
||||
|
||||
check_PROGRAMS = bootstrap/h_tp_basic_c
|
||||
bootstrap_h_tp_basic_c_SOURCES = bootstrap/h_tp_basic_c.c
|
||||
bootstrap_h_tp_basic_c_LDADD = libatf-c.la
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Signature of the current package.
|
||||
m4_define(AT_PACKAGE_NAME, Automated Testing Framework)
|
||||
m4_define(AT_PACKAGE_TARNAME, atf)
|
||||
m4_define(AT_PACKAGE_VERSION, 0.22)
|
||||
m4_define(AT_PACKAGE_STRING, Automated Testing Framework 0.22)
|
||||
m4_define(AT_PACKAGE_BUGREPORT, [email protected])
|
||||
m4_define(AT_PACKAGE_VERSION, 0.24)
|
||||
m4_define(AT_PACKAGE_STRING, Automated Testing Framework 0.24)
|
||||
m4_define(AT_PACKAGE_BUGREPORT, [email protected])
|
||||
+353
-373
File diff suppressed because it is too large.
Load diff
+110
-12
@@ -6,6 +6,9 @@
|
||||
/* Define to 1 if dirname takes a constant pointer */
|
||||
#undef HAVE_CONST_DIRNAME
|
||||
|
||||
/* define if the compiler supports basic C++20 syntax */
|
||||
#undef HAVE_CXX20
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
@@ -18,21 +21,18 @@
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
/* Define to 1 if you have the <minix/config.h> header file. */
|
||||
#undef HAVE_MINIX_CONFIG_H
|
||||
|
||||
/* Define to 1 if getopt has optreset */
|
||||
#undef HAVE_OPTRESET
|
||||
|
||||
/* Define to 1 if you have the `putenv' function. */
|
||||
#undef HAVE_PUTENV
|
||||
|
||||
/* Define to 1 if you have the `setenv' function. */
|
||||
#undef HAVE_SETENV
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdio.h> header file. */
|
||||
#undef HAVE_STDIO_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
@@ -51,12 +51,12 @@
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to 1 if you have the `unsetenv' function. */
|
||||
#undef HAVE_UNSETENV
|
||||
|
||||
/* Define to 1 if vsnprintf is in std */
|
||||
#undef HAVE_VSNPRINTF_IN_STD
|
||||
|
||||
/* Define to 1 if you have the <wchar.h> header file. */
|
||||
#undef HAVE_WCHAR_H
|
||||
|
||||
/* Define to the sub-directory where libtool stores uninstalled libraries. */
|
||||
#undef LT_OBJDIR
|
||||
|
||||
@@ -84,8 +84,106 @@
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
/* Define to 1 if all of the C89 standard headers exist (not just the ones
|
||||
required in a freestanding environment). This macro is provided for
|
||||
backward compatibility; new code need not use it. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Enable extensions on AIX, Interix, z/OS. */
|
||||
#ifndef _ALL_SOURCE
|
||||
# undef _ALL_SOURCE
|
||||
#endif
|
||||
/* Enable extensions on Cosmopolitan Libc. */
|
||||
#ifndef _COSMO_SOURCE
|
||||
# undef _COSMO_SOURCE
|
||||
#endif
|
||||
/* Enable general extensions on macOS. */
|
||||
#ifndef _DARWIN_C_SOURCE
|
||||
# undef _DARWIN_C_SOURCE
|
||||
#endif
|
||||
/* Enable general extensions on Solaris. */
|
||||
#ifndef __EXTENSIONS__
|
||||
# undef __EXTENSIONS__
|
||||
#endif
|
||||
/* Enable GNU extensions on systems that have them. */
|
||||
#ifndef _GNU_SOURCE
|
||||
# undef _GNU_SOURCE
|
||||
#endif
|
||||
/* Enable X/Open compliant socket functions that do not require linking
|
||||
with -lxnet on HP-UX 11.11. */
|
||||
#ifndef _HPUX_ALT_XOPEN_SOCKET_API
|
||||
# undef _HPUX_ALT_XOPEN_SOCKET_API
|
||||
#endif
|
||||
/* Identify the host operating system as Minix.
|
||||
This macro does not affect the system headers' behavior.
|
||||
A future release of Autoconf may stop defining this macro. */
|
||||
#ifndef _MINIX
|
||||
# undef _MINIX
|
||||
#endif
|
||||
/* Enable general extensions on NetBSD.
|
||||
Enable NetBSD compatibility extensions on Minix. */
|
||||
#ifndef _NETBSD_SOURCE
|
||||
# undef _NETBSD_SOURCE
|
||||
#endif
|
||||
/* Enable OpenBSD compatibility extensions on NetBSD.
|
||||
Oddly enough, this does nothing on OpenBSD. */
|
||||
#ifndef _OPENBSD_SOURCE
|
||||
# undef _OPENBSD_SOURCE
|
||||
#endif
|
||||
/* Define to 1 if needed for POSIX-compatible behavior. */
|
||||
#ifndef _POSIX_SOURCE
|
||||
# undef _POSIX_SOURCE
|
||||
#endif
|
||||
/* Define to 2 if needed for POSIX-compatible behavior. */
|
||||
#ifndef _POSIX_1_SOURCE
|
||||
# undef _POSIX_1_SOURCE
|
||||
#endif
|
||||
/* Enable POSIX-compatible threading on Solaris. */
|
||||
#ifndef _POSIX_PTHREAD_SEMANTICS
|
||||
# undef _POSIX_PTHREAD_SEMANTICS
|
||||
#endif
|
||||
/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */
|
||||
#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
|
||||
# undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
|
||||
#endif
|
||||
/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */
|
||||
#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
|
||||
# undef __STDC_WANT_IEC_60559_BFP_EXT__
|
||||
#endif
|
||||
/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */
|
||||
#ifndef __STDC_WANT_IEC_60559_DFP_EXT__
|
||||
# undef __STDC_WANT_IEC_60559_DFP_EXT__
|
||||
#endif
|
||||
/* Enable extensions specified by C23 Annex F. */
|
||||
#ifndef __STDC_WANT_IEC_60559_EXT__
|
||||
# undef __STDC_WANT_IEC_60559_EXT__
|
||||
#endif
|
||||
/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */
|
||||
#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
|
||||
# undef __STDC_WANT_IEC_60559_FUNCS_EXT__
|
||||
#endif
|
||||
/* Enable extensions specified by C23 Annex H and ISO/IEC TS 18661-3:2015. */
|
||||
#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
|
||||
# undef __STDC_WANT_IEC_60559_TYPES_EXT__
|
||||
#endif
|
||||
/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */
|
||||
#ifndef __STDC_WANT_LIB_EXT2__
|
||||
# undef __STDC_WANT_LIB_EXT2__
|
||||
#endif
|
||||
/* Enable extensions specified by ISO/IEC 24747:2009. */
|
||||
#ifndef __STDC_WANT_MATH_SPEC_FUNCS__
|
||||
# undef __STDC_WANT_MATH_SPEC_FUNCS__
|
||||
#endif
|
||||
/* Enable extensions on HP NonStop. */
|
||||
#ifndef _TANDEM_SOURCE
|
||||
# undef _TANDEM_SOURCE
|
||||
#endif
|
||||
/* Enable X/Open extensions. Define to 500 only if necessary
|
||||
to make mbstate_t available. */
|
||||
#ifndef _XOPEN_SOURCE
|
||||
# undef _XOPEN_SOURCE
|
||||
#endif
|
||||
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
+94
-20
@@ -27,10 +27,10 @@ dnl -----------------------------------------------------------------------
|
||||
dnl Initialize the GNU build system.
|
||||
dnl -----------------------------------------------------------------------
|
||||
|
||||
AC_INIT([Automated Testing Framework], [0.22],
|
||||
[[email protected]], [atf],
|
||||
[https://github.com/jmmv/atf/])
|
||||
AC_PREREQ([2.65])
|
||||
AC_INIT([Automated Testing Framework], [0.24],
|
||||
[[email protected]], [atf],
|
||||
[https://github.com/freebsd/atf/])
|
||||
AC_PREREQ([2.68])
|
||||
AC_COPYRIGHT([Copyright (c) 2007-2012 The NetBSD Foundation, Inc.])
|
||||
AC_DEFINE([PACKAGE_COPYRIGHT],
|
||||
["Copyright (c) 2007-2012 The NetBSD Foundation, Inc."],
|
||||
@@ -42,12 +42,86 @@ AC_CONFIG_SRCDIR([atf-c.h])
|
||||
AC_CONFIG_TESTDIR([bootstrap])
|
||||
|
||||
AC_CANONICAL_TARGET
|
||||
AC_USE_SYSTEM_EXTENSIONS
|
||||
|
||||
AM_INIT_AUTOMAKE([1.9 check-news foreign subdir-objects -Wall])
|
||||
|
||||
AM_PROG_AR
|
||||
LT_INIT
|
||||
|
||||
pc_cflags=
|
||||
pc_cxxflags=
|
||||
pc_ldflags=
|
||||
|
||||
AC_ARG_ENABLE([asan],
|
||||
AS_HELP_STRING([--enable-asan], [Turn on AddressSanitizer]),,
|
||||
[enable_asan=no])
|
||||
|
||||
if test ${enable_asan} = yes; then
|
||||
AC_MSG_NOTICE([building with AddressSanitizer (ASAN)])
|
||||
enable_developer=yes
|
||||
CFLAGS="${CFLAGS} -fsanitize=address"
|
||||
pc_cflags="${pc_cflags} -fsanitize=address"
|
||||
CXXFLAGS="${CXXFLAGS} -fsanitize=address"
|
||||
pc_cxxflags="${pc_cxxflags} -fsanitize=address"
|
||||
LDFLAGS="${LDFLAGS} -fsanitize=address"
|
||||
pc_ldflags="${pc_ldflags} -fsanitize=address"
|
||||
fi
|
||||
AM_CONDITIONAL([HAVE_ASAN], [test "${enable_asan}" = yes])
|
||||
|
||||
AC_ARG_ENABLE([code-coverage],
|
||||
AS_HELP_STRING([--enable-code-coverage], [Turn on runtime code coverage]),,
|
||||
[enable_code_coverage=no])
|
||||
|
||||
if test ${enable_code_coverage} = yes; then
|
||||
AC_MSG_NOTICE([building with code coverage])
|
||||
enable_developer=yes
|
||||
CFLAGS="${CFLAGS} --coverage"
|
||||
pc_cflags="${pc_cflags} --coverage"
|
||||
CXXFLAGS="${CXXFLAGS} --coverage"
|
||||
pc_cxxflags="${pc_cxxflags} --coverage"
|
||||
LDFLAGS="${LDFLAGS} --coverage"
|
||||
pc_ldflags="${pc_ldflags} --coverage"
|
||||
fi
|
||||
AM_CONDITIONAL([CODE_COVERAGE], [test "${enable_code_coverage}" = yes])
|
||||
|
||||
AC_ARG_ENABLE([lsan],
|
||||
AS_HELP_STRING([--enable-lsan], [Turn on LeakSanitizer]),,
|
||||
[enable_lsan=no])
|
||||
|
||||
if test ${enable_lsan} = yes; then
|
||||
AC_MSG_NOTICE([building with LeakSanitizer (LSAN)])
|
||||
enable_developer=yes
|
||||
CFLAGS="${CFLAGS} -fsanitize=leak"
|
||||
pc_cflags="${pc_cflags} -fsanitize=leak"
|
||||
CXXFLAGS="${CXXFLAGS} -fsanitize=leak"
|
||||
pc_cxxflags="${pc_cxxflags} -fsanitize=leak"
|
||||
LDFLAGS="${LDFLAGS} -fsanitize=leak"
|
||||
pc_ldflags="${pc_ldflags} -fsanitize=leak"
|
||||
fi
|
||||
AM_CONDITIONAL([HAVE_LSAN], [test "${enable_lsan}" = yes])
|
||||
|
||||
AC_ARG_ENABLE([ubsan],
|
||||
AS_HELP_STRING([--enable-ubsan], [Turn on UndefinedBehaviourSanitizer]),,
|
||||
[enable_ubsan=no])
|
||||
|
||||
if test ${enable_ubsan} = yes; then
|
||||
AC_MSG_NOTICE([building with UndefinedBehaviourSanitizer (UBSAN)])
|
||||
enable_developer=yes
|
||||
CFLAGS="${CFLAGS} -fsanitize=undefined"
|
||||
pc_cflags="${pc_cflags} -fsanitize=undefined"
|
||||
CXXFLAGS="${CXXFLAGS} -fsanitize=undefined"
|
||||
pc_cxxflags="${pc_cxxflags} -fsanitize=undefined"
|
||||
LDFLAGS="${LDFLAGS} -fsanitize=undefined"
|
||||
pc_ldflags="${pc_ldflags} -fsanitize=undefined"
|
||||
fi
|
||||
AM_CONDITIONAL([HAVE_UBSAN], [test "${enable_ubsan}" = yes])
|
||||
|
||||
AC_SUBST([pc_cflags])
|
||||
AC_SUBST([pc_cxxflags])
|
||||
AC_SUBST([pc_ldflags])
|
||||
|
||||
|
||||
dnl -----------------------------------------------------------------------
|
||||
dnl Check for the C and C++ compilers and required features.
|
||||
dnl -----------------------------------------------------------------------
|
||||
@@ -55,30 +129,21 @@ dnl -----------------------------------------------------------------------
|
||||
AC_LANG(C)
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_C_O
|
||||
AC_PROG_CPP
|
||||
dnl The C compiler check automatically aborts if the compiler does not work.
|
||||
dnl Nothing to do here.
|
||||
|
||||
AC_LANG(C++)
|
||||
AC_USE_SYSTEM_EXTENSIONS
|
||||
|
||||
AC_PROG_CXX
|
||||
AC_CACHE_CHECK([whether the C++ compiler works],
|
||||
[atf_cv_prog_cxx_works],
|
||||
[AC_LANG_PUSH([C++])
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
|
||||
[atf_cv_prog_cxx_works=yes],
|
||||
[atf_cv_prog_cxx_works=no])
|
||||
AC_LANG_POP])
|
||||
if test "${atf_cv_prog_cxx_works}" = no; then
|
||||
AC_MSG_ERROR([C++ compiler cannot create executables])
|
||||
fi
|
||||
AC_LANG_COMPILER(C++)
|
||||
AC_PROG_CPP
|
||||
AX_CXX_COMPILE_STDCXX(20, noext, mandatory)
|
||||
|
||||
KYUA_DEVELOPER_MODE([C,C++])
|
||||
|
||||
dnl TODO(jmmv): Remove once the atf-*-api.3 symlinks are removed.
|
||||
AC_PROG_LN_S
|
||||
|
||||
ATF_MODULE_APPLICATION
|
||||
ATF_MODULE_DEFS
|
||||
ATF_MODULE_ENV
|
||||
ATF_MODULE_FS
|
||||
|
||||
ATF_RUNTIME_TOOL([ATF_BUILD_CC],
|
||||
@@ -142,11 +207,20 @@ dnl -----------------------------------------------------------------------
|
||||
AC_PATH_PROG([KYUA], [kyua])
|
||||
AM_CONDITIONAL([HAVE_KYUA], [test -n "${KYUA}"])
|
||||
AC_PATH_PROG([GIT], [git])
|
||||
if test x"${enable_code_coverage}" = xyes; then
|
||||
AC_MSG_NOTICE([Checking for lcov package])
|
||||
AC_PATH_PROG([GENHTML], [genhtml])
|
||||
AC_PATH_PROG([LCOV], [lcov])
|
||||
if test -z "${GENHTML}" -a -z "${LCOV}"; then
|
||||
AC_MSG_ERROR([Please install lcov to obtain code coverage])
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl -----------------------------------------------------------------------
|
||||
dnl Finally, generate output.
|
||||
dnl -----------------------------------------------------------------------
|
||||
|
||||
AC_OUTPUT([Makefile atf-c/defs.h])
|
||||
AC_CONFIG_FILES([Makefile atf-c/defs.h])
|
||||
AC_OUTPUT
|
||||
|
||||
dnl vim: syntax=m4:expandtab:shiftwidth=4:softtabstop=4
|
||||
@@ -1 +0,0 @@
|
||||
atf.7
|
||||
+1
-1
@@ -23,7 +23,7 @@
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
dist_man_MANS += doc/atf-test-case.4 \
|
||||
dist_man_MANS += doc/atf-test-case.7 \
|
||||
doc/atf-test-program.1
|
||||
|
||||
man_MANS += doc/atf.7
|
||||
|
||||
@@ -1,328 +0,0 @@
|
||||
.\" Copyright (c) 2007 The NetBSD Foundation, Inc.
|
||||
.\" All rights reserved.
|
||||
.\"
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
.\" modification, are permitted provided that the following conditions
|
||||
.\" are met:
|
||||
.\" 1. Redistributions of source code must retain the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer.
|
||||
.\" 2. Redistributions in binary form must reproduce the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer in the
|
||||
.\" documentation and/or other materials provided with the distribution.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND
|
||||
.\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
.\" IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY
|
||||
.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
||||
.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||
.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
.Dd July 3, 2015
|
||||
.Dt ATF-TEST-CASE 4
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm atf-test-case
|
||||
.Nd generic description of test cases
|
||||
.Sh DESCRIPTION
|
||||
A
|
||||
.Em test case
|
||||
is a piece of code that stress-tests a specific feature of the software.
|
||||
This feature is typically self-contained enough, either in the amount of
|
||||
code that implements it or in the general idea that describes it, to
|
||||
warrant its independent testing.
|
||||
Given this, test cases are very fine-grained, but they attempt to group
|
||||
similar smaller tests which are semantically related.
|
||||
.Pp
|
||||
A test case is defined by three components regardless of the language it is
|
||||
implemented in: a header, a body and a cleanup routine.
|
||||
The
|
||||
.Em header
|
||||
is, basically, a declarative piece of code that defines several
|
||||
properties to describe what the test case does and how it behaves.
|
||||
In other words: it defines the test case's
|
||||
.Em meta-data ,
|
||||
further described in the
|
||||
.Sx Meta-data
|
||||
section.
|
||||
The
|
||||
.Em body
|
||||
is the test case itself.
|
||||
It executes all actions needed to reproduce the test, and checks for
|
||||
failures.
|
||||
This body is only executed if the abstract conditions specified by the
|
||||
header are met.
|
||||
The
|
||||
.Em cleanup
|
||||
routine is a piece of code always executed after the body, regardless of
|
||||
the exit status of the test case.
|
||||
It can be used to undo side-effects of the test case.
|
||||
Note that almost all side-effects of a test case are automatically cleaned
|
||||
up by the library; this is explained in more detail in the rest of this
|
||||
document.
|
||||
.Pp
|
||||
It is extremely important to keep the separation between a test case's
|
||||
header and body well-defined, because the header is
|
||||
.Em always
|
||||
parsed, whereas the body is only executed when the conditions defined in
|
||||
the header are met and when the user specifies that test case.
|
||||
.Pp
|
||||
At last, test cases are always contained into test programs.
|
||||
The test programs act as a front-end to them, providing a consistent
|
||||
interface to the user and several APIs to ease their implementation.
|
||||
.Ss Results
|
||||
Upon termination, a test case reports a status and, optionally, a textual
|
||||
reason describing why the test reported such status.
|
||||
The caller must ensure that the test case really performed the task that its
|
||||
status describes, as the test program may be bogus and therefore providing a
|
||||
misleading result, e.g., providing a result that indicates success but the
|
||||
error code of the program says otherwise.
|
||||
.Pp
|
||||
The possible exit status of a test case are one of the following:
|
||||
.Bl -tag -width expectedXfailureXX
|
||||
.It expected_death
|
||||
The test case expects to terminate abruptly.
|
||||
.It expected_exit
|
||||
The test case expects to exit cleanly.
|
||||
.It expected_failure
|
||||
The test case expects to exit with a controller fatal/non-fatal failure.
|
||||
If this happens, the test program exits with a success error code.
|
||||
.It expected_signal
|
||||
The test case expects to receive a signal that makes it terminate.
|
||||
.It expected_timeout
|
||||
The test case expects to execute for longer than its timeout.
|
||||
.It passed
|
||||
The test case was executed successfully.
|
||||
The test program exits with a success error code.
|
||||
.It skipped
|
||||
The test case could not be executed because some preconditions were not
|
||||
met.
|
||||
This is not a failure because it can typically be resolved by adjusting
|
||||
the system to meet the necessary conditions.
|
||||
This is always accompanied by a
|
||||
.Em reason ,
|
||||
a message describing why the test was skipped.
|
||||
The test program exits with a success error code.
|
||||
.It failed
|
||||
An error appeared during the execution of the test case.
|
||||
This is always accompanied by a
|
||||
.Em reason ,
|
||||
a message describing why the test failed.
|
||||
The test program exits with a failure error code.
|
||||
.El
|
||||
.Pp
|
||||
The usefulness of the
|
||||
.Sq expected_*
|
||||
results comes when writing test cases that verify known failures caused,
|
||||
in general, due to programming errors (aka bugs).
|
||||
Whenever the faulty condition that the
|
||||
.Sq expected_*
|
||||
result is trying to cover is fixed, then the test case will be reported as
|
||||
.Sq failed
|
||||
and the developer will have to adjust it to match its new condition.
|
||||
.Pp
|
||||
It is important to note that all
|
||||
.Sq expected_*
|
||||
results are only provided as a
|
||||
.Em hint
|
||||
to the caller; the caller must verify that the test case did actually terminate
|
||||
as the expected condition says.
|
||||
.Ss Input/output
|
||||
Test cases are free to print whatever they want to their
|
||||
.Xr stdout 4
|
||||
and
|
||||
.Xr stderr 4
|
||||
file descriptors.
|
||||
They are, in fact, encouraged to print status information as they execute
|
||||
to keep the user informed of their actions.
|
||||
This is specially important for long test cases.
|
||||
.Pp
|
||||
Test cases will log their results to an auxiliary file, which is then
|
||||
collected by the test program they are contained in.
|
||||
The developer need not care about this as long as he uses the correct
|
||||
APIs to implement the test cases.
|
||||
.Pp
|
||||
The standard input of the test cases is unconditionally connected to
|
||||
.Sq /dev/zero .
|
||||
.Ss Meta-data
|
||||
The following metadata properties can be exposed via the test case's head:
|
||||
.Bl -tag -width requireXmachineXX
|
||||
.It descr
|
||||
Type: textual.
|
||||
Required.
|
||||
.Pp
|
||||
A brief textual description of the test case's purpose.
|
||||
Will be shown to the user in reports.
|
||||
Also good for documentation purposes.
|
||||
.It has.cleanup
|
||||
Type: boolean.
|
||||
Optional.
|
||||
.Pp
|
||||
If set to true, specifies that the test case has a cleanup routine that has
|
||||
to be executed by the runtime engine during the cleanup phase of the execution.
|
||||
This property is automatically set by the framework when defining a test case
|
||||
with a cleanup routine, so it should never be set by hand.
|
||||
.It ident
|
||||
Type: textual.
|
||||
Required.
|
||||
.Pp
|
||||
The test case's identifier.
|
||||
Must be unique inside the test program and should be short but descriptive.
|
||||
.It require.arch
|
||||
Type: textual.
|
||||
Optional.
|
||||
.Pp
|
||||
A whitespace separated list of architectures that the test case can be run
|
||||
under without causing errors due to an architecture mismatch.
|
||||
.It require.config
|
||||
Type: textual.
|
||||
Optional.
|
||||
.Pp
|
||||
A whitespace separated list of configuration variables that must be defined
|
||||
to execute the test case.
|
||||
If any of the required variables is not defined, the test case is
|
||||
.Em skipped .
|
||||
.It require.diskspace
|
||||
Type: integer.
|
||||
Optional.
|
||||
Specifies the minimum amount of available disk space needed by the test.
|
||||
The value can have a size suffix such as
|
||||
.Sq K ,
|
||||
.Sq M ,
|
||||
.Sq G
|
||||
or
|
||||
.Sq T
|
||||
to make the amount of bytes easier to type and read.
|
||||
.It require.files
|
||||
Type: textual.
|
||||
Optional.
|
||||
.Pp
|
||||
A whitespace separated list of files that must be present to execute the
|
||||
test case.
|
||||
The names of these files must be absolute paths.
|
||||
If any of the required files is not found, the test case is
|
||||
.Em skipped .
|
||||
.It require.machine
|
||||
Type: textual.
|
||||
Optional.
|
||||
.Pp
|
||||
A whitespace separated list of machine types that the test case can be run
|
||||
under without causing errors due to a machine type mismatch.
|
||||
.It require.memory
|
||||
Type: integer.
|
||||
Optional.
|
||||
Specifies the minimum amount of physical memory needed by the test.
|
||||
The value can have a size suffix such as
|
||||
.Sq K ,
|
||||
.Sq M ,
|
||||
.Sq G
|
||||
or
|
||||
.Sq T
|
||||
to make the amount of bytes easier to type and read.
|
||||
.It require.progs
|
||||
Type: textual.
|
||||
Optional.
|
||||
.Pp
|
||||
A whitespace separated list of programs that must be present to execute
|
||||
the test case.
|
||||
These can be given as plain names, in which case they are looked in the
|
||||
user's
|
||||
.Ev PATH ,
|
||||
or as absolute paths.
|
||||
If any of the required programs is not found, the test case is
|
||||
.Em skipped .
|
||||
.It require.user
|
||||
Type: textual.
|
||||
Optional.
|
||||
.Pp
|
||||
The required privileges to execute the test case.
|
||||
Can be one of
|
||||
.Sq root
|
||||
or
|
||||
.Sq unprivileged .
|
||||
.Pp
|
||||
If the test case is running as a regular user and this property is
|
||||
.Sq root ,
|
||||
the test case is
|
||||
.Em skipped .
|
||||
.Pp
|
||||
If the test case is running as root and this property is
|
||||
.Sq unprivileged ,
|
||||
the runtime engine will automatically drop the privileges if the
|
||||
.Sq unprivileged-user
|
||||
configuration property is set; otherwise the test case is
|
||||
.Em skipped .
|
||||
.It timeout
|
||||
Type: integral.
|
||||
Optional; defaults to
|
||||
.Sq 300 .
|
||||
.Pp
|
||||
Specifies the maximum amount of time the test case can run.
|
||||
This is particularly useful because some tests can stall either because they
|
||||
are incorrectly coded or because they trigger an anomalous behavior of the
|
||||
program.
|
||||
It is not acceptable for these tests to stall the whole execution of the
|
||||
test program.
|
||||
.Pp
|
||||
Can optionally be set to zero, in which case the test case has no run-time
|
||||
limit.
|
||||
This is discouraged.
|
||||
.It X- Ns Sq NAME
|
||||
Type: textual.
|
||||
Optional.
|
||||
.Pp
|
||||
A user-defined property named
|
||||
.Sq NAME .
|
||||
These properties are free form, have no special meaning within ATF, and can
|
||||
be specified at will by the test case.
|
||||
The runtime engine should propagate these properties from the test case to
|
||||
the end user so that the end user can rely on custom properties for test case
|
||||
tagging and classification.
|
||||
.El
|
||||
.Ss Environment
|
||||
Every time a test case is executed, several environment variables are
|
||||
cleared or reseted to sane values to ensure they do not make the test fail
|
||||
due to unexpected conditions.
|
||||
These variables are:
|
||||
.Bl -tag -width LCXMESSAGESXX
|
||||
.It Ev HOME
|
||||
Set to the work directory's path.
|
||||
.It Ev LANG
|
||||
Undefined.
|
||||
.It Ev LC_ALL
|
||||
Undefined.
|
||||
.It Ev LC_COLLATE
|
||||
Undefined.
|
||||
.It Ev LC_CTYPE
|
||||
Undefined.
|
||||
.It Ev LC_MESSAGES
|
||||
Undefined.
|
||||
.It Ev LC_MONETARY
|
||||
Undefined.
|
||||
.It Ev LC_NUMERIC
|
||||
Undefined.
|
||||
.It Ev LC_TIME
|
||||
Undefined.
|
||||
.It Ev TZ
|
||||
Hardcoded to
|
||||
.Sq UTC .
|
||||
.El
|
||||
.Ss Work directories
|
||||
The test program always creates a temporary directory
|
||||
and switches to it before running the test case's body.
|
||||
This way the test case is free to modify its current directory as it
|
||||
wishes, and the runtime engine will be able to clean it up later on in a
|
||||
safe way, removing any traces of its execution from the system.
|
||||
To do so, the runtime engine will perform a recursive removal of the work
|
||||
directory without crossing mount points; if a mount point is found, the
|
||||
file system will be unmounted (if possible).
|
||||
.Ss File creation mode mask (umask)
|
||||
Test cases are always executed with a file creation mode mask (umask) of
|
||||
.Sq 0022 .
|
||||
The test case's code is free to change this during execution.
|
||||
.Sh SEE ALSO
|
||||
.Xr atf-test-program 1
|
||||
@@ -1,5 +0,0 @@
|
||||
libtool.m4
|
||||
ltoptions.m4
|
||||
ltsugar.m4
|
||||
ltversion.m4
|
||||
lt~obsolete.m4
|
||||
@@ -55,11 +55,13 @@ AC_DEFUN([KYUA_DEVELOPER_MODE], [
|
||||
AC_ARG_ENABLE(
|
||||
[developer],
|
||||
AS_HELP_STRING([--enable-developer], [enable developer features]),,
|
||||
[if test -d ${srcdir}/.git; then
|
||||
AC_MSG_NOTICE([building from HEAD; developer mode autoenabled])
|
||||
[if test "x$enable_developer" = x; then
|
||||
if test -d "${srcdir}/.git"; then
|
||||
AC_MSG_NOTICE([building from HEAD (developer mode auto-enabled)])
|
||||
enable_developer=yes
|
||||
else
|
||||
else
|
||||
enable_developer=no
|
||||
fi
|
||||
fi])
|
||||
|
||||
#
|
||||
@@ -70,7 +72,8 @@ AC_DEFUN([KYUA_DEVELOPER_MODE], [
|
||||
# Mac OS X. This is due to the way _IOR is defined.
|
||||
#
|
||||
|
||||
try_c_cxx_flags="-D_FORTIFY_SOURCE=2 \
|
||||
# try_c_cxx_flags="-D_FORTIFY_SOURCE=2 \
|
||||
try_c_cxx_flags=" \
|
||||
-Wall \
|
||||
-Wcast-qual \
|
||||
-Wextra \
|
||||
@@ -98,9 +101,11 @@ AC_DEFUN([KYUA_DEVELOPER_MODE], [
|
||||
-Wsynth"
|
||||
|
||||
if test ${enable_developer} = yes; then
|
||||
AC_MSG_NOTICE([Developer mode enabled])
|
||||
try_werror=yes
|
||||
try_c_cxx_flags="${try_c_cxx_flags} -g -Werror"
|
||||
else
|
||||
AC_MSG_NOTICE([Developer mode disabled])
|
||||
try_werror=no
|
||||
try_c_cxx_flags="${try_c_cxx_flags} -DNDEBUG"
|
||||
fi
|
||||
|
||||
Vendored
+887
-389
File diff suppressed because it is too large.
Load diff
Vendored
+108
-23
@@ -1,14 +1,14 @@
|
||||
# Helper functions for option handling. -*- Autoconf -*-
|
||||
#
|
||||
# Copyright (C) 2004-2005, 2007-2009, 2011-2013 Free Software
|
||||
# Foundation, Inc.
|
||||
# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2024 Free
|
||||
# Software Foundation, Inc.
|
||||
# Written by Gary V. Vaughan, 2004
|
||||
#
|
||||
# This file 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.
|
||||
|
||||
# serial 8 ltoptions.m4
|
||||
# serial 10 ltoptions.m4
|
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
|
||||
@@ -82,6 +82,8 @@ m4_if([$1],[LT_INIT],[
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
|
||||
[_LT_ENABLE_FAST_INSTALL])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
|
||||
[_LT_WITH_AIX_SONAME([aix])])
|
||||
])
|
||||
])# _LT_SET_OPTIONS
|
||||
|
||||
@@ -126,7 +128,7 @@ LT_OPTION_DEFINE([LT_INIT], [win32-dll],
|
||||
[enable_win32_dll=yes
|
||||
|
||||
case $host in
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
|
||||
*-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-cegcc*)
|
||||
AC_CHECK_TOOL(AS, as, false)
|
||||
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
|
||||
AC_CHECK_TOOL(OBJDUMP, objdump, false)
|
||||
@@ -319,32 +321,115 @@ dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
|
||||
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
|
||||
|
||||
|
||||
# _LT_WITH_AIX_SONAME([DEFAULT])
|
||||
# ----------------------------------
|
||||
# implement the --enable-aix-soname configure option, and support the
|
||||
# `aix-soname=aix' and `aix-soname=both' and `aix-soname=svr4' LT_INIT options.
|
||||
# DEFAULT is either `aix', `both', or `svr4'. If omitted, it defaults to `aix'.
|
||||
m4_define([_LT_WITH_AIX_SONAME],
|
||||
[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
|
||||
shared_archive_member_spec=
|
||||
case $host,$enable_shared in
|
||||
power*-*-aix[[5-9]]*,yes)
|
||||
AC_MSG_CHECKING([which variant of shared library versioning to provide])
|
||||
AC_ARG_ENABLE([aix-soname],
|
||||
[AS_HELP_STRING([--enable-aix-soname=aix|svr4|both],
|
||||
[shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
|
||||
[case $enableval in
|
||||
aix|svr4|both)
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([Unknown argument to --enable-aix-soname])
|
||||
;;
|
||||
esac
|
||||
lt_cv_with_aix_soname=$enable_aix_soname],
|
||||
[_AC_ENABLE_IF([with], [aix-soname],
|
||||
[case $withval in
|
||||
aix|svr4|both)
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([Unknown argument to --with-aix-soname])
|
||||
;;
|
||||
esac
|
||||
lt_cv_with_aix_soname=$with_aix_soname],
|
||||
[AC_CACHE_VAL([lt_cv_with_aix_soname],
|
||||
[lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)])
|
||||
enable_aix_soname=$lt_cv_with_aix_soname])
|
||||
with_aix_soname=$enable_aix_soname
|
||||
AC_MSG_RESULT([$with_aix_soname])
|
||||
if test aix != "$with_aix_soname"; then
|
||||
# For the AIX way of multilib, we name the shared archive member
|
||||
# based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
|
||||
# and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
|
||||
# Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
|
||||
# the AIX toolchain works better with OBJECT_MODE set (default 32).
|
||||
if test 64 = "${OBJECT_MODE-32}"; then
|
||||
shared_archive_member_spec=shr_64
|
||||
else
|
||||
shared_archive_member_spec=shr
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
with_aix_soname=aix
|
||||
;;
|
||||
esac
|
||||
|
||||
_LT_DECL([], [shared_archive_member_spec], [0],
|
||||
[Shared archive member basename, for filename based shared library versioning on AIX])dnl
|
||||
])# _LT_WITH_AIX_SONAME
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
|
||||
|
||||
|
||||
# _LT_WITH_PIC([MODE])
|
||||
# --------------------
|
||||
# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
|
||||
# implement the --enable-pic flag, and support the 'pic-only' and 'no-pic'
|
||||
# LT_INIT options.
|
||||
# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'.
|
||||
m4_define([_LT_WITH_PIC],
|
||||
[AC_ARG_WITH([pic],
|
||||
[AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
|
||||
[AC_ARG_ENABLE([pic],
|
||||
[AS_HELP_STRING([--enable-pic@<:@=PKGS@:>@],
|
||||
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
|
||||
[lt_p=${PACKAGE-default}
|
||||
case $withval in
|
||||
yes|no) pic_mode=$withval ;;
|
||||
*)
|
||||
pic_mode=default
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||
for lt_pkg in $withval; do
|
||||
IFS=$lt_save_ifs
|
||||
if test "X$lt_pkg" = "X$lt_p"; then
|
||||
pic_mode=yes
|
||||
fi
|
||||
done
|
||||
IFS=$lt_save_ifs
|
||||
;;
|
||||
esac],
|
||||
[pic_mode=m4_default([$1], [default])])
|
||||
case $enableval in
|
||||
yes|no) pic_mode=$enableval ;;
|
||||
*)
|
||||
pic_mode=default
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||
for lt_pkg in $enableval; do
|
||||
IFS=$lt_save_ifs
|
||||
if test "X$lt_pkg" = "X$lt_p"; then
|
||||
pic_mode=yes
|
||||
fi
|
||||
done
|
||||
IFS=$lt_save_ifs
|
||||
;;
|
||||
esac],
|
||||
[dnl Continue to support --with-pic and --without-pic, for backward
|
||||
dnl compatibility.
|
||||
_AC_ENABLE_IF([with], [pic],
|
||||
[lt_p=${PACKAGE-default}
|
||||
case $withval in
|
||||
yes|no) pic_mode=$withval ;;
|
||||
*)
|
||||
pic_mode=default
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||
for lt_pkg in $withval; do
|
||||
IFS=$lt_save_ifs
|
||||
if test "X$lt_pkg" = "X$lt_p"; then
|
||||
pic_mode=yes
|
||||
fi
|
||||
done
|
||||
IFS=$lt_save_ifs
|
||||
;;
|
||||
esac],
|
||||
[pic_mode=m4_default([$1], [default])])]
|
||||
)
|
||||
|
||||
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
|
||||
])# _LT_WITH_PIC
|
||||
|
||||
Vendored
+1
-1
@@ -1,6 +1,6 @@
|
||||
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 2004-2005, 2007-2008, 2011-2013 Free Software
|
||||
# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2024 Free Software
|
||||
# Foundation, Inc.
|
||||
# Written by Gary V. Vaughan, 2004
|
||||
#
|
||||
|
||||
Vendored
+7
-6
@@ -1,6 +1,7 @@
|
||||
# ltversion.m4 -- version numbers -*- Autoconf -*-
|
||||
#
|
||||
# Copyright (C) 2004, 2011-2013 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2004, 2011-2019, 2021-2024 Free Software Foundation,
|
||||
# Inc.
|
||||
# Written by Scott James Remnant, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
@@ -9,15 +10,15 @@
|
||||
|
||||
# @configure_input@
|
||||
|
||||
# serial 4038 ltversion.m4
|
||||
# serial 4441 ltversion.m4
|
||||
# This file is part of GNU Libtool
|
||||
|
||||
m4_define([LT_PACKAGE_VERSION], [2.4.2.418])
|
||||
m4_define([LT_PACKAGE_REVISION], [2.4.2.418])
|
||||
m4_define([LT_PACKAGE_VERSION], [2.5.4])
|
||||
m4_define([LT_PACKAGE_REVISION], [2.5.4])
|
||||
|
||||
AC_DEFUN([LTVERSION_VERSION],
|
||||
[macro_version='2.4.2.418'
|
||||
macro_revision='2.4.2.418'
|
||||
[macro_version='2.5.4'
|
||||
macro_revision='2.5.4'
|
||||
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
|
||||
_LT_DECL(, macro_revision, 0)
|
||||
])
|
||||
Vendored
+2
-2
@@ -1,7 +1,7 @@
|
||||
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 2004-2005, 2007, 2009, 2011-2013 Free Software
|
||||
# Foundation, Inc.
|
||||
# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2024 Free
|
||||
# Software Foundation, Inc.
|
||||
# Written by Scott James Remnant, 2004.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
|
||||
@@ -54,6 +54,26 @@ test_printf(const char *format, ...)
|
||||
AC_SUBST([ATTRIBUTE_FORMAT_PRINTF], [${value}])
|
||||
])
|
||||
|
||||
AC_DEFUN([ATF_ATTRIBUTE_NONNULL], [
|
||||
AC_CACHE_CHECK(
|
||||
[whether __attribute__((nonnull)) is supported],
|
||||
[kyua_cv_attribute_nonnull], [
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([
|
||||
void func(char *foo __attribute__((nonnull)));
|
||||
])],
|
||||
[kyua_cv_attribute_nonnull=yes],
|
||||
[kyua_cv_attribute_nonnull=no])
|
||||
])
|
||||
if test x"${kyua_cv_attribute_nonnull}" = xyes; then
|
||||
value="__attribute__((nonnull))"
|
||||
else
|
||||
value=""
|
||||
fi
|
||||
AC_SUBST([ATTRIBUTE_NONNULL], [${value}])
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN([ATF_ATTRIBUTE_NORETURN], [
|
||||
dnl XXX This check is overly simple and should be fixed. For example,
|
||||
dnl Sun's cc does support the noreturn attribute but CC (the C++
|
||||
@@ -103,6 +123,7 @@ function(int a __attribute__((__unused__)))
|
||||
|
||||
AC_DEFUN([ATF_MODULE_DEFS], [
|
||||
ATF_ATTRIBUTE_FORMAT_PRINTF
|
||||
ATF_ATTRIBUTE_NONNULL
|
||||
ATF_ATTRIBUTE_NORETURN
|
||||
ATF_ATTRIBUTE_UNUSED
|
||||
])
|
||||
@@ -1,28 +0,0 @@
|
||||
dnl Copyright (c) 2007 The NetBSD Foundation, Inc.
|
||||
dnl All rights reserved.
|
||||
dnl
|
||||
dnl Redistribution and use in source and binary forms, with or without
|
||||
dnl modification, are permitted provided that the following conditions
|
||||
dnl are met:
|
||||
dnl 1. Redistributions of source code must retain the above copyright
|
||||
dnl notice, this list of conditions and the following disclaimer.
|
||||
dnl 2. Redistributions in binary form must reproduce the above copyright
|
||||
dnl notice, this list of conditions and the following disclaimer in the
|
||||
dnl documentation and/or other materials provided with the distribution.
|
||||
dnl
|
||||
dnl THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND
|
||||
dnl CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
dnl INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
dnl MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
dnl IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY
|
||||
dnl DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
dnl DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
dnl GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
dnl INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
||||
dnl IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
dnl OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||
dnl IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
AC_DEFUN([ATF_MODULE_ENV], [
|
||||
AC_CHECK_FUNCS([putenv setenv unsetenv])
|
||||
])
|
||||
@@ -23,6 +23,8 @@
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
CODE_COVERAGE_DIRS+= test-programs
|
||||
|
||||
tests_test_programs_DATA = test-programs/Kyuafile
|
||||
tests_test_programsdir = $(pkgtestsdir)/test-programs
|
||||
EXTRA_DIST += $(tests_test_programs_DATA)
|
||||
|
||||
Loaded 100 of 101 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user