"fix stuff lol"
This commit is contained in:
+11
-8
@@ -10,6 +10,7 @@ import Data.List (List)
|
||||
import Data.Functor ((<&>))
|
||||
import System.Directory
|
||||
import Data.Function
|
||||
import System.Environment.Blank (getEnvDefault)
|
||||
|
||||
|
||||
disabled :: List String
|
||||
@@ -26,8 +27,8 @@ goldenTests = do
|
||||
let tests = all_cases
|
||||
& filter (`notElem` disabled)
|
||||
& fmap ("golden"</>)
|
||||
pure $ testGroup "golden"
|
||||
[ watTests tests
|
||||
testGroup "golden" <$> sequenceA
|
||||
[ pure $ watTests tests
|
||||
, executionTests tests
|
||||
]
|
||||
|
||||
@@ -43,15 +44,17 @@ watTests files =
|
||||
(Driver.lower_e2e source)
|
||||
id
|
||||
|
||||
executionTests :: List FilePath -> TestTree
|
||||
executionTests files =
|
||||
testGroup "execution" $ files <&> \test ->
|
||||
executionTests :: List FilePath -> IO TestTree
|
||||
executionTests files = do
|
||||
cmd <- getEnvDefault "GYEHOEK_RUNTIME"
|
||||
"runtime/target/debug/gyehoek-runtime"
|
||||
pure $ testGroup "execution" $ files <&> \test ->
|
||||
let wat = test </> "out.wat"
|
||||
testname = takeFileName test
|
||||
resultfile = test </> "exec"
|
||||
in goldenVsProg
|
||||
testname
|
||||
resultfile
|
||||
"wasmtime"
|
||||
["--invoke", "main", wat]
|
||||
""
|
||||
cmd
|
||||
[wat]
|
||||
"" -- stdin
|
||||
|
||||
Reference in New Issue
Block a user