mirror of
https://github.com/logos-messaging/logos-delivery.git
synced 2026-04-14 20:23:08 +00:00
Revert "fix make test <test> issue"
This reverts commit ccfe59b247022eca73d10cccd404b7b556d20f11.
This commit is contained in:
parent
97a9a792d4
commit
d01d92d7cd
4
Makefile
4
Makefile
@ -270,8 +270,8 @@ build/%: | $(NIMBLEDEPS_STAMP) build deps librln
|
||||
|
||||
compile-test: | $(NIMBLEDEPS_STAMP) build deps librln
|
||||
echo -e $(BUILD_MSG) "$(TEST_FILE)" "\"$(TEST_NAME)\"" && \
|
||||
TEST_FILE="$(TEST_FILE)" nimble buildTest && \
|
||||
TEST_FILE="$(TEST_FILE)" TEST_NAME="$(TEST_NAME)" nimble execTest
|
||||
nimble buildTest $(TEST_FILE) && \
|
||||
nimble execTest $(TEST_FILE) "\"$(TEST_NAME)\""
|
||||
|
||||
################
|
||||
## Waku tools ##
|
||||
|
||||
18
waku.nimble
18
waku.nimble
@ -80,7 +80,10 @@ proc getNimParams(): string =
|
||||
proc buildModule(filePath, params = "", lang = "c"): bool =
|
||||
if not dirExists "build":
|
||||
mkDir "build"
|
||||
# allow something like "nim nimbus --verbosity:0 --hints:off nimbus.nims"
|
||||
var extra_params = params
|
||||
for i in 2 ..< paramCount() - 1:
|
||||
extra_params &= " " & paramStr(i)
|
||||
|
||||
if not fileExists(filePath):
|
||||
echo "File to build not found: " & filePath
|
||||
@ -444,21 +447,20 @@ task lightpushwithmix, "Build lightpushwithmix":
|
||||
buildBinary name, "examples/lightpush_mix/"
|
||||
|
||||
task buildTest, "Test custom target":
|
||||
let filepath = getEnv("TEST_FILE")
|
||||
if filepath == "":
|
||||
quit "Missing TEST_FILE environment variable"
|
||||
let filepath = paramStr(paramCount())
|
||||
discard buildModule(filepath)
|
||||
|
||||
import std/strutils
|
||||
|
||||
task execTest, "Run test":
|
||||
let filepath = getEnv("TEST_FILE")
|
||||
if filepath == "":
|
||||
quit "Missing TEST_FILE environment variable"
|
||||
var testSuite = getEnv("TEST_NAME").strip(chars = {'\"'})
|
||||
# Expects to be parameterized with test case name in quotes
|
||||
# preceded with the nim source file name and path
|
||||
# If no test case name is given still it requires empty quotes `""`
|
||||
let filepath = paramStr(paramCount() - 1)
|
||||
var testSuite = paramStr(paramCount()).strip(chars = {'\"'})
|
||||
if testSuite != "":
|
||||
testSuite = " \"" & testSuite & "\""
|
||||
exec "build/" & filepath & ".bin" & testSuite
|
||||
exec "build/" & filepath & ".bin " & testSuite
|
||||
|
||||
### C Bindings
|
||||
let chroniclesParams =
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user