balls/runner

Source   Edit  

Types

Analyzer = enum
  Execution, ASanitizer, TSanitizer, Valgrind, Helgrind, DataRacer
analysis tools Source   Edit  
Backend = enum
  c, cpp, js, e
backends that we test Source   Edit  
Matrix = OrderedTable[Profile, StatusKind]
the Matrix collects test results in the order they are obtained Source   Edit  
MemModel = enum
  refc, markAndSweep, arc, orc, vm
memory managers that we test Source   Edit  
Optimizer = enum
  debug, release, danger
optimization modes that we test Source   Edit  
Profile = object
  an*: Analyzer
  be*: Backend
  opt*: Optimizer
  gc*: MemModel
  fn*: string
the Profile defines compilation settings for a single test invocation Source   Edit  

Consts

ballsFailFast {.booldefine.} = true
if true, quit early on a test failure Source   Edit  

Procs

proc `<`(a, b: Profile): bool {.used, ...raises: [], tags: [], forbids: [].}
Compare Profiles a, b for the purposes of test ordering. Note that this comparison does not measure test filename. Source   Edit  
proc `==`(a, b: Profile): bool {.used, ...raises: [], tags: [], forbids: [].}
Compare Profiles a, b for the purposes of test ordering. Note that this comparison does not measure test filename. Source   Edit  
proc cmp(a, b: Profile): int {....raises: [], tags: [], forbids: [].}
Compare Profiles a, b for the purposes of test ordering. Note that this comparison does not measure test filename. Source   Edit  
proc commandLine(p: Profile; withHints = false): string {.
    ...raises: [ValueError, KeyError], tags: [ReadIOEffect, ReadEnvEffect],
    forbids: [].}
compose the interesting parts of the compiler invocation Source   Edit  
proc contains(matrix: Matrix; p: Profile): bool {....raises: [], tags: [],
    forbids: [].}
A test result of None or Skip effectively does not count as being present in the test matrix. Source   Edit  
proc hash(p: Profile): Hash {....raises: [], tags: [], forbids: [].}
Two Profiles that hash identically share a test result in the Matrix. Source   Edit  
proc hints(p: Profile; ci: bool): string {....raises: [ValueError], tags: [],
    forbids: [].}
Compute --hint and --warning flags as appropriate given Profile p, ci status, and compile-time Nim version information. Source   Edit  
proc main(directory: string; fallback = false) {....raises: [OSError, IOError,
    ValueError, ValueError, KeyError, IOError, OSError], tags: [ReadDirEffect,
    WriteIOEffect, ReadEnvEffect, ReadIOEffect, TimeEffect, ExecIOEffect,
    RootEffect, WriteDirEffect], forbids: [].}
Run each test in the directory in a useful order; set fallback to true to fall back to a loose search in the current directory for testable code. Source   Edit  
proc matrixTable(matrix: Matrix): string {....raises: [KeyError, ValueError],
    tags: [], forbids: [].}
Render the matrix as a table. Source   Edit  
proc ordered(directory: string; testsOnly = true): seq[string] {.
    ...raises: [OSError], tags: [ReadDirEffect], forbids: [].}
Order a directory tree of test files usefully; set testsOnly for rigid "must start with a t and end with .nim" behavior. If testsOnly is set, the search is recursive. Source   Edit  
proc perform(matrix: var Matrix; profs: seq[Profile]) {.
    ...raises: [ValueError, KeyError, IOError, OSError], tags: [ReadEnvEffect,
    ReadIOEffect, WriteIOEffect, TimeEffect, ExecIOEffect, RootEffect],
    forbids: [].}
Try to run profs and fail early if you can. Source   Edit  
proc perform(p: Profile): StatusKind {....raises: [IOError, ValueError, KeyError], tags: [
    ExecIOEffect, ReadIOEffect, RootEffect, WriteIOEffect, ReadEnvEffect],
                                       forbids: [].}
Run a single Profile p and return its StatusKind. Source   Edit  
proc profiles(fn: string): seq[Profile] {....raises: [], tags: [], forbids: [].}
Produce profiles for a given test filename. Source   Edit