summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorArne Döring <arne.doering@gmx.net>2018-11-19 19:19:21 +0100
committerAraq <rumpf_a@web.de>2018-11-23 11:58:29 +0100
commitbfcf82c7e5eb39fb5bc5374aa19a4fa896f22ccb (patch)
tree6900adaf69a165af85effb1e496badf3a6b06917
parentd60615583f9714defb515424665971990504f230 (diff)
downloadNim-bfcf82c7e5eb39fb5bc5374aa19a4fa896f22ccb.tar.gz
maybe this time?
-rw-r--r--testament/tester.nim16
-rw-r--r--tests/system/t7894.nim26
2 files changed, 29 insertions, 13 deletions
diff --git a/testament/tester.nim b/testament/tester.nim
index de34abca1..065ad10dc 100644
--- a/testament/tester.nim
+++ b/testament/tester.nim
@@ -74,11 +74,11 @@ proc getFileDir(filename: string): string =
   if not result.isAbsolute():
     result = getCurrentDir() / result
 
-proc execCmdEx2*(command: string, options: set[ProcessOption], input: string): tuple[
+proc execCmdEx2*(command: string, args: openarray[string], options: set[ProcessOption], input: string): tuple[
                 output: TaintedString,
                 exitCode: int] {.tags:
                 [ExecIOEffect, ReadIOEffect, RootEffect], gcsafe.} =
-  var p = startProcess(command, options=options + {poEvalCommand})
+  var p = startProcess(command, args=args, options=options)
   var outp = outputStream(p)
 
   # There is no way to provide input for the child process
@@ -385,8 +385,16 @@ proc testSpec(r: var TResults, test: TTest, target = targetC) =
                     reExeNotFound)
         continue
 
-      let exeCmd = nodejs & " " & quoteShell(exeFile)
-      var (buf, exitCode) = execCmdEx2(exeCmd, options = {poStdErrToStdOut}, input = expected.input)
+
+      var exeCmd: string
+      var args: seq[string]
+      if isJsTarget:
+        exeCmd = nodejs
+        args.add exeFile
+      else:
+        exeCmd = exeFile
+
+      var (buf, exitCode) = execCmdEx2(exeCmd, args, options = {poStdErrToStdOut}, input = expected.input)
 
       # Treat all failure codes from nodejs as 1. Older versions of nodejs used
       # to return other codes, but for us it is sufficient to know that it's not 0.
diff --git a/tests/system/t7894.nim b/tests/system/t7894.nim
index a1083f7f7..f68bfdde6 100644
--- a/tests/system/t7894.nim
+++ b/tests/system/t7894.nim
@@ -1,15 +1,23 @@
 discard """
+disabled: "travis"
 """
 
 const size = 250000000
-var saved = newSeq[seq[int8]]()
 
-for i in 0..22:
-  # one of these is 0.25GB.
-  #echo i
-  var x = newSeq[int8](size)
-  saved.add(x)
+proc main() =
 
-for x in saved:
-  #echo x.len
-  doAssert x.len == size
+  var saved = newSeq[seq[int8]]()
+
+  for i in 0..22:
+    # one of these is 0.25GB.
+    #echo i
+    var x = newSeq[int8](size)
+    saved.add(x)
+
+  for x in saved:
+    #echo x.len
+    echo x.len
+    doAssert x.len == size
+
+
+main()