summary refs log tree commit diff stats
path: root/testament
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2021-02-17 10:30:09 -0800
committerGitHub <noreply@github.com>2021-02-17 19:30:09 +0100
commit31bb67a309ae4bfdc1909c0a7c6748a534a0b00e (patch)
tree8169cc14488a083ffb2d1e8373042bdc0c0c0e73 /testament
parent35e14998ec97deb4efdbec9390b607c876a7a17f (diff)
downloadNim-31bb67a309ae4bfdc1909c0a7c6748a534a0b00e.tar.gz
add -d:nimStrictMode in CI to keep code from regressing; fixes ConvFromXtoItselfNotNeeded, UnusedImport notes (#16764)
Diffstat (limited to 'testament')
-rw-r--r--testament/backend.nim2
-rw-r--r--testament/caasdriver.nim2
-rw-r--r--testament/testament.nim7
3 files changed, 5 insertions, 6 deletions
diff --git a/testament/backend.nim b/testament/backend.nim
index c7d13be7e..1770c6657 100644
--- a/testament/backend.nim
+++ b/testament/backend.nim
@@ -23,7 +23,7 @@ proc getMachine*(): MachineId =
   var name = execProcess("hostname").strip
   if name.len == 0:
     name = when defined(posix): getEnv("HOSTNAME")
-           else: getEnv("COMPUTERNAME").string
+           else: getEnv("COMPUTERNAME")
   if name.len == 0:
     quit "cannot determine the machine name"
 
diff --git a/testament/caasdriver.nim b/testament/caasdriver.nim
index 4f17651b5..01e402e07 100644
--- a/testament/caasdriver.nim
+++ b/testament/caasdriver.nim
@@ -175,7 +175,7 @@ when isMainModule:
     verbose = false
 
   for i in 0..paramCount() - 1:
-    let param = string(paramStr(i + 1))
+    let param = paramStr(i + 1)
     case param
     of "verbose": verbose = true
     else: filter = param
diff --git a/testament/testament.nim b/testament/testament.nim
index 2ee1539ff..8637f9464 100644
--- a/testament/testament.nim
+++ b/testament/testament.nim
@@ -683,7 +683,7 @@ proc main() =
     case p.key.normalize
     of "print", "verbose": optPrintResults = true
     of "failing": optFailing = true
-    of "pedantic": discard # deadcode
+    of "pedantic": discard # deadcode refs https://github.com/nim-lang/Nim/issues/16731
     of "targets":
       targetsStr = p.val
       gTargets = parseTargets(targetsStr)
@@ -739,7 +739,7 @@ proc main() =
   var r = initResults()
   case action
   of "all":
-    #processCategory(r, Category"megatest", p.cmdLineRest.string, testsDir, runJoinableTests = false)
+    #processCategory(r, Category"megatest", p.cmdLineRest, testsDir, runJoinableTests = false)
 
     var myself = quoteShell(getAppFilename())
     if targetsStr.len > 0:
@@ -798,8 +798,7 @@ proc main() =
     p.next
     processPattern(r, pattern, p.cmdLineRest, simulate)
   of "r", "run":
-    var subPath = p.key
-    let (cat, path) = splitTestFile(subPath)
+    let (cat, path) = splitTestFile(p.key)
     processSingleTest(r, cat.Category, p.cmdLineRest, path, gTargets, targetsSet)
   of "html":
     generateHtml(resultsFile, optFailing)