tester compiles again
This commit is contained in:
parent
28c3de7d3e
commit
6713ebcd98
5 changed files with 22 additions and 22 deletions
|
|
@ -1,6 +1,6 @@
|
|||
#
|
||||
#
|
||||
# Nimrod Tester
|
||||
# Nim Tester
|
||||
# (c) Copyright 2014 Andreas Rumpf
|
||||
#
|
||||
# See the file "copying.txt", included in this
|
||||
|
|
@ -20,7 +20,7 @@ const
|
|||
proc delNimCache() =
|
||||
try:
|
||||
removeDir(nimcacheDir)
|
||||
except EOS:
|
||||
except OSError:
|
||||
echo "[Warning] could not delete: ", nimcacheDir
|
||||
|
||||
proc runRodFiles(r: var TResults, cat: Category, options: string) =
|
||||
|
|
@ -71,7 +71,7 @@ proc compileRodFiles(r: var TResults, cat: Category, options: string) =
|
|||
proc safeCopyFile(src, dest: string) =
|
||||
try:
|
||||
copyFile(src, dest)
|
||||
except EOS:
|
||||
except OSError:
|
||||
echo "[Warning] could not copy: ", src, " to ", dest
|
||||
|
||||
proc runBasicDLLTest(c, r: var TResults, cat: Category, options: string) =
|
||||
|
|
@ -236,8 +236,8 @@ let
|
|||
packageDir = babelDir / "pkgs"
|
||||
packageIndex = babelDir / "packages.json"
|
||||
|
||||
proc waitForExitEx(p: PProcess): int =
|
||||
var outp: PStream = outputStream(p)
|
||||
proc waitForExitEx(p: Process): int =
|
||||
var outp = outputStream(p)
|
||||
var line = newStringOfCap(120).TaintedString
|
||||
while true:
|
||||
if outp.readLine(line):
|
||||
|
|
@ -250,7 +250,7 @@ proc waitForExitEx(p: PProcess): int =
|
|||
proc getPackageDir(package: string): string =
|
||||
## TODO - Replace this with dom's version comparison magic.
|
||||
var commandOutput = execCmdEx("babel path $#" % package)
|
||||
if commandOutput.exitCode != quitSuccess:
|
||||
if commandOutput.exitCode != QuitSuccess:
|
||||
return ""
|
||||
else:
|
||||
result = commandOutput[0].string
|
||||
|
|
@ -278,7 +278,7 @@ proc testBabelPackages(r: var TResults, cat: Category, filter: PackageFilter) =
|
|||
echo("[Warning] - Cannot run babel tests: Babel binary not found.")
|
||||
return
|
||||
|
||||
if execCmd("$# update" % babelExe) == quitFailure:
|
||||
if execCmd("$# update" % babelExe) == QuitFailure:
|
||||
echo("[Warning] - Cannot run babel tests: Babel update failed.")
|
||||
return
|
||||
|
||||
|
|
@ -291,7 +291,7 @@ proc testBabelPackages(r: var TResults, cat: Category, filter: PackageFilter) =
|
|||
installProcess = startProcess(babelExe, "", ["install", "-y", name])
|
||||
installStatus = waitForExitEx(installProcess)
|
||||
installProcess.close
|
||||
if installStatus != quitSuccess:
|
||||
if installStatus != QuitSuccess:
|
||||
r.addResult(test, "", "", reInstallFailed)
|
||||
continue
|
||||
|
||||
|
|
@ -301,11 +301,11 @@ proc testBabelPackages(r: var TResults, cat: Category, filter: PackageFilter) =
|
|||
buildProcess = startProcess(babelExe, buildPath, ["build"])
|
||||
buildStatus = waitForExitEx(buildProcess)
|
||||
buildProcess.close
|
||||
if buildStatus != quitSuccess:
|
||||
if buildStatus != QuitSuccess:
|
||||
r.addResult(test, "", "", reBuildFailed)
|
||||
r.addResult(test, "", "", reSuccess)
|
||||
r.addResult(packageFileTest, "", "", reSuccess)
|
||||
except EJsonParsingError:
|
||||
except JsonParsingError:
|
||||
echo("[Warning] - Cannot run babel tests: Invalid package file.")
|
||||
r.addResult(packageFileTest, "", "", reBuildFailed)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue