Merge remote-tracking branch 'upstream/devel' into devel
This commit is contained in:
commit
c2e6fc0dfb
10 changed files with 67 additions and 47 deletions
|
|
@ -42,9 +42,12 @@ before_script:
|
||||||
- cd ..
|
- cd ..
|
||||||
- export PATH=$(pwd)/bin${PATH:+:$PATH}
|
- export PATH=$(pwd)/bin${PATH:+:$PATH}
|
||||||
- echo PATH:${PATH}
|
- echo PATH:${PATH}
|
||||||
|
- set +e # prevents breaking after_failure
|
||||||
|
|
||||||
script:
|
script:
|
||||||
|
- echo "travis_fold:start:nim_c_koch"
|
||||||
- nim c koch
|
- nim c koch
|
||||||
|
- echo "travis_fold:end:nim_c_koch"
|
||||||
- ./koch runCI
|
- ./koch runCI
|
||||||
|
|
||||||
before_deploy:
|
before_deploy:
|
||||||
|
|
@ -59,3 +62,6 @@ deploy: # https://nim-lang.github.io/Nim
|
||||||
keep-history: false
|
keep-history: false
|
||||||
on:
|
on:
|
||||||
branch: devel
|
branch: devel
|
||||||
|
|
||||||
|
# Extract failed tests
|
||||||
|
after_failure: nim c -r tools/ci_testresults.nim
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,8 @@
|
||||||
|
|
||||||
- The procs `parseutils.parseBiggsetInt`, `parseutils.parseInt`, `parseutils.parseBiggestUInt` and `parseutils.parseUInt` now raise a `ValueError` when the parsed integer is outside of the valid range. Previously they sometimes raised a `OverflowError` and sometimes returned `0`.
|
- The procs `parseutils.parseBiggsetInt`, `parseutils.parseInt`, `parseutils.parseBiggestUInt` and `parseutils.parseUInt` now raise a `ValueError` when the parsed integer is outside of the valid range. Previously they sometimes raised a `OverflowError` and sometimes returned `0`.
|
||||||
|
|
||||||
|
- `streams.StreamObject` now restricts its fields to only raise `system.Defect`, `system.IOError` and `system.OSError`. This change only affects custom stream implementations.
|
||||||
|
|
||||||
- nre's `RegexMatch.{captureBounds,captures}[]` no longer return `Option` or
|
- nre's `RegexMatch.{captureBounds,captures}[]` no longer return `Option` or
|
||||||
`nil`/`""`, respectivly. Use the newly added `n in p.captures` method to
|
`nil`/`""`, respectivly. Use the newly added `n in p.captures` method to
|
||||||
check if a group is captured, otherwise you'll recieve an exception.
|
check if a group is captured, otherwise you'll recieve an exception.
|
||||||
|
|
|
||||||
|
|
@ -1314,11 +1314,8 @@ dt pre > span.Identifier, dt pre > span.Operator {
|
||||||
color: #155da4;
|
color: #155da4;
|
||||||
font-weight: 700; }
|
font-weight: 700; }
|
||||||
|
|
||||||
dt pre > span.Identifier ~ span.Identifier, dt pre > span.Operator ~ span.Identifier {
|
dt pre > span.Keyword ~ span.Identifier, dt pre > span.Identifier ~ span.Identifier,
|
||||||
color: inherit;
|
dt pre > span.Operator ~ span.Identifier, dt pre > span.Operator ~ span.Identifier {
|
||||||
font-weight: inherit; }
|
|
||||||
|
|
||||||
dt pre > span.Operator ~ span.Identifier {
|
|
||||||
color: inherit;
|
color: inherit;
|
||||||
font-weight: inherit; }
|
font-weight: inherit; }
|
||||||
|
|
||||||
|
|
|
||||||
8
koch.nim
8
koch.nim
|
|
@ -163,7 +163,7 @@ proc bundleNimsuggest() =
|
||||||
nimCompile("nimsuggest/nimsuggest.nim", options = "-d:release")
|
nimCompile("nimsuggest/nimsuggest.nim", options = "-d:release")
|
||||||
|
|
||||||
proc buildVccTool() =
|
proc buildVccTool() =
|
||||||
nimCompile("tools/vccexe/vccexe.nim")
|
nimCompileFold("Compile Vcc", "tools/vccexe/vccexe.nim")
|
||||||
|
|
||||||
proc bundleWinTools() =
|
proc bundleWinTools() =
|
||||||
# TODO: consider building under `bin` instead of `.`
|
# TODO: consider building under `bin` instead of `.`
|
||||||
|
|
@ -208,10 +208,10 @@ proc buildTool(toolname, args: string) =
|
||||||
|
|
||||||
proc buildTools() =
|
proc buildTools() =
|
||||||
bundleNimsuggest()
|
bundleNimsuggest()
|
||||||
nimCompile("tools/nimgrep.nim", options = "-d:release")
|
nimCompileFold("Compile nimgrep", "tools/nimgrep.nim", options = "-d:release")
|
||||||
when defined(windows): buildVccTool()
|
when defined(windows): buildVccTool()
|
||||||
nimCompile("nimpretty/nimpretty.nim", options = "-d:release")
|
nimCompileFold("Compile nimpretty", "nimpretty/nimpretty.nim", options = "-d:release")
|
||||||
nimCompile("tools/nimfind.nim", options = "-d:release")
|
nimCompileFold("Compile nimfind", "tools/nimfind.nim", options = "-d:release")
|
||||||
|
|
||||||
proc nsis(latest: bool; args: string) =
|
proc nsis(latest: bool; args: string) =
|
||||||
bundleNimbleExe(latest)
|
bundleNimbleExe(latest)
|
||||||
|
|
|
||||||
|
|
@ -45,17 +45,22 @@ type
|
||||||
## here shouldn't be used directly. They are
|
## here shouldn't be used directly. They are
|
||||||
## accessible so that a stream implementation
|
## accessible so that a stream implementation
|
||||||
## can override them.
|
## can override them.
|
||||||
closeImpl*: proc (s: Stream) {.nimcall, tags: [], gcsafe.}
|
closeImpl*: proc (s: Stream)
|
||||||
atEndImpl*: proc (s: Stream): bool {.nimcall, tags: [], gcsafe.}
|
{.nimcall, raises: [Defect, IOError, OSError], tags: [], gcsafe.}
|
||||||
setPositionImpl*: proc (s: Stream, pos: int) {.nimcall, tags: [], gcsafe.}
|
atEndImpl*: proc (s: Stream): bool
|
||||||
getPositionImpl*: proc (s: Stream): int {.nimcall, tags: [], gcsafe.}
|
{.nimcall, raises: [Defect, IOError, OSError], tags: [], gcsafe.}
|
||||||
readDataImpl*: proc (s: Stream, buffer: pointer,
|
setPositionImpl*: proc (s: Stream, pos: int)
|
||||||
bufLen: int): int {.nimcall, tags: [ReadIOEffect], gcsafe.}
|
{.nimcall, raises: [Defect, IOError, OSError], tags: [], gcsafe.}
|
||||||
peekDataImpl*: proc (s: Stream, buffer: pointer,
|
getPositionImpl*: proc (s: Stream): int
|
||||||
bufLen: int): int {.nimcall, tags: [ReadIOEffect], gcsafe.}
|
{.nimcall, raises: [Defect, IOError, OSError], tags: [], gcsafe.}
|
||||||
writeDataImpl*: proc (s: Stream, buffer: pointer, bufLen: int) {.nimcall,
|
readDataImpl*: proc (s: Stream, buffer: pointer, bufLen: int): int
|
||||||
tags: [WriteIOEffect], gcsafe.}
|
{.nimcall, raises: [Defect, IOError, OSError], tags: [ReadIOEffect], gcsafe.}
|
||||||
flushImpl*: proc (s: Stream) {.nimcall, tags: [WriteIOEffect], gcsafe.}
|
peekDataImpl*: proc (s: Stream, buffer: pointer, bufLen: int): int
|
||||||
|
{.nimcall, raises: [Defect, IOError, OSError], tags: [ReadIOEffect], gcsafe.}
|
||||||
|
writeDataImpl*: proc (s: Stream, buffer: pointer, bufLen: int)
|
||||||
|
{.nimcall, raises: [Defect, IOError, OSError], tags: [WriteIOEffect], gcsafe.}
|
||||||
|
flushImpl*: proc (s: Stream)
|
||||||
|
{.nimcall, raises: [Defect, IOError, OSError], tags: [WriteIOEffect], gcsafe.}
|
||||||
|
|
||||||
proc flush*(s: Stream) =
|
proc flush*(s: Stream) =
|
||||||
## flushes the buffers that the stream `s` might use.
|
## flushes the buffers that the stream `s` might use.
|
||||||
|
|
@ -65,10 +70,6 @@ proc close*(s: Stream) =
|
||||||
## closes the stream `s`.
|
## closes the stream `s`.
|
||||||
if not isNil(s.closeImpl): s.closeImpl(s)
|
if not isNil(s.closeImpl): s.closeImpl(s)
|
||||||
|
|
||||||
proc close*(s, unused: Stream) {.deprecated.} =
|
|
||||||
## closes the stream `s`.
|
|
||||||
s.closeImpl(s)
|
|
||||||
|
|
||||||
proc atEnd*(s: Stream): bool =
|
proc atEnd*(s: Stream): bool =
|
||||||
## checks if more data can be read from `f`. Returns true if all data has
|
## checks if more data can be read from `f`. Returns true if all data has
|
||||||
## been read.
|
## been read.
|
||||||
|
|
@ -111,12 +112,6 @@ proc writeData*(s: Stream, buffer: pointer, bufLen: int) =
|
||||||
## to the stream `s`.
|
## to the stream `s`.
|
||||||
s.writeDataImpl(s, buffer, bufLen)
|
s.writeDataImpl(s, buffer, bufLen)
|
||||||
|
|
||||||
proc writeData*(s, unused: Stream, buffer: pointer,
|
|
||||||
bufLen: int) {.deprecated.} =
|
|
||||||
## low level proc that writes an untyped `buffer` of `bufLen` size
|
|
||||||
## to the stream `s`.
|
|
||||||
s.writeDataImpl(s, buffer, bufLen)
|
|
||||||
|
|
||||||
proc write*[T](s: Stream, x: T) =
|
proc write*[T](s: Stream, x: T) =
|
||||||
## generic write procedure. Writes `x` to the stream `s`. Implementation:
|
## generic write procedure. Writes `x` to the stream `s`. Implementation:
|
||||||
##
|
##
|
||||||
|
|
|
||||||
|
|
@ -1139,11 +1139,8 @@ dt pre > span.Identifier, dt pre > span.Operator {
|
||||||
color: #155da4;
|
color: #155da4;
|
||||||
font-weight: 700; }
|
font-weight: 700; }
|
||||||
|
|
||||||
dt pre > span.Identifier ~ span.Identifier, dt pre > span.Operator ~ span.Identifier {
|
dt pre > span.Keyword ~ span.Identifier, dt pre > span.Identifier ~ span.Identifier,
|
||||||
color: inherit;
|
dt pre > span.Operator ~ span.Identifier, dt pre > span.Operator ~ span.Identifier {
|
||||||
font-weight: inherit; }
|
|
||||||
|
|
||||||
dt pre > span.Operator ~ span.Identifier {
|
|
||||||
color: inherit;
|
color: inherit;
|
||||||
font-weight: inherit; }
|
font-weight: inherit; }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1139,11 +1139,8 @@ dt pre > span.Identifier, dt pre > span.Operator {
|
||||||
color: #155da4;
|
color: #155da4;
|
||||||
font-weight: 700; }
|
font-weight: 700; }
|
||||||
|
|
||||||
dt pre > span.Identifier ~ span.Identifier, dt pre > span.Operator ~ span.Identifier {
|
dt pre > span.Keyword ~ span.Identifier, dt pre > span.Identifier ~ span.Identifier,
|
||||||
color: inherit;
|
dt pre > span.Operator ~ span.Identifier, dt pre > span.Operator ~ span.Identifier {
|
||||||
font-weight: inherit; }
|
|
||||||
|
|
||||||
dt pre > span.Operator ~ span.Identifier {
|
|
||||||
color: inherit;
|
color: inherit;
|
||||||
font-weight: inherit; }
|
font-weight: inherit; }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1139,11 +1139,8 @@ dt pre > span.Identifier, dt pre > span.Operator {
|
||||||
color: #155da4;
|
color: #155da4;
|
||||||
font-weight: 700; }
|
font-weight: 700; }
|
||||||
|
|
||||||
dt pre > span.Identifier ~ span.Identifier, dt pre > span.Operator ~ span.Identifier {
|
dt pre > span.Keyword ~ span.Identifier, dt pre > span.Identifier ~ span.Identifier,
|
||||||
color: inherit;
|
dt pre > span.Operator ~ span.Identifier, dt pre > span.Operator ~ span.Identifier {
|
||||||
font-weight: inherit; }
|
|
||||||
|
|
||||||
dt pre > span.Operator ~ span.Identifier {
|
|
||||||
color: inherit;
|
color: inherit;
|
||||||
font-weight: inherit; }
|
font-weight: inherit; }
|
||||||
|
|
||||||
|
|
|
||||||
24
tools/ci_testresults.nim
Normal file
24
tools/ci_testresults.nim
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
## Print summary of failed tests for CI
|
||||||
|
|
||||||
|
import os, json, sets, strformat
|
||||||
|
|
||||||
|
const skip = toSet(["reDisabled", "reIgnored", "reSuccess", "reJoined"])
|
||||||
|
|
||||||
|
when isMainModule:
|
||||||
|
for fn in walkFiles("testresults/*.json"):
|
||||||
|
let entries = fn.readFile().parseJson()
|
||||||
|
for j in entries:
|
||||||
|
let res = j["result"].getStr()
|
||||||
|
if skip.contains(res):
|
||||||
|
continue
|
||||||
|
echo fmt """
|
||||||
|
Category: {j["category"].getStr()}
|
||||||
|
Name: {j["name"].getStr()}
|
||||||
|
Action: {j["action"].getStr()}
|
||||||
|
Result: {res}
|
||||||
|
-------- Expected -------
|
||||||
|
{j["expected"].getStr()}
|
||||||
|
--------- Given --------
|
||||||
|
{j["given"].getStr()}
|
||||||
|
-------------------------
|
||||||
|
"""
|
||||||
|
|
@ -42,10 +42,10 @@ proc execFold*(desc, cmd: string, errorcode: int = QuitFailure, additionalPath =
|
||||||
## Execute shell command. Add log folding on Travis CI.
|
## Execute shell command. Add log folding on Travis CI.
|
||||||
# https://github.com/travis-ci/travis-ci/issues/2285#issuecomment-42724719
|
# https://github.com/travis-ci/travis-ci/issues/2285#issuecomment-42724719
|
||||||
if existsEnv("TRAVIS"):
|
if existsEnv("TRAVIS"):
|
||||||
echo "travis_fold:start:" & desc.replace(" ", "")
|
echo "travis_fold:start:" & desc.replace(" ", "_")
|
||||||
exec(cmd, errorcode, additionalPath)
|
exec(cmd, errorcode, additionalPath)
|
||||||
if existsEnv("TRAVIS"):
|
if existsEnv("TRAVIS"):
|
||||||
echo "travis_fold:end:" & desc.replace(" ", "")
|
echo "travis_fold:end:" & desc.replace(" ", "_")
|
||||||
|
|
||||||
proc execCleanPath*(cmd: string,
|
proc execCleanPath*(cmd: string,
|
||||||
additionalPath = ""; errorcode: int = QuitFailure) =
|
additionalPath = ""; errorcode: int = QuitFailure) =
|
||||||
|
|
@ -69,6 +69,11 @@ proc nimCompile*(input: string, outputDir = "bin", mode = "c", options = "") =
|
||||||
let cmd = findNim() & " " & mode & " -o:" & output & " " & options & " " & input
|
let cmd = findNim() & " " & mode & " -o:" & output & " " & options & " " & input
|
||||||
exec cmd
|
exec cmd
|
||||||
|
|
||||||
|
proc nimCompileFold*(desc, input: string, outputDir = "bin", mode = "c", options = "") =
|
||||||
|
let output = outputDir / input.splitFile.name.exe
|
||||||
|
let cmd = findNim() & " " & mode & " -o:" & output & " " & options & " " & input
|
||||||
|
execFold(desc, cmd)
|
||||||
|
|
||||||
const
|
const
|
||||||
pdf = """
|
pdf = """
|
||||||
doc/manual.rst
|
doc/manual.rst
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue