summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorcheatfate <ka@hardcore.kiev.ua>2016-07-30 02:07:05 +0300
committercheatfate <ka@hardcore.kiev.ua>2016-07-30 02:07:05 +0300
commit0d2ff34d02c6064bd5ffeea0f3bebb64d0390ffa (patch)
treee46ec838511697515fcaa80c593f01ee8b65e44b
parent902c26476246684b6a13a0b4f3876a19532fe7da (diff)
downloadNim-0d2ff34d02c6064bd5ffeea0f3bebb64d0390ffa.tar.gz
testament update to have list of disabled modules.
-rw-r--r--tests/testament/categories.nim12
-rw-r--r--tests/testament/tester.nim6
2 files changed, 12 insertions, 6 deletions
diff --git a/tests/testament/categories.nim b/tests/testament/categories.nim
index 125643d5a..e534cc161 100644
--- a/tests/testament/categories.nim
+++ b/tests/testament/categories.nim
@@ -260,12 +260,14 @@ proc compileExample(r: var TResults, pattern, options: string, cat: Category) =
     testNoSpec r, makeTest(test, options, cat)
 
 proc testStdlib(r: var TResults, pattern, options: string, cat: Category) =
+  var disabledSet = disabledFiles.toSet()
   for test in os.walkFiles(pattern):
-    let contents = readFile(test).string
-    if contents.contains("when isMainModule"):
-      testSpec r, makeTest(test, options, cat, actionRunNoSpec)
-    else:
-      testNoSpec r, makeTest(test, options, cat, actionCompile)
+    if test notin disabledSet:
+      let contents = readFile(test).string
+      if contents.contains("when isMainModule"):
+        testSpec r, makeTest(test, options, cat, actionRunNoSpec)
+      else:
+        testNoSpec r, makeTest(test, options, cat, actionCompile)
 
 # ----------------------------- nimble ----------------------------------------
 type PackageFilter = enum
diff --git a/tests/testament/tester.nim b/tests/testament/tester.nim
index 9a253d0ff..ab9648146 100644
--- a/tests/testament/tester.nim
+++ b/tests/testament/tester.nim
@@ -12,7 +12,7 @@
 import
   parseutils, strutils, pegs, os, osproc, streams, parsecfg, json,
   marshal, backend, parseopt, specs, htmlgen, browsers, terminal,
-  algorithm, compiler/nodejs, re, times
+  algorithm, compiler/nodejs, re, times, sets
 
 const
   resultsFile = "testresults.html"
@@ -388,6 +388,10 @@ proc makeTest(test, options: string, cat: Category, action = actionCompile,
   result = TTest(cat: cat, name: test, options: options,
                  target: target, action: action, startTime: epochTime())
 
+const
+  # array of files disabled from compilation test of stdlib.
+  disabledFiles = ["lib/pure/coro.nim"]
+
 include categories
 
 # proc runCaasTests(r: var TResults) =
n192'>192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287