You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use case: selectively enabling/disabling tests based on these. Eg, in https://github.com/nim-lang/Nim/pull/8510/files I disabled a test for windows, but what I really wanted was to disable it for appveyor in case one wants to run that test on windows somewhere else (eg locally)
There are other use cases, eg:
if some tests are really slow or memory intensive, we could use this logic:
# when locally: always runs; when under continuous integration: only runs 10% of timewhennotdefined(continousintegration) orrand(1.0) ortrue<0.1: run_expensive_sanity_test()
# when locally: always runs; when under appveyor: only runs when no resource contentionwhennotdefined(appveyor) orcpuLoad() <2: run_expensive_sanity_test()
The text was updated successfully, but these errors were encountered:
I don't see any reasons why we need this specific defines specially for testing platforms, it will allow some cheating tests which will work in CI but will not work in production.
You just need to improve your tests, obtain amount of available RAM and adjust your allocation behavior, but if amount of available RAM is not enough to complete test, then you can just skip it.
you're probably right, it'd be more robust (but requires some APIs). So I guess what's needed is a high-level testing API that wraps common things like:
cpuLoad()
availableRAM()
(which could simply be wrappers that call OS-specific cmd line calls to get these for implementation simplicity)
should we have
defined(appveyor)
,defined(travis)
,defined(continousintegration)
?semantics:
use case: selectively enabling/disabling tests based on these. Eg, in https://github.com/nim-lang/Nim/pull/8510/files I disabled a test for windows, but what I really wanted was to disable it for appveyor in case one wants to run that test on windows somewhere else (eg locally)
There are other use cases, eg:
The text was updated successfully, but these errors were encountered: