[commit: ghc] master: Fix sporadic failing ghci/Linker/Dyn tests (f405632)

git at git.haskell.org git at git.haskell.org
Sun Nov 8 18:23:36 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/f4056324ea30b31f9cec7bf9bafa72bb695f6951/ghc

>---------------------------------------------------------------

commit f4056324ea30b31f9cec7bf9bafa72bb695f6951
Author: Tamar Christina <tamar at zhox.com>
Date:   Sun Nov 8 14:21:30 2015 +0100

    Fix sporadic failing ghci/Linker/Dyn tests
    
    Summary:
    Multiple tests use the same source C file.
    GHC was previously writing the resulting .o files
    in the same folder as the source. When these tests
    are run in parallel, sometimes one of the calls would
    use the partial .o file and throw an error.
    
    The .o files are moved into different folders with this
    change.
    
    Test Plan: make test -C testsuite/tests/ghci/linking/dyn
    
    Reviewers: thomie, austin, bgamari
    
    Reviewed By: bgamari
    
    Differential Revision: https://phabricator.haskell.org/D1449


>---------------------------------------------------------------

f4056324ea30b31f9cec7bf9bafa72bb695f6951
 testsuite/tests/ghci/linking/dyn/Makefile | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/testsuite/tests/ghci/linking/dyn/Makefile b/testsuite/tests/ghci/linking/dyn/Makefile
index cb3a564..8eb4aad 100644
--- a/testsuite/tests/ghci/linking/dyn/Makefile
+++ b/testsuite/tests/ghci/linking/dyn/Makefile
@@ -30,7 +30,7 @@ MY_TEST_HC_OPTS = $(filter-out -rtsopts,$(TEST_HC_OPTS)) $(CFLAGS)
 load_short_name:
 	rm -rf bin_short
 	mkdir bin_short
-	'$(TEST_HC)' $(MY_TEST_HC_OPTS) -shared A.c -o "bin_short/$(call DLL,A)"
+	'$(TEST_HC)' $(MY_TEST_HC_OPTS) -odir "bin_short" -shared A.c -o "bin_short/$(call DLL,A)"
 	rm -f bin_short/*.a
 	echo ":q" | "$(TEST_HC)" --interactive -L"./bin_short" -lA -v0
 
@@ -43,16 +43,16 @@ compile_libAS:
 compile_libAB_dep:
 	rm -rf bin_dep
 	mkdir bin_dep
-	'$(TEST_HC)' $(MY_TEST_HC_OPTS) -shared A.c -o "bin_dep/$(call DLL,A)"
-	'$(TEST_HC)' $(MY_TEST_HC_OPTS) -shared B.c -o "bin_dep/$(call DLL,B)" -lA -L"./bin_dep"
+	'$(TEST_HC)' $(MY_TEST_HC_OPTS) -odir "bin_dep" -shared A.c -o "bin_dep/$(call DLL,A)"
+	'$(TEST_HC)' $(MY_TEST_HC_OPTS) -odir "bin_dep" -shared B.c -o "bin_dep/$(call DLL,B)" -lA -L"./bin_dep"
 	rm -f bin_dep/*.a
 
 .PHONY: compile_libAB_dyn
 compile_libAB_dyn:
 	rm -rf bin_dyn
 	mkdir bin_dyn
-	'$(TEST_HC)' $(MY_TEST_HC_OPTS) -shared A.c -o "bin_dyn/$(call DLL,A)"
-	'$(TEST_HC)' $(MY_TEST_HC_OPTS) -shared B.c -o "bin_dyn/$(call DLL,B)" -lA -L"./bin_dyn"
+	'$(TEST_HC)' $(MY_TEST_HC_OPTS) -odir "bin_dyn" -shared A.c -o "bin_dyn/$(call DLL,A)"
+	'$(TEST_HC)' $(MY_TEST_HC_OPTS) -odir "bin_dyn" -shared B.c -o "bin_dyn/$(call DLL,B)" -lA -L"./bin_dyn"
 	rm -f bin_dyn/*.a
 	'$(TEST_HC)' $(TEST_HC_OPTS) -ignore-dot-ghci -v0 -o "bin_dyn/$(call EXE,T10955dyn)" -L./bin_dyn -lB -lA T10955dyn.hs -v0
 	LD_LIBRARY_PATH=./bin_dyn ./bin_dyn/$(call EXE,T10955dyn)



More information about the ghc-commits mailing list