Update to work with latest Nim devel and cliutil updates.

This commit is contained in:
Jonathan Bernard 2017-11-15 23:00:40 -06:00
parent e39c1186c8
commit 6569564aa8
3 changed files with 8 additions and 11 deletions

View File

@ -53,7 +53,7 @@ proc setupProject(wksp: Workspace) =
["clone", wksp.projectDef.repo, "repo"],
wksp.env, {poUsePath}, wksp.outputHandler)
if cloneResult.exitCode != 0:
if cloneResult != 0:
raiseEx "unable to clone repo for '" & wksp.projectDef.name & "'"
# Checkout the requested ref
@ -61,7 +61,7 @@ proc setupProject(wksp: Workspace) =
["checkout", wksp.buildRef],
wksp.env, {poUsePath}, wksp.outputHandler)
if checkoutResult.exitCode != 0:
if checkoutResult != 0:
raiseEx "unable to checkout ref " & wksp.buildRef &
" for '" & wksp.projectDef.name & "'"
@ -77,16 +77,13 @@ proc setupProject(wksp: Workspace) =
for k, v in wksp.projectDef.envVars: wksp.env[k] = v
# Get the build version
let versionProc = startProcess(
let versionResult = execWithOutput(
wksp.project.versionCmd, # command
wksp.dir & "/repo", # working dir
[], # args
wksp.env, # environment
{poUsePath, poEvalCommand}) # options
let versionResult = waitForWithOutput(versionProc, wksp.outputHandler,
wksp.project.versionCmd)
if versionResult.exitCode != 0:
raiseEx "Version command (" & wksp.project.versionCmd &
") returned non-zero exit code."
@ -140,9 +137,9 @@ proc runStep*(wksp: Workspace, step: Step) =
cmdInStream.flush()
cmdInStream.close()
let cmdResult = waitForWithOutput(cmdProc, wksp.outputHandler, step.stepCmd)
let cmdResult = waitFor(cmdProc, wksp.outputHandler, step.stepCmd)
if cmdResult.exitCode != 0:
if cmdResult != 0:
raiseEx "step " & step.name & " failed: step command returned non-zero exit code"
# Gather the output artifacts (if we have any)

View File

@ -1,3 +1,3 @@
import unittest
import ./functional/tserver.nim
import ./functional/tserver

View File

@ -1,4 +1,4 @@
import unittest
import ./unit/tserver.nim
import ./unit/tconfiguration.nim
import ./unit/tserver
import ./unit/tconfiguration