Disable memory hungry tests in 32bit tests. (#503)
* Disable memory hungry tests in 32bit tests. * Limit threadsync tests for 32bit.
This commit is contained in:
parent
672db137b7
commit
08db79fe63
|
@ -209,31 +209,34 @@ suite "Asynchronous process management test suite":
|
|||
await process.closeWait()
|
||||
|
||||
asyncTest "Capture big amount of bytes from STDOUT stream test":
|
||||
let options = {AsyncProcessOption.EvalCommand}
|
||||
let command =
|
||||
when defined(windows):
|
||||
"tests\\testproc.bat bigdata"
|
||||
else:
|
||||
"tests/testproc.sh bigdata"
|
||||
let expect =
|
||||
when defined(windows):
|
||||
100_000 * (64 + 2)
|
||||
else:
|
||||
100_000 * (64 + 1)
|
||||
let process = await startProcess(command, options = options,
|
||||
stdoutHandle = AsyncProcess.Pipe,
|
||||
stderrHandle = AsyncProcess.Pipe)
|
||||
try:
|
||||
let outBytesFut = process.stdoutStream.read()
|
||||
let errBytesFut = process.stderrStream.read()
|
||||
let res = await process.waitForExit(InfiniteDuration)
|
||||
await allFutures(outBytesFut, errBytesFut)
|
||||
check:
|
||||
res == 0
|
||||
len(outBytesFut.read()) == expect
|
||||
len(errBytesFut.read()) == 0
|
||||
finally:
|
||||
await process.closeWait()
|
||||
when sizeof(int) == 4:
|
||||
skip()
|
||||
else:
|
||||
let options = {AsyncProcessOption.EvalCommand}
|
||||
let command =
|
||||
when defined(windows):
|
||||
"tests\\testproc.bat bigdata"
|
||||
else:
|
||||
"tests/testproc.sh bigdata"
|
||||
let expect =
|
||||
when defined(windows):
|
||||
100_000 * (64 + 2)
|
||||
else:
|
||||
100_000 * (64 + 1)
|
||||
let process = await startProcess(command, options = options,
|
||||
stdoutHandle = AsyncProcess.Pipe,
|
||||
stderrHandle = AsyncProcess.Pipe)
|
||||
try:
|
||||
let outBytesFut = process.stdoutStream.read()
|
||||
let errBytesFut = process.stderrStream.read()
|
||||
let res = await process.waitForExit(InfiniteDuration)
|
||||
await allFutures(outBytesFut, errBytesFut)
|
||||
check:
|
||||
res == 0
|
||||
len(outBytesFut.read()) == expect
|
||||
len(errBytesFut.read()) == 0
|
||||
finally:
|
||||
await process.closeWait()
|
||||
|
||||
asyncTest "Long-waiting waitForExit() test":
|
||||
let command =
|
||||
|
|
|
@ -1520,12 +1520,12 @@ suite "Stream Transport test suite":
|
|||
check waitFor(testWCR(addresses[i])) == ClientsCount * MessagesCount
|
||||
test prefixes[i] & "writeFile() multiple clients (" & $FilesCount & " files)":
|
||||
when defined(windows):
|
||||
if addresses[i].family == AddressFamily.IPv4:
|
||||
if addresses[i].family == AddressFamily.IPv4 and (sizeof(int) == 8):
|
||||
check waitFor(testSendFile(addresses[i])) == FilesCount
|
||||
else:
|
||||
skip()
|
||||
else:
|
||||
if defined(emscripten):
|
||||
if defined(emscripten) or (sizeof(int) == 4):
|
||||
skip()
|
||||
else:
|
||||
check waitFor(testSendFile(addresses[i])) == FilesCount
|
||||
|
|
|
@ -39,9 +39,12 @@ type
|
|||
Sync, Async
|
||||
|
||||
const
|
||||
TestsCount = 1000
|
||||
TestsCount = when sizeof(int) == 8: 1000 else: 100
|
||||
|
||||
suite "Asynchronous multi-threading sync primitives test suite":
|
||||
teardown:
|
||||
checkLeaks()
|
||||
|
||||
proc setResult(thr: ThreadResultPtr, value: int) =
|
||||
thr[].value = value
|
||||
|
||||
|
|
Loading…
Reference in New Issue