[Git][ghc/ghc][master] testsuite: Pass TEST_HC_OPTS to many more tests

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Fri Jan 24 16:55:45 UTC 2025



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
e7ab778f by Matthew Pickering at 2025-01-24T11:55:01-05:00
testsuite: Pass TEST_HC_OPTS to many more tests

This passes `-dno-debug-output` to the test and `-dlint.

- - - - -


7 changed files:

- testsuite/tests/bytecode/T24634/Makefile
- testsuite/tests/codeGen/should_compile/Makefile
- testsuite/tests/driver/j-space/jspace.hs
- testsuite/tests/patsyn/should_compile/T13350/Makefile
- testsuite/tests/rts/Makefile
- testsuite/tests/rts/T1791/Makefile
- testsuite/tests/wasm/should_run/control-flow/WasmControlFlow.hs


Changes:

=====================================
testsuite/tests/bytecode/T24634/Makefile
=====================================
@@ -4,14 +4,14 @@ include $(TOP)/mk/test.mk
 
 # This case loads bytecode from the interface file written in the second invocation.
 T24634a:
-	'$(TEST_HC)' -c hello_c.c -o hello_c.o
-	'$(TEST_HC)' -c -fbyte-code-and-object-code -fno-omit-interface-pragmas Hello.hs
-	'$(TEST_HC)' -fprefer-byte-code -fbyte-code-and-object-code -fno-ignore-interface-pragmas hello_c.o Main.hs
+	'$(TEST_HC)' $(TEST_HC_OPTS) -c hello_c.c -o hello_c.o
+	'$(TEST_HC)' $(TEST_HC_OPTS) -c -fbyte-code-and-object-code -fno-omit-interface-pragmas Hello.hs
+	'$(TEST_HC)' $(TEST_HC_OPTS) -fprefer-byte-code -fbyte-code-and-object-code -fno-ignore-interface-pragmas hello_c.o Main.hs
 	./Main
 
 # This case uses the bytecode generated in 'runHscBackendPhase', not involving the interface, since 'Hello' is compiled
 # in the same invocation as 'Main'.
 T24634b:
-	'$(TEST_HC)' -c hello_c.c -o hello_c.o
-	'$(TEST_HC)' -fprefer-byte-code -fbyte-code-and-object-code -fno-ignore-interface-pragmas hello_c.o Hello.hs Main.hs
+	'$(TEST_HC)' $(TEST_HC_OPTS) -c hello_c.c -o hello_c.o
+	'$(TEST_HC)' $(TEST_HC_OPTS) -fprefer-byte-code -fbyte-code-and-object-code -fno-ignore-interface-pragmas hello_c.o Hello.hs Main.hs
 	./Main


=====================================
testsuite/tests/codeGen/should_compile/Makefile
=====================================
@@ -79,4 +79,4 @@ T17648:
 		grep -F 'f :: T GHC.Types.Int -> ()  [TagSig' >/dev/null
 
 T25166:
-	'$(TEST_HC)' -O2 -dno-typeable-binds -ddump-cmm T25166.hs | awk '/foo_closure/{flag=1}/}]/{flag=0}flag'
+	'$(TEST_HC)' $(TEST_HC_OPTS) -O2 -dno-typeable-binds -ddump-cmm T25166.hs | awk '/foo_closure/{flag=1}/}]/{flag=0}flag'


=====================================
testsuite/tests/driver/j-space/jspace.hs
=====================================
@@ -23,7 +23,7 @@ initGhcM :: [String] -> Ghc ()
 initGhcM xs = do
     session <- getSession
     df1 <- getSessionDynFlags
-    let cmdOpts = ["-fforce-recomp"] ++ xs
+    let cmdOpts = ["-fforce-recomp", "-dno-debug-output"] ++ xs
     (df2, leftovers, _) <- parseDynamicFlags (hsc_logger session) df1 (map noLoc cmdOpts)
     setSessionDynFlags df2
     ghcUnitId <- case lookup "Project Unit Id" (compilerInfo df2) of


=====================================
testsuite/tests/patsyn/should_compile/T13350/Makefile
=====================================
@@ -7,7 +7,7 @@ LOCAL_PKGCONF=local.package.conf
 T13350:
 	"$(GHC_PKG)" init $(LOCAL_PKGCONF)
 	cd boolean && "$(TEST_HC)" $(TEST_HC_OPTS) -v0 --make Setup.hs
-	cd boolean && ./Setup configure -v0 --with-compiler="$(TEST_HC)" --with-hc-pkg="$(GHC_PKG)" --package-db=../$(LOCAL_PKGCONF)
+	cd boolean && ./Setup configure -v0 --with-compiler="$(TEST_HC)" --ghc-options='$(filter-out -rtsopts,$(TEST_HC_OPTS))' --with-hc-pkg="$(GHC_PKG)" --package-db=../$(LOCAL_PKGCONF)
 	cd boolean && ./Setup build -v0
 	cd boolean && ./Setup register -v0 --inplace
 	"$(TEST_HC)" $(TEST_HC_OPTS) -c T13350.hs -package-db $(LOCAL_PKGCONF)


=====================================
testsuite/tests/rts/Makefile
=====================================
@@ -82,7 +82,7 @@ T10296a:
 
  .PHONY: T11788
 T11788:
-	"$(TEST_HC)" -c T11788.c -o T11788_obj.o
+	"$(TEST_HC)" $(TEST_HC_OPTS) -c T11788.c -o T11788_obj.o
 	"$(AR)" rsT libT11788.a T11788_obj.o 2> /dev/null
 	echo main | "$(TEST_HC)" $(filter-out -rtsopts, $(TEST_HC_OPTS_INTERACTIVE)) T11788.hs -lT11788 -L"$(PWD)"
 
@@ -101,13 +101,13 @@ T14695:
 
 .PHONY: InternalCounters
 InternalCounters:
-	"$(TEST_HC)" +RTS -s --internal-counters -RTS 2>&1 | grep "Internal Counters"
-	-"$(TEST_HC)" +RTS -s -RTS 2>&1 | grep "Internal Counters"
+	"$(TEST_HC)" $(TEST_HC_OPTS) +RTS -s --internal-counters -RTS 2>&1 | grep "Internal Counters"
+	-"$(TEST_HC)" $(TEST_HC_OPTS) +RTS -s -RTS 2>&1 | grep "Internal Counters"
 
 .PHONY: KeepCafsFail
 KeepCafsFail:
-	"$(TEST_HC)" -c -g -v0 KeepCafsBase.hs KeepCafs1.hs KeepCafs2.hs
-	"$(TEST_HC)" -g -v0 KeepCafsMain.hs KeepCafsBase.o -debug -rdynamic -fwhole-archive-hs-libs $(KEEPCAFS)
+	"$(TEST_HC)" $(TEST_HC_OPTS) -c -g -v0 KeepCafsBase.hs KeepCafs1.hs KeepCafs2.hs
+	"$(TEST_HC)" $(TEST_HC_OPTS) -g -v0 KeepCafsMain.hs KeepCafsBase.o -debug -rdynamic -fwhole-archive-hs-libs $(KEEPCAFS)
 	./KeepCafsMain 2>&1 || echo "exit($$?)"
 
 .PHONY: KeepCafs
@@ -116,37 +116,37 @@ KeepCafs:
 
 .PHONY: EventlogOutput1
 EventlogOutput1:
-	"$(TEST_HC)" -v0 EventlogOutput.hs
+	"$(TEST_HC)" $(TEST_HC_OPTS) -v0 EventlogOutput.hs
 	./EventlogOutput +RTS -l -olhello.eventlog
 	ls hello.eventlog >/dev/null
 
 .PHONY: EventlogOutput2
 EventlogOutput2:
-	"$(TEST_HC)" -v0 EventlogOutput.hs
+	"$(TEST_HC)" $(TEST_HC_OPTS) -v0 EventlogOutput.hs
 	./EventlogOutput +RTS -l
 	ls EventlogOutput.eventlog >/dev/null
 
 .PHONY: EventlogOutputNull
 EventlogOutputNull:
-	"$(TEST_HC)" -rtsopts -v0 EventlogOutput.hs
+	"$(TEST_HC)" $(TEST_HC_OPTS) -rtsopts -v0 EventlogOutput.hs
 	./EventlogOutput +RTS -l --null-eventlog-writer
 	test ! -e EventlogOutput.eventlog
 
 .PHONY: T20199
 T20199:
-	"$(TEST_HC)" -no-hs-main -optcxx-std=c++11 -v0 T20199.cpp -o T20199
+	"$(TEST_HC)" $(TEST_HC_OPTS) -no-hs-main -optcxx-std=c++11 -v0 T20199.cpp -o T20199
 	./T20199
 
 .PHONY: EventlogOutput_IPE
 EventlogOutput_IPE:
-	"$(TEST_HC)" -debug -finfo-table-map -v0 EventlogOutput.hs
+	"$(TEST_HC)" $(TEST_HC_OPTS) -debug -finfo-table-map -v0 EventlogOutput.hs
 	./EventlogOutput +RTS -va 2> EventlogOutput_IPE.stderr.log
 	grep "IPE:" EventlogOutput_IPE.stderr.log
 
 .PHONY: T23142
 T23142:
 	# Test that the -Di output contains different frames
-	"$(TEST_HC)" --run -ignore-dot-ghci T23142.hs +RTS -Di -RTS 2> T23142.log
+	"$(TEST_HC)" $(TEST_HC_OPTS) --run -ignore-dot-ghci T23142.hs +RTS -Di -RTS 2> T23142.log
 	grep -m1 -c "ATOMICALLY_FRAME" T23142.log
 	grep -m1 -c "CATCH_RETRY_FRAME" T23142.log
 	grep -m1 -c "CATCH_STM_FRAME" T23142.log


=====================================
testsuite/tests/rts/T1791/Makefile
=====================================
@@ -3,4 +3,4 @@ include $(TOP)/mk/boilerplate.mk
 include $(TOP)/mk/test.mk
 
 T1791:
-	'$(TEST_HC)' T1791.hs -o T1791 -O -rtsopts
+	'$(TEST_HC)' $(TEST_HC_OPTS) T1791.hs -o T1791 -O -rtsopts


=====================================
testsuite/tests/wasm/should_run/control-flow/WasmControlFlow.hs
=====================================
@@ -41,6 +41,7 @@ main = do
                          `xopt_set` LangExt.StandaloneKindSignatures
                          `xopt_set` LangExt.UnliftedDatatypes
                          `xopt_set` LangExt.DataKinds
+                         `dopt_set` Opt_D_no_debug_output
         setSessionDynFlags dflags
         groups <- mapM loadPath files
         liftIO $ do



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e7ab778f55e070b9381e2a7dbb445a86718acb17

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e7ab778f55e070b9381e2a7dbb445a86718acb17
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20250124/e49dbed1/attachment-0001.html>


More information about the ghc-commits mailing list