Commit 3a17a840 authored by Mart Lubbers's avatar Mart Lubbers

add unit test for externalprocessses

parent 97373039
Pipeline #29250 passed with stage
in 4 minutes and 38 seconds
Version: 1.4
Global
ProjectRoot: .
Target: iTasks
Exec: {Project}*iTasks.WF.Tasks.IO.UnitTests
ByteCode: {Project}*iTasks.WF.Tasks.IO.UnitTests.bc
CodeGen
CheckStacks: False
CheckIndexes: True
OptimiseABC: True
GenerateByteCode: True
Application
HeapSize: 20971520
StackSize: 512000
ExtraMemory: 8192
IntialHeapSize: 204800
HeapSizeMultiplier: 4096
ShowExecutionTime: False
ShowGC: False
ShowStackSize: False
MarkingCollector: False
DisableRTSFlags: False
StandardRuntimeEnv: True
Profile
Memory: False
MemoryMinimumHeapSize: 0
Time: False
Stack: False
Dynamics: True
GenericFusion: False
DescExL: True
Output
Output: NoConsole
Font: Monaco
FontSize: 9
WriteStdErr: False
Link
LinkMethod: Static
GenerateRelocations: False
GenerateSymbolTable: False
GenerateLinkMap: False
LinkResources: False
ResourceSource:
GenerateDLL: False
ExportedNames:
StripByteCode: True
KeepByteCodeSymbols: True
PrelinkByteCode: True
Paths
Path: {Project}
Path: {Project}*..*..*Libraries
Path: {Application}*lib*Dynamics
Path: {Application}*lib*GraphCopy
Path: {Application}*lib*ABCInterpreter
Path: {Application}*lib*StdEnv
Path: {Application}*lib*TCPIP
Path: {Application}*lib*Platform
Path: {Application}*lib*Platform*Deprecated*StdLib
Precompile:
Postlink:
MainModule
Name: iTasks.WF.Tasks.Core.UnitTests
Dir: {Project}
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
StrictnessAnalysis: True
ListTypes: StrictExportTypes
ListAttributes: True
Warnings: True
Verbose: True
ReadableABC: False
ReuseUniqueNodes: True
Fusion: False
module iTasks.WF.Tasks.IO.UnitTests
import Data.Functor
import iTasks
import iTasks.Extensions.Process
import iTasks.Util.Testing
import System.Time
import Data.Func
import Data.Tuple
import Testing.TestEvents
Start world = runUnitTests
[ {name="fastbusy", test=test {tv_sec=0,tv_nsec=1} "/bin/true" []}
, {name="slowbusy", test=test {tv_sec=0,tv_nsec=1} "/bin/sleep" ["5s"]}
, {name="fastpoll", test=test {tv_sec=0,tv_nsec=1000000} "/bin/true" []}
, {name="slowpoll", test=test {tv_sec=0,tv_nsec=1000000} "/bin/sleep" ["5s"]}
] world
where
test ts cmd args = (\w->(Passed, w)) o startEngine (onStartup $
withShared [] \stdin->withShared ([], []) \stdout->
externalProcess ts cmd args Nothing Nothing stdin stdout)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment