Commit Graph

32 Commits

Author SHA1 Message Date
Marcin Rataj
82467bc936 refactor: rename to kubo 2022-07-06 18:40:37 +02:00
Steven Allen
fed5f05134 build: simplify on gofmt 2021-02-08 12:44:15 -08:00
Steven Allen
585731074e test(graphsync): test server-side graphsync 2020-02-26 09:11:17 -08:00
Steven Allen
a8fbd066d7 make: move all test deps to a separate module
1. This means those deps don't get pulled in unless we actually need to test.
2. It means we can cordon all the golangci-lint module replace hacks off into a
   separate package.
2019-09-11 11:43:50 -07:00
Steven Allen
037382239d build: switch from megacheck to golangci-lint
(which includes megacheck)

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2019-05-14 09:38:29 -07:00
Jakub Sztandera
061128d1d3 mk: fix make install by not setting GOBIN
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2019-03-06 22:21:14 +01:00
Jakub Sztandera
93c75321fb make: Replace json-to-junit with gotestsum
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2019-03-05 18:33:58 +01:00
Jakub Sztandera
27f73fa7e4 gomod: use test binaries from go modules
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2019-03-05 18:33:58 +01:00
Jakub Sztandera
3e199ab3f7 mk: s/go-build/go-build-relative/
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2019-03-05 18:33:58 +01:00
Łukasz Magiera
d8a92224a7 ci: test on 32bit os
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2019-03-04 19:20:51 -08:00
Travis Person
569eeb8f82 Update IPTB test - WIP
Related to #5521

License: MIT
Signed-off-by: Travis Person <travis@protocol.ai>
2018-11-01 19:33:05 -07:00
Łukasz Magiera
23ddc26025 ci: Coverage and Junit xmls in one run
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2018-10-29 18:44:49 +01:00
Steven Allen
0252710020 remove Godeps
fixes #2722

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-09-11 12:11:24 -07:00
Steven Allen
aef8eec279 fix cid-fmt import path
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-08-21 17:47:14 -07:00
Kevin Atkinson
1e7b2559e4 Include cid-fmt binary in test/bin.
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2018-07-28 02:28:27 -04:00
Łukasz Magiera
ad1dc5f405 Corenet API: Use simple util instead of socat for tests
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2017-05-31 11:33:17 +02:00
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
Jakub Sztandera
f59751d1a2
test: remove time-out script, use go-timeout instead
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2016-09-01 15:59:12 +02:00
Jakub Sztandera
628e458e7d Add regression sharness test for ipfs init
This tests expects ipfs init with no arguments to work
even with occuipied stdin.
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2016-06-13 13:09:52 +02:00
Jakub Sztandera
4190076c66 Add the time-out script
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2016-06-13 13:09:52 +02:00
Christian Couder
2dd4f40c10 test/bin: remove ipfs-pin-stat
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2016-01-18 21:37:44 +01:00
Christian Couder
cd9c9a6525 .gitignore: clean up how 'test/bin' content is ignored
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2016-01-15 10:43:29 +01:00
Christian Couder
e6201151c6 t0081: fix greping pin type
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2016-01-15 10:27:21 +01:00
rht
1e38f71a38 Add gofmt check 2015-05-19 06:11:15 +07:00
Jeromy
0a6b880bee fix for #1008 and other pinning fixes
This commit adds a new set of sharness tests for pinning, and addresses
bugs that were pointed out by said tests.

test/sharness: added more pinning tests

Pinning is currently broken. See issue #1051. This commit introduces
a few more pinning tests. These are by no means exhaustive, but
definitely surface the present problems going on. I believe these
tests are correct, but not sure. Pushing them as failing so that
pinning is fixed in this PR.

make pinning and merkledag.Get take contexts

improve 'add' commands usage of pinning

FIXUP: fix 'pin lists look good'

ipfs-pin-stat simple script to help check pinning

This is a simple shell script to help check pinning.

We ought to strive towards making adding commands this easy.
The http api is great and powerful, but our setup right now
gets in the way. Perhaps we can clean up that area.

updated t0081-repo-pinning

- fixed a couple bugs with the tests
- made it a bit clearer (still a lot going on)
- the remaining tests are correct and highlight a problem with
  pinning. Namely, that recursive pinning is buggy. At least:
  towards the end of the test, $HASH_DIR4 and $HASH_FILE4 should
  be pinned indirectly, but they're not. And thus get gc-ed out.
  There may be other problems too.

cc @whyrusleeping

fix grep params for context deadline check

fix bugs in pin and pin tests

check for block local before checking recursive pin
2015-04-19 23:40:25 -07:00
Tor Arne Vestbø
d36a9eef2b Ensure IPFS-BUILD-OPTIONS build dependency is created
If the file doesn't exist, make will conclude that the missing
prerequisite should trigger a rebuild of the binaries.
2015-04-07 21:09:45 +02:00
Christian Couder
a2c41e650d test/bin: add checkflags to detect flag changes
This script can be used in a Makefile to detect flag changes
and to save the new flags in a file.

License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-04-06 17:59:49 +02:00
Christian Couder
6cc0a6b1de test/bin: fix continueyn on Linux
It looks like there were two problems:

- "read" command probably needs the name of the variable
  it reads into

- [[ didn't work

This might be because on Linux /bin/sh is sometimes not
bash. For example on Ubuntu it is a symlink to dash.

License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-03-16 20:02:02 +01:00
Christian Couder
bbb6196d12 Delete test/bin/fsh
It has been replaced with test_fsh().

License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-02-04 22:01:03 +01:00
Juan Batiz-Benet
be4191d800 sharness: nice verbose ouput
Make sharness tests' output helpful when verbose.
This means cating certain files, or running diagnostic
commands. I used a construction like:

    test_expect_success ".go-ipfs/ has been created" '
      test -d ".go-ipfs" &&
      test -f ".go-ipfs/config" &&
      test -d ".go-ipfs/datastore" ||
      fsh ls -al .go-ipfs
    '

The `|| ...` is a diagnostic run when the preceding command
fails. `fsh` is a trivial script that echoes the args, runs
the cmd, and then also fails, making sure the test case fails.
(wouldnt want the diagnostic accidentally returning true and
making it _seem_ like the test case succeeded).
2015-01-04 22:22:33 -08:00
Juan Batiz-Benet
a9da519715 test/countineyn terminal and error code 2014-12-09 02:24:11 -08:00
Juan Batiz-Benet
b0e251bda1 Makefile: add test_all_commits 2014-12-08 20:39:00 -08:00