Commit graph

31 commits

Author SHA1 Message Date
John Ericson
9afa697ab6 Refactor bash test build system a bit
The basic idea here is to separate a few intertwined notions:

1. Not all "run bash tests" are "install tests"

2. Not all "run bash tests" use `tests/functional/init.sh`, or any
   pre-test initialization at all.

This will used in the next commit when we have a test that check unit
test golden master data.

Also, move our custom `PS4` from the test to the test runner, as it is
part of how we want to display the tests, not the test themselves.

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-11-10 11:02:37 -05:00
John Ericson
259e328de8 Introduce notion of a test group, use for CA tests
Grouping our tests should make it easier to understand the intent than
one long poorly-arranged list. It also is convenient for running just
the tests for a specific component when working on that component.

We need at least one test group so this isn't dead code; I decided to
collect the tests for the `ca-derivations` and `dynamic-derivations`
experimental features in groups. Do
```bash
make ca.test-group -jN
```
and
```bash
make dyn-drv.test-group -jN
```
to try running just them.

I originally did this as part of #8397 for being able to just the local
overlay store alone. I am PRing it separately now so we can separate
general infra from new features.

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-07-18 09:31:13 -04:00
John Ericson
f7c896cfd8 Dedup some markdown -> C++ big literal stuff in build system
This pattern rule was unwisely hidden in `src/libstore/local.mk`. Now it
is properly in `mk/` and we reuse it for the profile docs too.
2023-05-15 10:38:11 -04:00
Alyssa Ross
4f80464645
Apply OS checks to host platform, not build
Previously, the build system used uname(1) output when it wanted to
check the operating system it was being built for, which meant that it
didn't take into-account cross-compilation when the build and host
operating systems were different.

To fix this, instead of consulting uname output, we consult the host
triple, specifically the third "kernel" part.

For "kernel"s with stable ABIs, like Linux or Cygwin, we can use a
simple ifeq to test whether we're compiling for that system, but for
other platforms, like Darwin, FreeBSD, or Solaris, we have to use a
more complicated check to take into account the version numbers at the
end of the "kernel"s.  I couldn't find a way to just strip these
version numbers in GNU Make without shelling out, which would be even
more ugly IMO.  Because these checks differ between kernels, and the
patsubst ones are quite fiddly, I've added variables for each host OS
we might want to check to make them easier to reuse.
2021-06-23 15:00:36 +00:00
Eelco Dolstra
99b93773de
Merge pull request #4582 from puckipedia/cppflags
mk: add support for CPPFLAGS
2021-03-01 13:08:14 +01:00
Puck Meerburg
2d7917f035 Revert "Add support for building JARs from Java sources"
This reverts commit 259086de84.
2021-02-26 23:06:58 +00:00
Puck Meerburg
bd0b0f9ab7 mk: add support for CPPFLAGS 2021-02-26 22:56:51 +00:00
Eelco Dolstra
8ad2c9c4b9 Remove 'dist' target
We're not producing source tarballs anymore so this has been
bitrotting.
2020-12-03 16:17:58 +01:00
Eelco Dolstra
e5bf81256c
Fix Perl bindings 2019-11-07 12:18:37 +01:00
Eelco Dolstra
5ff4d77f55
Precompile headers
This cuts 'make install -j6' on my laptop from 170s to 134s.
2019-11-07 10:12:35 +01:00
David McFarland
d35231ec60 set _GNU_SOURCE on cygwin
this is needed for pipe2()
2017-04-21 11:27:27 -03:00
Manuel Jacob
c999ef70e8 Don't pass "--no-copy-dt-needed-entries" option to linker on FreeBSD.
Eventually the nested if statements should be replaced by a more general
condition, but this is sufficient to make it work on FreeBSD.
2015-10-06 22:28:30 +02:00
Eelco Dolstra
8bdff8c100 Merge branch 'cygwin-master' of https://github.com/ternaris/nix 2014-12-14 01:49:14 +01:00
Eelco Dolstra
14955c297d Merge commit '36c67860363c93eb00cf5b8e2ad34f6f775e6901' 2014-12-14 01:47:06 +01:00
Marko Durkovic
936f68668c Set custom compiler flags on Cygwin 2014-12-09 13:00:59 +01:00
Eelco Dolstra
daa16cca11 Sync with make-rules repo 2014-04-03 17:37:14 +02:00
Eelco Dolstra
4ee6001f95 GNU Make 3.81 compatibility
3.81 doesn't understand the ‘define foo =’ syntax, which was added in
3.82.  So use ‘define foo’ instead.
2014-02-04 11:21:13 +01:00
Eelco Dolstra
74ca70da3a Add 'mk/' from commit '1eff3ad37fdb9dcf9f8528fdacea0ebf0e79d545'
git-subtree-dir: mk
git-subtree-mainline: 6ef32bddc1
git-subtree-split: 1eff3ad37f
2014-02-01 14:38:28 +01:00
Eelco Dolstra
568b1b0a8a Remove mk subdirectory in preparation for "git subtree" 2014-01-09 16:15:16 +01:00
Eelco Dolstra
55c9a40613 Move stuff to top-level
This makes it easier to use with "git subtree".
2014-01-09 16:12:02 +01:00
Eelco Dolstra
259086de84 Add support for building JARs from Java sources 2013-12-18 16:40:48 +01:00
Eelco Dolstra
99ed25accf Add a function for doing recursive wildcard searches
Source: http://blog.jgc.org/2011/07/gnu-make-recursive-wildcard-function.html
2013-12-18 15:01:14 +01:00
Eelco Dolstra
088552b319 Set default installation paths 2013-12-17 12:13:48 +01:00
Eelco Dolstra
034bbcafaf Add 'make help' 2013-12-12 11:27:47 +01:00
Eelco Dolstra
45131da736 Get rid of whitespace in $(d) 2013-12-12 11:24:03 +01:00
Eelco Dolstra
49a385096e Initial commit (imported from the Nix repo) 2013-12-10 15:54:34 +01:00
Eelco Dolstra
0202ce6b94 Add support for ‘make installcheck’ 2013-11-25 18:47:03 +01:00
Eelco Dolstra
9285f0aa2b Add a Makefile for the Perl stuff 2013-11-25 16:38:33 +00:00
Eelco Dolstra
962551a071 Add a Makefile for the scripts directory 2013-11-25 15:17:16 +00:00
Eelco Dolstra
ed0a8dd71a Add a function for instantiating Autoconf *.in files 2013-11-25 10:16:07 +00:00
Eelco Dolstra
f980755766 Split Makefile.lib into several *.mk files 2013-11-25 09:50:35 +00:00