mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-24 21:40:03 +00:00
Makefile targets for ctail and ntu
This commit is contained in:
parent
7d3160b0b5
commit
4275abbefe
14
.editorconfig
Normal file
14
.editorconfig
Normal file
@ -0,0 +1,14 @@
|
||||
root = true
|
||||
|
||||
[*.nim]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.sh]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[Makefile]
|
||||
ident_size = 2
|
||||
ident_style = tab
|
||||
|
21
Makefile
21
Makefile
@ -15,23 +15,24 @@ BUILD_SYSTEM_DIR := vendor/nimbus-build-system
|
||||
|
||||
# unconditionally built by the default Make target
|
||||
TOOLS := \
|
||||
validator_client \
|
||||
beacon_node \
|
||||
block_sim \
|
||||
deposit_contract \
|
||||
inspector \
|
||||
logtrace \
|
||||
deposit_contract \
|
||||
nbench \
|
||||
nbench_spec_scenarios \
|
||||
ncli_db \
|
||||
ncli_hash_tree_root \
|
||||
ncli_pretty \
|
||||
ncli_query \
|
||||
ncli_transition \
|
||||
ncli_db \
|
||||
process_dashboard \
|
||||
stack_sizes \
|
||||
state_sim \
|
||||
block_sim \
|
||||
nbench \
|
||||
nbench_spec_scenarios
|
||||
validator_client \
|
||||
# bench_bls_sig_agggregation TODO reenable after bls v0.10.1 changes
|
||||
|
||||
TOOLS_DIRS := \
|
||||
beacon_chain \
|
||||
benchmarks \
|
||||
@ -167,6 +168,14 @@ witti: | build deps
|
||||
witti-dev: | build deps
|
||||
NIM_PARAMS="$(subst ",\",$(NIM_PARAMS))" LOG_LEVEL="DEBUG; TRACE:discv5,networking; REQUIRED:none; DISABLED:none" $(ENV_SCRIPT) nim $(NIM_PARAMS) scripts/connect_to_testnet.nims $(SCRIPT_PARAMS) shared/witti
|
||||
|
||||
ctail: | build deps
|
||||
mkdir -p vendor/.nimble/bin/
|
||||
$(ENV_SCRIPT) nim -d:danger -o:vendor/.nimble/bin/ctail c vendor/nim-chronicles-tail/ctail.nim
|
||||
|
||||
ntu: | build deps
|
||||
mkdir -p vendor/.nimble/bin/
|
||||
$(ENV_SCRIPT) nim -d:danger -o:vendor/.nimble/bin/ntu c vendor/nim-testutils/ntu.nim
|
||||
|
||||
clean: | clean-common
|
||||
rm -rf build/{$(TOOLS_CSV),all_tests,*_node,*ssz*,beacon_node_*,block_sim,state_sim,transition*}
|
||||
ifneq ($(USE_LIBBACKTRACE), 0)
|
||||
|
@ -43,6 +43,9 @@ else:
|
||||
|
||||
# switch("define", "snappy_implementation=libp2p")
|
||||
|
||||
const currentDir = currentSourcePath()[0 .. ^(len("config.nims") + 1)]
|
||||
switch("define", "nim_compiler_path=" & currentDir & "env.sh nim")
|
||||
|
||||
switch("import", "testutils/moduletests")
|
||||
|
||||
const useLibStackTrace = not defined(macosx) and
|
||||
|
@ -1,5 +1,6 @@
|
||||
import os except dirExists
|
||||
import strformat, confutils
|
||||
import testutils/fuzzing_engines
|
||||
|
||||
const
|
||||
gitRoot = thisDir() / ".."
|
||||
@ -10,13 +11,8 @@ const
|
||||
|
||||
fuzzNims = gitRoot / "vendor" / "nim-testutils" / "testutils" / "fuzzing" / "fuzz.nims"
|
||||
|
||||
type
|
||||
FuzzerKind = enum
|
||||
libFuzzer
|
||||
afl
|
||||
|
||||
cli do (testname {.argument.}: string,
|
||||
fuzzer = libFuzzer):
|
||||
fuzzer = defaultFuzzingEngine):
|
||||
|
||||
if not dirExists(fixturesDir):
|
||||
echo "Please run `make test` first in order to download the official ETH2 test vectors"
|
||||
@ -43,5 +39,5 @@ cli do (testname {.argument.}: string,
|
||||
|
||||
let testProgram = fuzzingTestsDir / &"ssz_decode_{testname}.nim"
|
||||
|
||||
exec &"""nim "{fuzzNims}" "{fuzzer}" "{testProgram}" "{corpusDir}" """
|
||||
exec &"""ntu fuzz --fuzzer={fuzzer} --corpus="{corpusDir}" "{testProgram}" """
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user