summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2017-02-02 21:56:34 +0100
committerAraq <rumpf_a@web.de>2017-02-02 21:56:34 +0100
commit8af10ae3b998ba2216ccb9b37c7a988fe1c09ccf (patch)
treed8ad807052750cf55bb689df3f2341a0eaf2f062 /tests
parentfab69661ad7132fd138c26da9f8cb0b041125965 (diff)
parente236039d109a49531098679156c5ed93a8c533b0 (diff)
downloadNim-8af10ae3b998ba2216ccb9b37c7a988fe1c09ccf.tar.gz
Merge branch 'devel' into new-name-mangling
Diffstat (limited to 'tests')
-rw-r--r--tests/misc/tfsmonitor.nim7
-rw-r--r--tests/testament/categories.nim4
-rw-r--r--tests/testament/tester.nim19
3 files changed, 14 insertions, 16 deletions
diff --git a/tests/misc/tfsmonitor.nim b/tests/misc/tfsmonitor.nim
index 27e1a2e32..35f93fb47 100644
--- a/tests/misc/tfsmonitor.nim
+++ b/tests/misc/tfsmonitor.nim
@@ -1,6 +1,6 @@
-#
-# fsmonitor test
-#
+discard """
+  disabled: windows
+"""
 
 import unittest
 import fsmonitor
@@ -9,4 +9,3 @@ suite "fsmonitor":
   test "should not raise OSError, bug# 3611":
     let m = newMonitor()
     m.add("foo", {MonitorCloseWrite, MonitorCloseNoWrite})
-
diff --git a/tests/testament/categories.nim b/tests/testament/categories.nim
index c788395f8..2dc8e3318 100644
--- a/tests/testament/categories.nim
+++ b/tests/testament/categories.nim
@@ -284,9 +284,9 @@ 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):
-    if test notin disabledSet:
+    let name = extractFilename(test)
+    if name notin disabledFiles:
       let contents = readFile(test).string
       if contents.contains("when isMainModule"):
         testSpec r, makeTest(test, options, cat, actionRunNoSpec)
diff --git a/tests/testament/tester.nim b/tests/testament/tester.nim
index 2734742f4..7efd405bb 100644
--- a/tests/testament/tester.nim
+++ b/tests/testament/tester.nim
@@ -108,12 +108,6 @@ proc callCompiler(cmdTemplate, filename, options: string,
   elif suc =~ pegSuccess:
     result.err = reSuccess
 
-  if result.err == reNimcCrash and
-     ("Your platform is not supported" in result.msg or
-      "cannot open 'sdl'" in result.msg or
-      "cannot open 'opengl'" in result.msg):
-    result.err = reIgnored
-
 proc callCCompiler(cmdTemplate, filename, options: string,
                   target: TTarget): TSpec =
   let c = parseCmdLine(cmdTemplate % ["target", targetToCmd[target],
@@ -393,9 +387,14 @@ 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 modules disabled from compilation test of stdlib.
-  disabledFiles = ["-"]
+when defined(windows):
+  const
+    # array of modules disabled from compilation test of stdlib.
+    disabledFiles = ["coro.nim", "fsmonitor.nim"]
+else:
+  const
+    # array of modules disabled from compilation test of stdlib.
+    disabledFiles = ["-"]
 
 include categories
 
@@ -460,7 +459,7 @@ proc main() =
   backend.close()
   if optPedantic:
     var failed = r.total - r.passed - r.skipped
-    if failed > 0 : quit(QuitFailure)
+    if failed > 0: quit(QuitFailure)
 
 if paramCount() == 0:
   quit Usage