[wip] support in Makefile, codex.nimble; git ignore scratch/
This commit is contained in:
parent
ebc98c4a09
commit
ea2a5acbaa
|
@ -13,6 +13,9 @@ build/
|
|||
# Coverage data shall be put in an ignored coverage/ directory
|
||||
coverage/
|
||||
|
||||
# Shallow clone of the repo will be placed her for use with testground
|
||||
scratch/
|
||||
|
||||
# Nimble packages
|
||||
/vendor/.nimble
|
||||
|
||||
|
|
10
Makefile
10
Makefile
|
@ -24,8 +24,10 @@ LINK_PCRE := 0
|
|||
clean \
|
||||
coverage \
|
||||
deps \
|
||||
hello_codex \
|
||||
libbacktrace \
|
||||
test \
|
||||
testground \
|
||||
update
|
||||
|
||||
ifeq ($(NIM_PARAMS),)
|
||||
|
@ -123,6 +125,14 @@ coverage:
|
|||
genhtml coverage/coverage.f.info --output-directory coverage/report
|
||||
if which open >/dev/null; then (echo -e "\e[92mOpening\e[39m HTML coverage report in browser..." && open coverage/report/index.html) || true; fi
|
||||
|
||||
testground:
|
||||
mkdir -p scratch && rm -rf scratch/* && git clone --depth=1 "file://$${PWD}" "scratch/$$(basename $${PWD})"
|
||||
testground plan import --from=testground/hello_codex
|
||||
testground run single --builder=docker:generic --runner=local:docker --plan=hello_codex --testcase=hello_codex --instances=2
|
||||
|
||||
hello_codex: | build deps
|
||||
$(ENV_SCRIPT) nim hello_codex codex.nims
|
||||
|
||||
# usual cleaning
|
||||
clean: | clean-common
|
||||
rm -rf build
|
||||
|
|
|
@ -59,6 +59,9 @@ proc test(name: string, srcDir = "tests/", lang = "c") =
|
|||
task codex, "build codex binary":
|
||||
buildBinary "codex", params = "-d:chronicles_runtime_filtering -d:chronicles_log_level=TRACE"
|
||||
|
||||
task hello_codex, "build hello_codex binary":
|
||||
buildBinary "hello_codex", srcDir = "testground/hello_codex/", params = "-d:chronicles_runtime_filtering -d:chronicles_log_level=TRACE"
|
||||
|
||||
task testCodex, "Build & run Codex tests":
|
||||
test "testCodex"
|
||||
|
||||
|
|
Loading…
Reference in New Issue