aboutsummaryrefslogtreecommitdiff
path: root/libexec/atf
Commit message (Collapse)AuthorAgeFilesLines
* atf, kyua: Implement require.kmods.Dag-Erling Smørgrav2025-05-311-0/+1
| | | | | | | | | | This adds a metadata variable, require.kmods, and corresponding functions or methods in C, C++, and shell, which allow a test to specify that it requires particular kernel modules to run. If the kernel modules are not present, the test is skipped. One might want to consider a kyua option which makes it attempt to load the modules instead. Differential Revision: https://reviews.freebsd.org/D47470
* atf: Switch from std::auto_ptr<> to std::unique_ptr<>John Baldwin2025-04-162-7/+0
| | | | | | | This mirrors upstream commit f053ab687f6e27aa264f599ecbfc5ef27ad4e2d3. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D49789
* src: Use gnu++17 as the default C++ standardJohn Baldwin2025-04-111-1/+0
| | | | | | | | | | | | | | | | | | | | | | Previously the compiler's default C++ standard was used unlike C where bsd.sys.mk explicitly sets a default language version. Setting an explicit default version will give a more uniform experience across different compilers and compiler versions. gnu++17 was chosen to match the default C standard. It is well supported by a wide range of clang (5+) and GCC (9+) versions. gnu++17 is also the default C++ standard in recent versions of clang (16+) and GCC (11+). As a result, many of the explicit CXXSTD settings in Makefiles had the effect of lowering the C++ standard instead of raising it as was originally intended and are removed. Note that the remaining explicit CXXSTD settings for atf and liblutok explicitly lower the standard to C++11 due to use of the deprecated auto_ptr<> template which is removed in later versions. Reviewed by: imp, asomers, dim, emaste Differential Revision: https://reviews.freebsd.org/D49223
* Update Makefile.depend filesSimon J. Gerraty2024-10-141-0/+18
| | | | | | | After building packages we have a number of new and updated Makefile.depend files Reviewed by: stevek
* Remove residual blank line at start of MakefileWarner Losh2024-07-154-4/+0
| | | | | | | This is a residual of the $FreeBSD$ removal. MFC After: 3 days (though I'll just run the command on the branches) Sponsored by: Netflix
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-1613-13/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* atf_pytest_wrapper: fix use with pytest-7.4Kristof Provost2023-07-211-0/+2
| | | | | | | | | | | | | | As of pytest 7.4 it no longer walks all the way to the root directory of the file system to find conftest files. As a result we don't find / usr/tests/conftest.py, and don't load atf_python. That in turn causes atf_python tests to fail. Explicitly set the confcutdir, as advised by the pytest changelog. See also: https://github.com/pytest-dev/pytest/pull/11043 MFC after: 3 weeks Sponsored by: Orange Business Services Differential Revision: https://reviews.freebsd.org/D41064
* Update/fix Makefile.depend for userlandSimon J. Gerraty2023-04-192-2/+0
|
* atf_pytest_wrapper: fix pytest output truncationJose Luis Duran2022-12-281-27/+28
| | | | | | | | Pass `-vv` to pytest in order to always get the full output. While here, enforce the modeline. Differential Revision: https://reviews.freebsd.org/D37894 MFC after: 2 weeks
* Explicitly set CXXSTD to c++11 for old C++ code using std::auto_ptr<>.John Baldwin2022-12-051-0/+1
| | | | | | | | | GCC 12 defaults to C++17 which removes (not just deprecates) std::auto_ptr<>. Trying to use CXXSTD of c++03 doesn't work with libc++ headers, but c++11 does. Reviewed by: brooks, imp, emaste Differential Revision: https://reviews.freebsd.org/D37531
* testing: provide meaningful error when pytest is not availableAlexander V. Chernikov2022-07-061-3/+20
| | | | | | | | | atf format does not provide any way of signalling any error message back to the atf runner when listing tests. Work this around by reporting "__test_cases_list_pytest_binary_not_found__" test instead. Reviewed By: kp Differential Revision: https://reviews.freebsd.org/D35721
* testing: pass ATF vars to pytest via env instead of arguments.Alexander V. Chernikov2022-06-281-7/+22
| | | | | | | | | | | | | | This change is a continuation of 9c42645a1e4d workaround. Apparently pytest argument parser is not happy when parsing values with spaces or just more than one --atf-var argument. Switch wrapper to send these kv pairs as env variables. Specifically, use _ATF_VAR_key=value format to distinguish from the other vars. Add the `atf_vars` fixture returning all passed kv pairs as a dict. Reviewed by: lwhsu Differential Revision: https://reviews.freebsd.org/D35625 MFC after: 2 weeks
* testing: workaround pytest parser bug in pytest-atf-wrapper.Alexander V. Chernikov2022-06-271-4/+6
| | | | | | Reviewed by: lwhsu, kp Differential Revision: https://reviews.freebsd.org/D35614 MFC after: 2 weeks
* testing: move atf-pytest-wrapper to /usr/libexecAlexander V. Chernikov2022-06-263-1/+203
| | | | | | | | | | | Move pytest wrapper to the collection of the other atf wrappers in libexec. It solves the problem of combining bits & pieces from bsd.test.mk and bgs.prog.mk to address "test binary, but not the suite binary". Reviewed by: kp Differential Revision: https://reviews.freebsd.org/D35604 MFC after: 2 weeks
* pkgbase: Install atf and kyua in the tests packageEmmanuel Vadot2021-01-042-0/+3
| | | | | | | While here make sure that all tests dirs are taggued correctly. Reviewed by: bapt, emaste Differential Revision: https://reviews.freebsd.org/D27714
* Another round of attempting to squelch -Wdeprecated-declarations, whichDimitry Andric2019-09-172-0/+6
| | | | | | | | | | | | has become very trigger-happy with libc++ 9.0.0. It does not help that gcc's implementation of this warning is even more trigger-happy, in the sense that it already warns on the declaration itself, not when you are using it. This is very annoying with our use of -Wsystem-headers. That should really be disabled for gcc. Notes: svn path=/projects/clang900-import/; revision=352435
* Instead of disabling gcc's deprecated declaration warnings about e.g.Dimitry Andric2019-09-142-6/+0
| | | | | | | | | std::auto_ptr in a whole bunch of individual Makefiles, make the warning globally non-fatal instead. This is similar to what was done to many more non-fatal warnings from newer gcc versions. Notes: svn path=/projects/clang900-import/; revision=352335
* Add workarounds for obsolete std::auto_ptr usage in atf.Dimitry Andric2019-09-032-0/+6
| | | | Notes: svn path=/projects/clang900-import/; revision=351731
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-312-2/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* Add HAS_TESTS to all Makefiles that are currently using theEnji Cooper2017-08-022-0/+2
| | | | | | | | | `SUBDIR.${MK_TESTS}+= tests` idiom. This is a follow up to r321912. Notes: svn path=/projects/make-check-sandbox/; revision=321914
* Convert traditional ${MK_TESTS} conditional idiom for including testEnji Cooper2017-08-022-6/+2
| | | | | | | | | | | | | | directories to SUBDIR.${MK_TESTS} idiom This is being done to pave the way for future work (and homogenity) in ^/projects/make-check-sandbox . No functional change intended. MFC after: 1 weeks Notes: svn path=/head/; revision=321912
* atf-sh(3): document atf_init_test_cases(3) fullyEnji Cooper2017-06-301-0/+1
| | | | | | | | | | The function was missing from the NAME/SYNOPSIS sections. Add a manpage link to complete the documentation reference. MFC after: 1 month Notes: svn path=/head/; revision=320491
* Add MLINKS for atf-sh(3) to each of the functions it implementsEnji Cooper2017-06-071-1/+23
| | | | | | | | | | | This hopefully will make atf-sh(3) easier to understand for newcomers, without having to go through the atf-sh(3) level of indirection. MFC after: 1 week Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=319662
* Revert r319659Enji Cooper2017-06-071-1/+0
| | | | | | | | | | | | I missed the fact that atf-sh(3) already documents atf_check(3). I'll be adding an manpage link for that instead in the next commit. MFC after: 1 week MFC with: r319659 Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=319660
* Add an MLINK for atf_check(1) -> atf-check(1)Enji Cooper2017-06-071-0/+1
| | | | | | | | | | | | This is being done to make the documentation for atf-check(1) easier to find/more intuitive for new users, because atf_check is the atf-run(1) shell version of the standalone atf-check(1) command, which is used in atf-sh(3) test programs. MFC after: 1 week Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=319659
* Use SRCTOP instead of the longhand version for defining the path to contrib/atfEnji Cooper2016-09-202-2/+2
| | | | | | | | MFC after: 3 days Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=306029
* Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installedEnji Cooper2016-05-043-20/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | after r298107 Summary of changes: - Replace all instances of FILES/TESTS with ${PACKAGE}FILES. This ensures that namespacing is kept with FILES appropriately, and that this shouldn't need to be repeated if the namespace changes -- only the definition of PACKAGE needs to be changed - Allow PACKAGE to be overridden by callers instead of forcing it to always be `tests`. In the event we get to the point where things can be split up enough in the base system, it would make more sense to group the tests with the blocks they're a part of, e.g. byacc with byacc-tests, etc - Remove PACKAGE definitions where possible, i.e. where FILES wasn't used previously. - Remove unnecessary TESTSPACKAGE definitions; this has been elided into bsd.tests.mk - Remove unnecessary BINDIRs used previously with ${PACKAGE}FILES; ${PACKAGE}FILESDIR is now automatically defined in bsd.test.mk. - Fix installation of files under data/ subdirectories in lib/libc/tests/hash and lib/libc/tests/net/getaddrinfo - Remove unnecessary .include <bsd.own.mk>s (some opportunistic cleanup) Document the proposed changes in share/examples/tests/tests/... via examples so it's clear that ${PACKAGES}FILES is the suggested way forward in terms of replacing FILES. share/mk/bsd.README didn't seem like the appropriate method of communicating that info. MFC after: never probably X-MFC with: r298107 PR: 209114 Relnotes: yes Tested with: buildworld, installworld, checkworld; buildworld, packageworld Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=299094
* Fix including Kyuafile in packaged base system.Glen Barber2016-04-292-2/+4
| | | | | | | | | | | | | | | Fix a related typo while here. Note, this change results in the Kyuafile inclusion in the runtime package, which needs to be fixed, however addresses the PR as far as I can tell in my tests. PR: 209114 Submitted by: ngie Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=298768
* MFHGlen Barber2016-03-103-0/+33
|\ | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=296625
| * DIRDEPS_BUILD: Connect MK_TESTS.Bryan Drewery2016-03-093-0/+33
| | | | | | | | | | | | | | Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=296587
* | More 'tests' packaging fixes.Glen Barber2016-02-032-0/+9
| | | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=295216
* | First pass to fix the 'tests' packages.Glen Barber2016-02-021-0/+5
|/ | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=295171
* Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) andEnji Cooper2015-10-123-9/+3
| | | | | | | | | | | | | | | netbsd-tests.test.mk (r289151) - Eliminate explicit OBJTOP/SRCTOP setting - Convert all ad hoc NetBSD test integration over to netbsd-tests.test.mk - Remove unnecessary TESTSDIR setting - Use SRCTOP where possible for clarity MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Divison Notes: svn path=/head/; revision=289172
* Add META_MODE support.Simon J. Gerraty2015-06-132-0/+46
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-082-4/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Merge sync of headSimon J. Gerraty2015-05-272-6/+2
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=283595
| * Merge from head@274682Simon J. Gerraty2014-11-193-7/+9
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=274683
| * \ Merge head from 7/28Simon J. Gerraty2014-08-196-4/+115
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=270164
| * | | Updated dependenciesSimon J. Gerraty2014-05-161-2/+3
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * | | Merge from headSimon J. Gerraty2014-05-081-0/+1
| |\ \ \ | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265720
| * \ \ \ Merge headSimon J. Gerraty2014-04-286-3/+31
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265044
| * | | | | Updated dependenciesSimon J. Gerraty2013-03-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * | | | | Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * | | | | Updated/new Makefile.dependSimon J. Gerraty2012-11-081-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=242788
* | | | | | Convert to LIBADDBaptiste Daroussin2014-11-252-6/+2
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce overlinking Notes: svn path=/head/; revision=275077
* | | | | MFV: Import atf-0.21.Julio Merino2014-11-013-3/+7
| | | | | | | | | | | | | | | | | | | | Notes: svn path=/head/; revision=273929
* | | | | Rework privatelib/internallibBaptiste Daroussin2014-08-062-4/+2
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure everything linking to a privatelib and/or an internallib does it directly from the OBJDIR rather than DESTDIR. Add src.libnames.mk so bsd.libnames.mk is not polluted by libraries not existsing in final installation Introduce the LD* variable which is what ld(1) is expecting (via LDADD) to link to internal/privatelib Directly link to the .so in case of private library to avoid having to complexify LDFLAGS. Phabric: https://phabric.freebsd.org/D553 Reviewed by: imp, emaste Notes: svn path=/head/; revision=269648
* | | | Fix atf-sh's integration_testJulio Merino2014-07-091-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the move of atf-sh into /usr/libexec in r267181, some of the tests in the integration_test program broke because they could not execute atf-sh from the path any longer. This slipped through because I do have a local atf installation in my home directory that appears in my path, hence the tests could still execute my own version. Fix this by forcing /usr/libexec to appear at the beginning of the path when attempting to execute atf-sh. To make upgrading easy (and to avoid an unnecessary entry in UPDATING), make integration_test depend on the Makefile so that a rebuild of the shell script is triggered. This requires a hack in the *.test.mk files to ensure the Makefile is not treated as a source to the generated program. Ugly, I know, but I don't have a better way of doing this at the moment. Will think of one once I address the TODO in the *.test.mk files that suggests generalizing the file generation functionality. PR: 191052 Reviewed by: Garrett Cooper Notes: svn path=/head/; revision=268445
* | | | Move atf-sh from /usr/bin/ to /usr/libexec/Julio Merino2014-06-065-2/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In r266650, we made libatf-c and libatf-c++ private libraries so that no components outside of the source tree could unintendedly depend on them. This change does the same for the "atf-sh library" by moving the atf-sh interpreter from its public location in /usr/bin/ to the private location in /usr/libexec/. Our build system will ensure that our own test programs use the right binary, but users won't be able to depend on atf-sh by "mistake". Committing this now to ride the UPDATING notice added with r267172 today. Notes: svn path=/head/; revision=267181
* | | | Change libatf-c and libatf-c++ to be private libraries.Julio Merino2014-05-251-2/+2
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We should not be leaking these interfaces to the outside world given that it's much easier for third-party components to use the devel/atf package from ports. As a side-effect, we can also drop the ATF pkgconfig and aclocal files from the base system. Nothing in the base system needs these, and it was quite ugly to have to get them installed only so that a few ports could build. The offending ports have been fixed to depend on devel/atf explicitly. Reviewed by: bapt Notes: svn path=/head/; revision=266650