trunner_special.nim 971 B

123456789101112131415161718192021222324252627282930313233
  1. discard """
  2. targets: "c cpp"
  3. joinable: false
  4. disabled: osx
  5. """
  6. #[
  7. Runs tests that require special treatment, e.g. because they rely on 3rd party code
  8. or require external networking.
  9. xxx test all tests/untestable/* here, possibly with adjustments to make running times reasonable
  10. ]#
  11. import std/[strformat,os,unittest,compilesettings]
  12. import stdtest/specialpaths
  13. const
  14. nim = getCurrentCompilerExe()
  15. mode = querySetting(backend)
  16. proc runCmd(cmd: string) =
  17. let ret = execShellCmd(cmd)
  18. check ret == 0 # allows more than 1 failure
  19. proc main =
  20. let options = fmt"-b:{mode} --hints:off"
  21. block: # SSL nimDisableCertificateValidation integration tests
  22. runCmd fmt"{nim} r {options} -d:nimDisableCertificateValidation -d:ssl {testsDir}/untestable/thttpclient_ssl_disabled.nim"
  23. block: # SSL certificate check integration tests
  24. runCmd fmt"{nim} r {options} -d:ssl --threads:on --mm:refc {testsDir}/untestable/thttpclient_ssl_remotenetwork.nim"
  25. main()