summary refs log tree commit diff stats
path: root/tests/misc
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2021-02-02 18:32:33 -0800
committerGitHub <noreply@github.com>2021-02-02 18:32:33 -0800
commit6f1289b80ccf599008368b121d874b4ce4717fc6 (patch)
treebaafecb74e7ed6b264b27f05bafd724a43db8646 /tests/misc
parentf4449a897ddb094fbc2e1c96eea3d8a8afdcd76a (diff)
downloadNim-6f1289b80ccf599008368b121d874b4ce4717fc6.tar.gz
remove .github/workflows/ci_ssl.yml; instead run via trunner_thirdparty (#16221)
Diffstat (limited to 'tests/misc')
-rw-r--r--tests/misc/trunner.nim7
-rw-r--r--tests/misc/trunner_special.nim31
2 files changed, 33 insertions, 5 deletions
diff --git a/tests/misc/trunner.nim b/tests/misc/trunner.nim
index 63aac0ede..a66177f28 100644
--- a/tests/misc/trunner.nim
+++ b/tests/misc/trunner.nim
@@ -7,7 +7,7 @@ discard """
 ## A few others could be added to here to simplify code.
 ## Note: this test is a bit slow but tests a lot of things; please don't disable.
 
-import std/[strformat,os,osproc,unittest]
+import std/[strformat,os,osproc,unittest,compilesettings]
 from std/sequtils import toSeq,mapIt
 from std/algorithm import sorted
 import stdtest/[specialpaths, unittest_light]
@@ -25,10 +25,7 @@ const
     # useful when you want to turn only some hints on, and some common ones off.
     # pending https://github.com/timotheecour/Nim/issues/453, simplify to: `--hints:off`
   nim = getCurrentCompilerExe()
-  mode =
-    when defined(c): "c"
-    elif defined(cpp): "cpp"
-    else: static: doAssert false
+  mode = querySetting(backend)
   nimcache = buildDir / "nimcacheTrunner"
     # instead of `querySetting(nimcacheDir)`, avoids stomping on other parallel tests
 
diff --git a/tests/misc/trunner_special.nim b/tests/misc/trunner_special.nim
new file mode 100644
index 000000000..47ba44a29
--- /dev/null
+++ b/tests/misc/trunner_special.nim
@@ -0,0 +1,31 @@
+discard """
+  targets: "c cpp"
+  joinable: false
+"""
+
+#[
+Runs tests that require special treatment, e.g. because they rely on 3rd party code
+or require external networking.
+
+xxx test all tests/untestable/* here, possibly with adjustments to make running times reasonable
+]#
+
+import std/[strformat,os,unittest,compilesettings]
+import stdtest/specialpaths
+
+const
+  nim = getCurrentCompilerExe()
+  mode = querySetting(backend)
+
+proc runCmd(cmd: string) =
+  let ret = execShellCmd(cmd)
+  check ret == 0 # allows more than 1 failure
+
+proc main =
+  let options = fmt"-b:{mode} --hints:off"
+  block: # SSL nimDisableCertificateValidation integration tests
+    runCmd fmt"{nim} r {options} -d:nimDisableCertificateValidation -d:ssl {testsDir}/untestable/thttpclient_ssl_disabled.nim"
+  block: # SSL certificate check integration tests
+    runCmd fmt"{nim} r {options} -d:ssl --threads:on {testsDir}/untestable/thttpclient_ssl_remotenetwork.nim"
+
+main()