From 339efd6e4c371366f4541676644b624af51f8097 Mon Sep 17 00:00:00 2001 From: Brad Richardson Date: Tue, 27 Oct 2020 17:20:01 -0500 Subject: Change bootstrap command line to be more like the Fortran version --- bootstrap/test/Spec.hs | 60 ++++++++++++++++++++++++++------------------------ 1 file changed, 31 insertions(+), 29 deletions(-) (limited to 'bootstrap/test/Spec.hs') diff --git a/bootstrap/test/Spec.hs b/bootstrap/test/Spec.hs index 4e660e7..c1f7108 100644 --- a/bootstrap/test/Spec.hs +++ b/bootstrap/test/Spec.hs @@ -1,6 +1,5 @@ import Development.Shake.FilePath ( () ) import Fpm ( Arguments(..) - , Command(..) , start ) import System.Directory ( withCurrentDirectory ) @@ -19,49 +18,52 @@ main = do testHelloWorld :: IO () testHelloWorld = - withCurrentDirectory (example_path "hello_world") $ start $ Arguments - (Run "") - False - "" + withCurrentDirectory (example_path "hello_world") $ start $ Run + { runRelease = False + , runTarget = Nothing + , runArgs = Nothing + } testHelloComplex :: IO () testHelloComplex = - withCurrentDirectory (example_path "hello_complex") $ start $ Arguments - (Test "") - False - "" + withCurrentDirectory (example_path "hello_complex") $ start $ Test + { testRelease = False + , testTarget = Nothing + , testArgs = Nothing + } testHelloFpm :: IO () testHelloFpm = - withCurrentDirectory (example_path "hello_fpm") $ start $ Arguments - (Run "") - False - "" + withCurrentDirectory (example_path "hello_fpm") $ start $ Run + { runRelease = False + , runTarget = Nothing + , runArgs = Nothing + } testCircular :: IO () testCircular = - withCurrentDirectory (example_path "circular_example") $ start $ Arguments - (Test "") - False - "" + withCurrentDirectory (example_path "circular_example") $ start $ Test + { testRelease = False + , testTarget = Nothing + , testArgs = Nothing + } testWithMakefile :: IO () testWithMakefile = - withCurrentDirectory (example_path "with_makefile") $ start $ Arguments - (Build) - False - "" + withCurrentDirectory (example_path "with_makefile") $ start $ Build + { buildRelease = False + } testMakefileComplex :: IO () testMakefileComplex = - withCurrentDirectory (example_path "makefile_complex") $ start $ Arguments - (Run "") - False - "" + withCurrentDirectory (example_path "makefile_complex") $ start $ Run + { runRelease = False + , runTarget = Nothing + , runArgs = Nothing + } testSubmodule :: IO () testSubmodule = - withCurrentDirectory (example_path "submodules") $ start $ Arguments - (Build) - False - "" + withCurrentDirectory (example_path "submodules") $ start $ Build + { buildRelease = False + } -- cgit v1.2.3 From 7b191a773d3a1f91131943a4ed84b285839bdf35 Mon Sep 17 00:00:00 2001 From: Brad Richardson Date: Wed, 28 Oct 2020 12:33:07 -0500 Subject: Add command line options to specify the compiler --- bootstrap/test/Spec.hs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'bootstrap/test/Spec.hs') diff --git a/bootstrap/test/Spec.hs b/bootstrap/test/Spec.hs index c1f7108..ac72b07 100644 --- a/bootstrap/test/Spec.hs +++ b/bootstrap/test/Spec.hs @@ -20,6 +20,7 @@ testHelloWorld :: IO () testHelloWorld = withCurrentDirectory (example_path "hello_world") $ start $ Run { runRelease = False + , runCompiler = "gfortran" , runTarget = Nothing , runArgs = Nothing } @@ -28,6 +29,7 @@ testHelloComplex :: IO () testHelloComplex = withCurrentDirectory (example_path "hello_complex") $ start $ Test { testRelease = False + , testCompiler = "gfortran" , testTarget = Nothing , testArgs = Nothing } @@ -36,6 +38,7 @@ testHelloFpm :: IO () testHelloFpm = withCurrentDirectory (example_path "hello_fpm") $ start $ Run { runRelease = False + , runCompiler = "gfortran" , runTarget = Nothing , runArgs = Nothing } @@ -44,6 +47,7 @@ testCircular :: IO () testCircular = withCurrentDirectory (example_path "circular_example") $ start $ Test { testRelease = False + , testCompiler = "gfortran" , testTarget = Nothing , testArgs = Nothing } @@ -52,12 +56,14 @@ testWithMakefile :: IO () testWithMakefile = withCurrentDirectory (example_path "with_makefile") $ start $ Build { buildRelease = False + , buildCompiler = "gfortran" } testMakefileComplex :: IO () testMakefileComplex = withCurrentDirectory (example_path "makefile_complex") $ start $ Run { runRelease = False + , runCompiler = "gfortran" , runTarget = Nothing , runArgs = Nothing } @@ -66,4 +72,5 @@ testSubmodule :: IO () testSubmodule = withCurrentDirectory (example_path "submodules") $ start $ Build { buildRelease = False + , buildCompiler = "gfortran" } -- cgit v1.2.3 From 5d122c2854dbec1470a660bf80cd0544a8806a78 Mon Sep 17 00:00:00 2001 From: Brad Richardson Date: Wed, 28 Oct 2020 12:49:26 -0500 Subject: Add command line options to specify compiler flags --- bootstrap/test/Spec.hs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'bootstrap/test/Spec.hs') diff --git a/bootstrap/test/Spec.hs b/bootstrap/test/Spec.hs index ac72b07..dfa73df 100644 --- a/bootstrap/test/Spec.hs +++ b/bootstrap/test/Spec.hs @@ -21,6 +21,7 @@ testHelloWorld = withCurrentDirectory (example_path "hello_world") $ start $ Run { runRelease = False , runCompiler = "gfortran" + , runFlags = [] , runTarget = Nothing , runArgs = Nothing } @@ -30,6 +31,7 @@ testHelloComplex = withCurrentDirectory (example_path "hello_complex") $ start $ Test { testRelease = False , testCompiler = "gfortran" + , testFlags = [] , testTarget = Nothing , testArgs = Nothing } @@ -39,6 +41,7 @@ testHelloFpm = withCurrentDirectory (example_path "hello_fpm") $ start $ Run { runRelease = False , runCompiler = "gfortran" + , runFlags = [] , runTarget = Nothing , runArgs = Nothing } @@ -48,6 +51,7 @@ testCircular = withCurrentDirectory (example_path "circular_example") $ start $ Test { testRelease = False , testCompiler = "gfortran" + , testFlags = [] , testTarget = Nothing , testArgs = Nothing } @@ -57,6 +61,7 @@ testWithMakefile = withCurrentDirectory (example_path "with_makefile") $ start $ Build { buildRelease = False , buildCompiler = "gfortran" + , buildFlags = [] } testMakefileComplex :: IO () @@ -64,6 +69,7 @@ testMakefileComplex = withCurrentDirectory (example_path "makefile_complex") $ start $ Run { runRelease = False , runCompiler = "gfortran" + , runFlags = [] , runTarget = Nothing , runArgs = Nothing } @@ -73,4 +79,5 @@ testSubmodule = withCurrentDirectory (example_path "submodules") $ start $ Build { buildRelease = False , buildCompiler = "gfortran" + , buildFlags = [] } -- cgit v1.2.3