diff options
author | Araq <rumpf_a@web.de> | 2011-05-01 20:11:55 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2011-05-01 20:11:55 +0200 |
commit | 6ff8752be53b7c0ad2c01615fdf1ab1bb619fb83 (patch) | |
tree | 6ad172b70b3b54063bc0dd6566a6c4ed0f5b0a99 /koch.nim | |
parent | 0d75723f919931c8523715dbd537d6f86d8ac3dd (diff) | |
download | Nim-6ff8752be53b7c0ad2c01615fdf1ab1bb619fb83.tar.gz |
cleaned up the tests; fixes #30; fixes #26
Diffstat (limited to 'koch.nim')
-rwxr-xr-x | koch.nim | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/koch.nim b/koch.nim index 4c4f107da..2200578ad 100755 --- a/koch.nim +++ b/koch.nim @@ -32,7 +32,8 @@ Possible Commands: web generates the website csource [options] builds the C sources for installation zip builds the installation ZIP package - inno [options] builds the Inno Setup installer + inno [options] builds the Inno Setup installer (for Windows) + tests run the testsuite Boot options: -d:release produce a release version of the compiler -d:tinyc include the Tiny C backend (not supported on Windows) @@ -52,11 +53,11 @@ proc tryExec(cmd: string): bool = result = execShellCmd(cmd) == 0 proc csource(args: string) = - exec("nimrod cc $1 -r tools/niminst --var:version=$2 csource compiler/nimrod $1" % + exec("nimrod cc $1 -r tools/niminst --var:version=$2 csource compiler/nimrod.ini $1" % [args, NimrodVersion]) proc zip(args: string) = - exec("nimrod cc -r tools/niminst --var:version=$# zip compiler/nimrod" % + exec("nimrod cc -r tools/niminst --var:version=$# zip compiler/nimrod.ini" % NimrodVersion) proc buildTool(toolname, args: string) = @@ -172,6 +173,12 @@ proc clean(args: string) = removePattern("web/*.html") removePattern("doc/*.html") cleanAux(getCurrentDir()) + for kind, path in walkDir(getCurrentDir() / "build"): + if kind == pcDir: RemoveDir(path) + +proc tests(args: string) = + exec("nimrod cc tests/tester") + exec("tests/tester") proc showHelp() = quit(HelpText % [NimrodVersion & repeatChar(44-len(NimrodVersion)), @@ -190,6 +197,7 @@ of cmdArgument: of "zip": zip(op.cmdLineRest) of "inno": inno(op.cmdLineRest) of "install": install(op.cmdLineRest) + of "test", "tests": tests(op.cmdLineRest) else: showHelp() of cmdEnd: showHelp() |