diff options
Diffstat (limited to 'testament')
-rw-r--r-- | testament/categories.nim | 31 | ||||
-rw-r--r-- | testament/important_packages.nim | 92 |
2 files changed, 79 insertions, 44 deletions
diff --git a/testament/categories.nim b/testament/categories.nim index eecdd7bc9..add080020 100644 --- a/testament/categories.nim +++ b/testament/categories.nim @@ -470,18 +470,25 @@ proc getPackageDir(package: string): string = iterator listPackages(): tuple[name, url, cmd: string, hasDeps: bool] = let defaultCmd = "nimble test" let packageList = parseFile(packageIndex) - for n, cmd, commit, hasDeps in important_packages.packages.items: - var found = false - for package in packageList.items: - let name = package["name"].str - if name == n: - found = true - let url = package["url"].str - let cmd = if cmd.len == 0: defaultCmd else: cmd - yield (name, url, cmd, hasDeps) - break - if not found: - raise newException(ValueError, "Cannot find package '$#'." % n) + for n, cmd, hasDeps, url in important_packages.packages.items: + let cmd = if cmd.len == 0: defaultCmd else: cmd + if url.len != 0: + if hasDeps: + # use url instead of name, so we can do 'nimble install' + yield (url, url, cmd, hasDeps) + else: + yield (n, url, cmd, hasDeps) + else: + var found = false + for package in packageList.items: + let name = package["name"].str + if name == n: + found = true + let p_url = package["url"].str + yield (name, p_url, cmd, hasDeps) + break + if not found: + raise newException(ValueError, "Cannot find package '$#'." % n) proc makeSupTest(test, options: string, cat: Category): TTest = result.cat = cat diff --git a/testament/important_packages.nim b/testament/important_packages.nim index f56e5b84c..ff75fc8cc 100644 --- a/testament/important_packages.nim +++ b/testament/important_packages.nim @@ -1,50 +1,78 @@ import strutils -template pkg(name: string; cmd = "nimble test"; version = ""; hasDeps = false): untyped = - packages.add((name, cmd, version, hasDeps)) +template pkg(name: string; cmd = "nimble test"; hasDeps = false; url = ""): untyped = + packages.add((name, cmd, hasDeps, url)) -var packages*: seq[tuple[name, cmd, version: string; hasDeps: bool]] = @[] +var packages*: seq[tuple[name, cmd: string; hasDeps: bool; url: string]] = @[] -pkg "arraymancer", "nim c src/arraymancer.nim", "", true -pkg "ast_pattern_matching", "nim c tests/test1.nim" -pkg "blscurve", "", "", true -pkg "bncurve", "nim c tests/tarith.nim", "", true +pkg "argparse" +pkg "arraymancer", "nim c -r src/arraymancer.nim", true +pkg "ast_pattern_matching", "nim c -r tests/test1.nim" +pkg "binaryheap", "nim c -r binaryheap.nim" +pkg "blscurve", "", true +pkg "bncurve", "", true pkg "c2nim", "nim c testsuite/tester.nim" -pkg "chronicles", "nim c -o:chr chronicles.nim", "", true -# pkg "chronos", "nim c tests/teststream.nim" -pkg "cligen", "nim c -o:cligenn cligen.nim" -pkg "compactdict", "nim c tests/test1.nim" +pkg "cascade" +pkg "chroma" +pkg "chronicles", "nim c -o:chr -r chronicles.nim", true +pkg "chronos" +pkg "cligen", "nim c -o:cligenn -r cligen.nim" +pkg "combparser" +pkg "compactdict" +pkg "comprehension", "", false, "https://github.com/alehander42/comprehension" pkg "criterion" +pkg "dashing", "nim c tests/functional.nim" pkg "docopt" -pkg "gara", "nim c tests/test_gara.nim" +pkg "fragments", "nim c -r fragments/dsl.nim" +pkg "gara" pkg "glob" pkg "gnuplot" -pkg "hts", "nim c tests/all.nim" +# pkg "godot", "nim c -r godot/godot.nim" # not yet compatible with Nim 0.19 +pkg "hts", "nim c -o:htss -r src/hts.nim" pkg "inim" pkg "itertools", "nim doc src/itertools.nim" pkg "iterutils" -pkg "karax", "nim c tests/tester.nim" +pkg "jstin" +pkg "karax", "nim c -r tests/tester.nim" pkg "loopfusion" +pkg "msgpack4nim" pkg "nake", "nim c nakefile.nim" -pkg "neo", "nim c -d:blas=openblas tests/all.nim", "", true -pkg "nigui", "nim c -o:niguii src/nigui.nim" -pkg "nimcrypto", "nim c tests/testapi.nim" -pkg "NimData", "nim c -o:nimdataa src/nimdata.nim", "", true -pkg "nimes", "nim c src/nimes.nim", "", true -pkg "nimgame2", "nim c nimgame2/nimgame.nim", "", true -pkg "nimongo", "nimble test_ci", "", true -pkg "nimpy", "nim c tests/nimfrompy.nim" -pkg "nimsl", "nim c test.nim" +pkg "neo", "nim c -d:blas=openblas tests/all.nim", true +# pkg "nico", "", true +pkg "nicy", "nim c src/nicy.nim" +pkg "nigui", "nim c -o:niguii -r src/nigui.nim" +pkg "nimcrypto", "nim c -r tests/testapi.nim" +pkg "NimData", "nim c -o:nimdataa src/nimdata.nim", true +pkg "nimes", "nim c src/nimes.nim", true +pkg "nimfp", "nim c -o:nfp -r src/fp.nim", true +pkg "nimgame2", "nim c nimgame2/nimgame.nim", true +pkg "nimgen", "nim c -o:nimgenn -r src/nimgen/runcfg.nim", true +# pkg "nimlsp", "", true +pkg "nimly", "nim c -r tests/test_nimly", true +pkg "nimongo", "nimble test_ci", true +pkg "nimpy", "nim c -r tests/nimfrompy.nim" +pkg "nimquery" +pkg "nimsl", "", true pkg "nimsvg" -# pkg "nimx", "nim c --threads:on test/main.nim", "", true +pkg "nimx", "nim c --threads:on test/main.nim", true +pkg "norm", "nim c -o:normm src/norm.nim" +pkg "npeg" +pkg "ormin", "nim c -o:orminn ormin.nim", true pkg "parsetoml" pkg "patty" -pkg "plotly", "nim c examples/all.nim", "", true -pkg "protobuf", "nim c -o:protobuff src/protobuf.nim", "", true -pkg "regex", "nim c src/regex" -pkg "rosencrantz", "nim c -o:rsncntz rosencrantz.nim" -pkg "sdl1", "nim c src/sdl.nim" -pkg "sdl2_nim", "nim c sdl2/sdl.nim" -pkg "stint", "nim c -o:stintt stint.nim" -pkg "zero_functional", "nim c test.nim" +pkg "plotly", "nim c examples/all.nim", true +pkg "protobuf", "nim c -o:protobuff -r src/protobuf.nim", true +pkg "regex", "nim c src/regex", true +pkg "result", "nim c -r result.nim" +pkg "rosencrantz", "nim c -o:rsncntz -r rosencrantz.nim" +pkg "sdl1", "nim c -r src/sdl.nim" +pkg "sdl2_nim", "nim c -r sdl2/sdl.nim" +pkg "stint", "nim c -o:stintt -r stint.nim" +pkg "strunicode", "nim c -r src/strunicode.nim", true +pkg "tiny_sqlite" +pkg "unicodedb" +pkg "unicodeplus", "", true +pkg "unpack" +pkg "yaml" +pkg "zero_functional", "nim c -r test.nim" |