Commit c705406c authored by Camil Staps's avatar Camil Staps 🍃

Fix previous merge

parent 121eba63
Pipeline #28191 passed with stage
in 5 minutes and 13 seconds
......@@ -11,9 +11,9 @@ import Text, Data.Tuple, Data.Error, Data.Func, System.FilePath, System.OS
derive class iTask EndEventType, Expression
derive gEditor EndEvent, FailReason, FailedAssertion, CounterExample, Relation
derive gText EndEvent, FailReason, FailedAssertion, CounterExample, Relation
derive gEq EndEvent, FailReason, FailedAssertion, CounterExample, Relation
derive gEditor EndEvent, TestLocation, FailReason, FailedAssertion, CounterExample, Relation
derive gText EndEvent, TestLocation, FailReason, FailedAssertion, CounterExample, Relation
derive gEq EndEvent, TestLocation, FailReason, FailedAssertion, CounterExample, Relation
compileTestModule :: CleanModuleName -> Task EndEvent
compileTestModule (path,name)
......@@ -21,8 +21,8 @@ compileTestModule (path,name)
>-| get cpmExecutable
>>- \cpm -> runWithOutput cpm [prjPath] Nothing //Build the test
@ \(c,o) -> if (passed c o)
{name = testName, event = Passed, message = join "" o}
{name = testName, event = (Failed Nothing), message = join "" o}
{name = testName, location=Just {moduleName=Just name}, event = Passed, message = join "" o}
{name = testName, location=Just {moduleName=Just name}, event = (Failed Nothing), message = join "" o}
where
testName = "Compile: " +++ name
iclPath = cleanFilePath (path,name,Icl)
......@@ -53,8 +53,8 @@ where
= [res \\ Just res <- map (fromJSON o fromString) lines]
where
//If we can't parse the output, We'll treat it as a single simple test executable
fallback 0 _ = [{name=name,event=Passed,message="Execution returned 0"}]
fallback _ output = [{name=name,event=Failed Nothing,message=output}]
fallback 0 _ = [{name=name,location=Just {moduleName=Just name},event=Passed,message="Execution returned 0"}]
fallback _ output = [{name=name,location=Just {moduleName=Just name},event=Failed Nothing,message=output}]
runWithOutput :: FilePath [String] (Maybe FilePath) -> Task (Int,[String])
runWithOutput prog args dir = withShared ([], []) \out->withShared [] \stdin->
......
......@@ -39,9 +39,9 @@ EXAMPLE_MODULES :== ["../Examples/BasicApiExamples.icl"
derive class iTask EndEventType, Expression
derive gEditor EndEvent, FailReason, FailedAssertion, CounterExample, Relation
derive gEq EndEvent, FailReason, FailedAssertion, CounterExample, Relation
derive gText EndEvent, FailReason, FailedAssertion, CounterExample, Relation
derive gEditor EndEvent, TestLocation, FailReason, FailedAssertion, CounterExample, Relation
derive gEq EndEvent, TestLocation, FailReason, FailedAssertion, CounterExample, Relation
derive gText EndEvent, TestLocation, FailReason, FailedAssertion, CounterExample, Relation
inspectCodeQuality :: Task ()
inspectCodeQuality
......
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