diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/Spec.hs | 19 | ||||
-rw-r--r-- | test/test1.f90 | 8 |
2 files changed, 5 insertions, 22 deletions
diff --git a/test/Spec.hs b/test/Spec.hs index c9ec08c..fe6f99c 100644 --- a/test/Spec.hs +++ b/test/Spec.hs @@ -1,20 +1,11 @@ import Development.Shake.FilePath ( (</>) ) +import System.Directory ( withCurrentDirectory ) import System.Process ( callCommand ) main :: IO () main = do - someFunc - someFunc2 + testExampleProject -someFunc :: IO () -someFunc = do - putStrLn "someFunc" - a <- callCommand "gfortran test/test1.f90 -o test1" - a <- callCommand $ "." </> "test1" - return () - -someFunc2 :: IO () -someFunc2 = do - putStrLn "example" - a <- callCommand "cd example_project && stack run -- build" - return () +testExampleProject :: IO () +testExampleProject = + withCurrentDirectory "example_project" $ callCommand "stack run -- build" diff --git a/test/test1.f90 b/test/test1.f90 deleted file mode 100644 index f577b58..0000000 --- a/test/test1.f90 +++ /dev/null @@ -1,8 +0,0 @@ -program test1 -implicit none -integer :: i -i = 5+5 -print *, i -print *, "Fortran test code executed" -print *, "TESTS PASSED" -end program |