mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-01-02 13:33:10 +00:00
chore: skip marketplace and long integration tests (#1326)
This commit is contained in:
parent
e3d8d195c3
commit
af55a761e6
@ -2,13 +2,14 @@ import std/macros
|
||||
import std/os
|
||||
import std/strutils
|
||||
|
||||
macro importTests*(dir: static string): untyped =
|
||||
macro importTests*(dir: static string, excludes: static string = ""): untyped =
|
||||
## imports all files in the specified directory whose filename
|
||||
## starts with "test" and ends in ".nim"
|
||||
let imports = newStmtList()
|
||||
let excludeList = excludes.split(",")
|
||||
for file in walkDirRec(dir):
|
||||
let (_, name, ext) = splitFile(file)
|
||||
if name.startsWith("test") and ext == ".nim":
|
||||
if name.startsWith("test") and ext == ".nim" and not (name in excludeList):
|
||||
imports.add(
|
||||
quote do:
|
||||
import `file`
|
||||
|
||||
@ -12,6 +12,11 @@ when includes != "":
|
||||
importAll(includes.split(","))
|
||||
else:
|
||||
# import all tests in the integration/ directory
|
||||
importTests(currentSourcePath().parentDir() / "integration")
|
||||
importTests(
|
||||
currentSourcePath().parentDir() / "integration" / "1_minute", "testpurchasing"
|
||||
)
|
||||
importTests(
|
||||
currentSourcePath().parentDir() / "integration" / "5_minutes", "testsales"
|
||||
)
|
||||
|
||||
{.warning[UnusedImport]: off.}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user