kubo/test
Jakub Sztandera f630222580
make: rework makefiles for non-recursive make and add sharness coverage
This commit introduces non-recursive Makefile infrastructure that replaces current Makefile infrastructure.
It also generally cleanups the Makefiles, separates them into nicer sub-modules and centralizes common operations into single definitions.

It allows to depend on any target that is defined in the makefile, this means that for example `gx install` is called once when `make build test_expensive_sharness` is called instead of 4 or 5 times.

It also makes the dependencies much cleaner and allows for reuse of modules. For example sharness coverage collection (WIP) uses sharness target with amended PATH, previously it might have been possible but not without wiring in the coverage collection into sharness make runner code.

Yes, it is more complex but not much more. There are few rules that have to be followed and few complexities added but IMHO it is worth it.

How to NR-make:
1. If make is to generate some file via a target, it MUST be defined in Rules.mk file in the directory of the target.
2. `Rules.mk` file MUST have `include mk/header.mk` statement as the first line and `include mk/footer.mk` statement as the last line (apart from project root `Rules.mk`).
3. It then MUST be included by the closest `Rules.mk` file up the directory tree.
4. Inside a `Rules.mk` special variable accessed as `$(d)` is defined. Its value is current directory, use it so if the `Rules.mk` file is moved in the tree it still works without a problem. Caution: this variable is not available in the recipe part and MUST NOT be used. Use name of the target or prerequisite to extract it if you need it.
5. Make has only one global scope, this means that name conflicts are a thing. Names SHOULD  follow `VAR_NAME_$(d)` convention. There are exceptions from this rule in form of well defined global variables. Examples: General lists `TGT_BIN`, `CLEAN`; General targets: `TEST`, `COVERAGE`; General variables: `GOFLAGS`, `DEPS_GO`.
3. Any rules, definitions or variables that fit some family SHOULD be defined in `mk/$family.mk` file and included from project root `Rules.mk`

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2017-02-12 01:18:40 +01:00
..
3nodetest docker: make dockerfile differences more obvious 2016-06-03 02:12:31 +02:00
api-startup misc: add test for api readiness 2015-02-15 04:41:18 -08:00
bench docs: decapitalize IPFS where possible 2016-10-27 22:54:36 -07:00
bin make: rework makefiles for non-recursive make and add sharness coverage 2017-02-12 01:18:40 +01:00
dependencies test: introduce go-timeout 2016-09-01 15:59:11 +02:00
integration update go-libp2p with negotiate lazy fixes 2017-01-10 14:52:00 -08:00
sharness make: rework makefiles for non-recursive make and add sharness coverage 2017-02-12 01:18:40 +01:00
supernode_client bubble up go-datastore deps 2016-11-28 22:29:38 -08:00
.gitignore test: add IPFS-BUILD-OPTIONS to .gitignore 2015-04-06 18:06:24 +02:00
ipfs-test-lib.sh ipfs-test-lib: fix test_fsh arg quoting 2016-08-15 12:10:15 +02:00
README.md test/README: update sharness test coverage 2015-04-02 11:56:49 +02:00
Rules.mk make: rework makefiles for non-recursive make and add sharness coverage 2017-02-12 01:18:40 +01:00
sharness_test_coverage_helper.sh coverage_helper: better group long and short options 2015-10-24 11:22:53 +02:00

Sharness test command coverage

Module Online Test Offline Test
object t0051 t0051
ls t0045 t0045
cat t0040
dht
bitswap
block t0050
daemon t0030 N/A
init N/A t0020
add t0040
config t0021 t0021
version t0060 t0010
ping
diag
mount t0030
name t0110 t0100
pin t0080
get t0090 t0090
refs t0080
repo gc t0080
id
bootstrap t0120 t0120
swarm
update
commands