[wip] support in Makefile, codex.nimble; git ignore scratch/

This commit is contained in:
Michael Bradley, Jr 2022-08-16 09:25:25 -05:00
parent ebc98c4a09
commit ea2a5acbaa
No known key found for this signature in database
GPG Key ID: D0307DBCF21A9A58
3 changed files with 16 additions and 0 deletions

3
.gitignore vendored
View File

@ -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

View File

@ -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

View File

@ -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"