mirror of
https://github.com/codex-storage/nim-codex.git
synced 2025-02-18 07:46:33 +00:00
[wip] support in Makefile, codex.nimble; git ignore scratch/
This commit is contained in:
parent
ebc98c4a09
commit
ea2a5acbaa
3
.gitignore
vendored
3
.gitignore
vendored
@ -13,6 +13,9 @@ build/
|
|||||||
# Coverage data shall be put in an ignored coverage/ directory
|
# Coverage data shall be put in an ignored coverage/ directory
|
||||||
coverage/
|
coverage/
|
||||||
|
|
||||||
|
# Shallow clone of the repo will be placed her for use with testground
|
||||||
|
scratch/
|
||||||
|
|
||||||
# Nimble packages
|
# Nimble packages
|
||||||
/vendor/.nimble
|
/vendor/.nimble
|
||||||
|
|
||||||
|
10
Makefile
10
Makefile
@ -24,8 +24,10 @@ LINK_PCRE := 0
|
|||||||
clean \
|
clean \
|
||||||
coverage \
|
coverage \
|
||||||
deps \
|
deps \
|
||||||
|
hello_codex \
|
||||||
libbacktrace \
|
libbacktrace \
|
||||||
test \
|
test \
|
||||||
|
testground \
|
||||||
update
|
update
|
||||||
|
|
||||||
ifeq ($(NIM_PARAMS),)
|
ifeq ($(NIM_PARAMS),)
|
||||||
@ -123,6 +125,14 @@ coverage:
|
|||||||
genhtml coverage/coverage.f.info --output-directory coverage/report
|
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
|
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
|
# usual cleaning
|
||||||
clean: | clean-common
|
clean: | clean-common
|
||||||
rm -rf build
|
rm -rf build
|
||||||
|
@ -59,6 +59,9 @@ proc test(name: string, srcDir = "tests/", lang = "c") =
|
|||||||
task codex, "build codex binary":
|
task codex, "build codex binary":
|
||||||
buildBinary "codex", params = "-d:chronicles_runtime_filtering -d:chronicles_log_level=TRACE"
|
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":
|
task testCodex, "Build & run Codex tests":
|
||||||
test "testCodex"
|
test "testCodex"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user