diff --git a/koch.nim b/koch.nim index 22e30ac5e2..f9eacfbf48 100644 --- a/koch.nim +++ b/koch.nim @@ -263,16 +263,8 @@ when defined(withUpdate): proc tests(args: string) = # we compile the tester with taintMode:on to have a basic # taint mode test :-) - exec("nimrod cc --taintMode:on tests/tester") - exec(getCurrentDir() / "tests/tester".exe & " reject") - exec(getCurrentDir() / "tests/tester".exe & " compile") - exec(getCurrentDir() / "tests/tester".exe & " run") - exec(getCurrentDir() / "tests/tester".exe & " merge") - when false: - # activate real soon: - exec("nimrod cc --taintMode:on tests/testament/tester") - exec(getCurrentDir() / "tests/testament/tester".exe & " all") - + exec("nimrod cc --taintMode:on tests/testament/tester") + exec(getCurrentDir() / "tests/testament/tester".exe & " all") proc temp(args: string) = var output = "compiler" / "nimrod".exe diff --git a/tests/lookup/tredef.nim b/tests/lookups/tredef.nim similarity index 100% rename from tests/lookup/tredef.nim rename to tests/lookups/tredef.nim diff --git a/tests/testament/backend.nim b/tests/testament/backend.nim index 65d040b24e..500535d9b8 100644 --- a/tests/testament/backend.nim +++ b/tests/testament/backend.nim @@ -1,7 +1,7 @@ # # # The Nimrod Tester -# (c) Copyright 2013 Andreas Rumpf +# (c) Copyright 2014 Andreas Rumpf # # Look at license.txt for more info. # All rights reserved. @@ -49,10 +49,10 @@ proc createDb() = # """, []) type - MachineId = distinct int64 + MachineId* = distinct int64 CommitId = distinct int64 -proc `$`(id: MachineId): string {.borrow.} +proc `$`*(id: MachineId): string {.borrow.} proc `$`(id: CommitId): string {.borrow.} var @@ -61,7 +61,7 @@ var proc `()`(cmd: string{lit}): string = cmd.execProcess.string.strip -proc getMachine: MachineId = +proc getMachine*: MachineId = var name = "hostname"() if name.len == 0: name = when defined(posix): getenv"HOSTNAME".string @@ -73,7 +73,7 @@ proc getMachine: MachineId = if id.len > 0: result = id.parseInt.MachineId else: - result = db.insertId(sql"insert into Machine(name, os, cpu) values (?,?,?)", + result = db.insertId(sql"insert into Machine(name, os, cpu) values (?,?,?)", name, system.hostOS, system.hostCPU).MachineId proc getCommit: CommitId = diff --git a/tests/caasdriver.nim b/tests/testament/caasdriver.nim similarity index 100% rename from tests/caasdriver.nim rename to tests/testament/caasdriver.nim diff --git a/tests/css/boilerplate.css b/tests/testament/css/boilerplate.css similarity index 100% rename from tests/css/boilerplate.css rename to tests/testament/css/boilerplate.css diff --git a/tests/css/style.css b/tests/testament/css/style.css similarity index 100% rename from tests/css/style.css rename to tests/testament/css/style.css diff --git a/tests/testament/htmlgen.nim b/tests/testament/htmlgen.nim new file mode 100644 index 0000000000..6e3865bab6 --- /dev/null +++ b/tests/testament/htmlgen.nim @@ -0,0 +1,127 @@ +# +# +# Nimrod Tester +# (c) Copyright 2014 Andreas Rumpf +# +# See the file "copying.txt", included in this +# distribution, for details about the copyright. +# + +## HTML generator for the tester. + +import db_sqlite, cgi, backend, strutils + +const + TableHeader = """
| Test | Category | Target | +Action | +Expected | +Given | +Success |
$#
" % machine.join(" ")) + + outfile.write("""