diff options
author | Andrey Sobolev <andrey.sobolev@xored.com> | 2015-10-01 22:08:29 +0600 |
---|---|---|
committer | Andrey Sobolev <andrey.sobolev@xored.com> | 2015-10-01 22:08:29 +0600 |
commit | 4c53a3a7a5bdb98ceaddcdb4c241d0395e600c36 (patch) | |
tree | f04a55ae3b99b04c50cb03c90947e1d3950ae563 /tests/testament | |
parent | 4351c62161b884f93e6796a8df7695ac382dff27 (diff) | |
parent | f8b7a16ad093842b66d10a0458a255e0766a5b09 (diff) | |
download | Nim-4c53a3a7a5bdb98ceaddcdb4c241d0395e600c36.tar.gz |
Merge remote-tracking branch 'nim-lang/devel' into emscripten-support
Diffstat (limited to 'tests/testament')
-rw-r--r-- | tests/testament/categories.nim | 4 | ||||
-rw-r--r-- | tests/testament/tester.nim | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/tests/testament/categories.nim b/tests/testament/categories.nim index afaf6c2f8..eccff439f 100644 --- a/tests/testament/categories.nim +++ b/tests/testament/categories.nim @@ -340,7 +340,7 @@ proc `&?.`(a, b: string): string = # candidate for the stdlib? result = if a.endswith(b): a else: a & b -proc processCategory(r: var TResults, cat: Category, options: string) = +proc processCategory(r: var TResults, cat: Category, options: string, fileGlob: string = "t*.nim") = case cat.string.normalize of "rodfiles": discard # Disabled for now @@ -377,5 +377,5 @@ proc processCategory(r: var TResults, cat: Category, options: string) = of "nimble-all": testNimblePackages(r, cat, pfAll) else: - for name in os.walkFiles("tests" & DirSep &.? cat.string / "t*.nim"): + for name in os.walkFiles("tests" & DirSep &.? cat.string / fileGlob): testSpec r, makeTest(name, options, cat) diff --git a/tests/testament/tester.nim b/tests/testament/tester.nim index b138c9909..3961f15c4 100644 --- a/tests/testament/tester.nim +++ b/tests/testament/tester.nim @@ -23,6 +23,7 @@ const Command: all run all tests c|category <category> run all the tests of a certain category + r|run <test> run single test file html [commit] generate $1 from the database; uses the latest commit or a specific one (use -1 for the commit before latest etc) @@ -376,6 +377,11 @@ proc main() = var cat = Category(p.key) p.next processCategory(r, cat, p.cmdLineRest.string) + of "r", "run": + let (dir, file) = splitPath(p.key.string) + let (_, subdir) = splitPath(dir) + var cat = Category(subdir) + processCategory(r, cat, p.cmdLineRest.string, file) of "html": var commit = 0 discard parseInt(p.cmdLineRest.string, commit) |