From 32af0dea4bfa1aa30525048ddcd91f74727e2a52 Mon Sep 17 00:00:00 2001 From: Brad Richardson Date: Mon, 13 Apr 2020 19:10:39 -0500 Subject: Simplify the tests --- test/Spec.hs | 19 +++++-------------- test/test1.f90 | 8 -------- 2 files changed, 5 insertions(+), 22 deletions(-) delete mode 100644 test/test1.f90 (limited to 'test') 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 -- cgit v1.2.3