diff options
81 files changed, 263 insertions, 211 deletions
diff --git a/.gitignore b/.gitignore index 1ca350be59..937d58ffd2 100644 --- a/.gitignore +++ b/.gitignore @@ -181,3 +181,6 @@ GIT_COMMIT_ID .ghc .bash_history .gitconfig + +# Should be equal to testdir_suffix from testsuite/driver/testlib.py. +*.run diff --git a/libraries/hpc b/libraries/hpc -Subproject d8b5381bd5d03a3a75f4a1b91f1ede6fe0fd0ce +Subproject b52ab0cc013beb1440607a7e4521a45fd6e96ce diff --git a/testsuite/config/ghc b/testsuite/config/ghc index 678cc56bc5..3be803de56 100644 --- a/testsuite/config/ghc +++ b/testsuite/config/ghc @@ -81,7 +81,6 @@ if (ghc_with_llvm == 1): config.run_ways.append('optllvm') config.in_tree_compiler = in_tree_compiler -config.cleanup = cleanup config.way_flags = lambda name : { 'normal' : [], diff --git a/testsuite/driver/runtests.py b/testsuite/driver/runtests.py index 39689c6255..33b432fd6d 100644 --- a/testsuite/driver/runtests.py +++ b/testsuite/driver/runtests.py @@ -276,10 +276,24 @@ else: # set stdout to unbuffered (is this the best way to do it?) sys.stdout = os.fdopen(sys.__stdout__.fileno(), "w", 0) -tempdir = tempfile.mkdtemp('', 'ghctest-') +if config.local: + tempdir = '' +else: + # See note [Running tests in /tmp] + tempdir = tempfile.mkdtemp('', 'ghctest-') + + # opts.testdir should be quoted when used, to make sure the testsuite + # keeps working when it contains backward slashes, for example from + # using os.path.join. Windows native and mingw* python + # (/mingw64/bin/python) set `os.path.sep = '\\'`, while msys2 python + # (/bin/python, /usr/bin/python or /usr/local/bin/python) sets + # `os.path.sep = '/'`. + # To catch usage of unquoted opts.testdir early, insert some spaces into + # tempdir. + tempdir = os.path.join(tempdir, 'test spaces') def cleanup_and_exit(exitcode): - if config.cleanup: + if config.cleanup and tempdir: shutil.rmtree(tempdir, ignore_errors=True) exit(exitcode) @@ -334,3 +348,35 @@ else: summary(t, open(config.summary_file, 'w')) cleanup_and_exit(0) + +# Note [Running tests in /tmp] +# +# Use LOCAL=0 to run tests in /tmp, to catch tests that use files from +# the source directory without copying them to the test directory first. +# +# As an example, take a run_command test with a Makefile containing +# `$(TEST_HC) ../Foo.hs`. GHC will now create the output files Foo.o and +# Foo.hi in the source directory. There are 2 problems with this: +# * Output files in the source directory won't get cleaned up automatically. +# * Two tests might (over)write the same output file. +# +# Tests that only fail when run concurrently with other tests are the +# worst, so we try to catch them early by enabling LOCAL=0 in validate. +# +# Adding -outputdir='.' to TEST_HC_OPTS would help a bit, but it requires +# making changes to quite a few tests. The problem is that +# `$(TEST_HC) ../Foo.hs -outputdir=.` with Foo.hs containing +# `module Main where` does not produce Foo.o, as it would without +# -outputdir, but Main.o. See [1]. +# +# Using -outputdir='.' is not foolproof anyway, since it does not change +# the destination of the final executable (Foo.exe). +# +# Another hardening method that could be tried is to `chmod -w` the +# source directory. +# +# By default we set LOCAL=1, because it makes it easier to inspect the +# test directory while working on a new test. +# +# [1] +# https://downloads.haskell.org/~ghc/8.0.1/docs/html/users_guide/separate_compilation.html#output-files diff --git a/testsuite/driver/testglobals.py b/testsuite/driver/testglobals.py index 17aa6d36b8..d08141f251 100644 --- a/testsuite/driver/testglobals.py +++ b/testsuite/driver/testglobals.py @@ -274,6 +274,12 @@ class TestOptions: self.compile_timeout_multiplier = 1.0 self.run_timeout_multiplier = 1.0 + self.cleanup = True + + # Sould we run tests in a local subdirectory (<testname>-run) or + # in temporary directory in /tmp? See Note [Running tests in /tmp]. + self.local = True + # The default set of options global default_testopts default_testopts = TestOptions() diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py index f6db8288fa..32b6951fe9 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/driver/testlib.py @@ -546,25 +546,6 @@ def executeSetups(fs, name, opts): # The current directory of tests def newTestDir(tempdir, dir): - # opts.testdir should be quoted when used, to make sure the testsuite - # keeps working when it contains backward slashes, for example from - # using os.path.join. Windows native and mingw* python - # (/mingw64/bin/python) set `os.path.sep = '\\'`, while msys2 python - # (/bin/python, /usr/bin/python or /usr/local/bin/python) sets - # `os.path.sep = '/'`. - # To catch usage of unquoted opts.testdir early, insert some spaces into - # tempdir. - tempdir = os.path.join(tempdir, 'test spaces') - - # Hack. A few tests depend on files in ancestor directories - # (e.g. extra_files(['../../../../libraries/base/dist-install/haddock.t'])) - # Make sure tempdir is sufficiently "deep", such that copying/linking those - # files won't cause any problems. - # - # If you received a framework failure about adding an extra level: - # * add one extra '../' to the startswith('../../../../../') in do_test - # * add one more number here: - tempdir = os.path.join(tempdir, '1', '2', '3') global thisdir_settings # reset the options for this test directory @@ -572,10 +553,12 @@ def newTestDir(tempdir, dir): return _newTestDir(name, opts, tempdir, dir) thisdir_settings = settings +# Should be equal to entry in toplevel .gitignore. +testdir_suffix = '.run' def _newTestDir(name, opts, tempdir, dir): opts.srcdir = os.path.join(os.getcwd(), dir) - opts.testdir = os.path.join(tempdir, dir, name) + opts.testdir = os.path.join(tempdir, dir, name + testdir_suffix) opts.compiler_always_flags = config.compiler_always_flags # ----------------------------------------------------------------------------- @@ -718,13 +701,10 @@ def test_common_work (name, opts, func, args): # this seems to be necessary for only about 10% of all # tests). files = set((f for f in os.listdir(opts.srcdir) - if f.startswith(name))) + if f.startswith(name) and + not f.endswith(testdir_suffix))) for filename in (opts.extra_files + extra_src_files.get(name, [])): - if filename.startswith('../../../../../../'): - framework_fail(name, 'whole-test', - 'add extra level to testlib.py:newTestDir for: ' + filename) - - elif filename.startswith('/'): + if filename.startswith('/'): framework_fail(name, 'whole-test', 'no absolute paths in extra_files please: ' + filename) @@ -790,8 +770,18 @@ def do_test(name, way, func, args, files): # would otherwise (accidentally) write to the same output file. # It also makes it easier to keep the testsuite clean. - for filename in files: - src = in_srcdir(filename) + for extra_file in files: + src = in_srcdir(extra_file) + if extra_file.startswith('..'): + # In case the extra_file is a file in an ancestor + # directory (e.g. extra_files(['../shell.hs'])), make + # sure it is copied to the test directory + # (testdir/shell.hs), instead of ending up somewhere + # else in the tree (testdir/../shell.hs) + filename = os.path.basename(extra_file) + else: + filename = extra_file + assert not '..' in filename # no funny stuff (foo/../../bar) dst = in_testdir(filename) if os.path.isfile(src): @@ -821,7 +811,7 @@ def do_test(name, way, func, args, files): pass else: framework_fail(name, way, - 'extra_file does not exist: ' + filename) + 'extra_file does not exist: ' + extra_file) if not files: # Always create the testdir, even when no files were copied diff --git a/testsuite/mk/test.mk b/testsuite/mk/test.mk index d7e65bbf83..b5ea5a3ddd 100644 --- a/testsuite/mk/test.mk +++ b/testsuite/mk/test.mk @@ -192,11 +192,20 @@ RUNTEST_OPTS += --skip-perf-tests endif ifeq "$(CLEANUP)" "0" -RUNTEST_OPTS += -e cleanup=False +RUNTEST_OPTS += -e config.cleanup=False else ifeq "$(CLEANUP)" "NO" -RUNTEST_OPTS += -e cleanup=False +RUNTEST_OPTS += -e config.cleanup=False else -RUNTEST_OPTS += -e cleanup=True +RUNTEST_OPTS += -e config.cleanup=True +endif + +ifeq "$(LOCAL)" "0" +# See Note [Running tests in /tmp]. +RUNTEST_OPTS += -e config.local=False +else ifeq "$(LOCAL)" "NO" +RUNTEST_OPTS += -e config.local=False +else +RUNTEST_OPTS += -e config.local=True endif RUNTEST_OPTS += \ diff --git a/testsuite/tests/ghci.debugger/scripts/all.T b/testsuite/tests/ghci.debugger/scripts/all.T index 113eadf9ce..b17d205dd2 100644 --- a/testsuite/tests/ghci.debugger/scripts/all.T +++ b/testsuite/tests/ghci.debugger/scripts/all.T @@ -35,9 +35,7 @@ test('print031', normal, ghci_script, ['print031.script']) test('print032', normal, ghci_script, ['print032.script']) test('print033', normal, ghci_script, ['print033.script']) test('print034', normal, ghci_script, ['print034.script']) -test('print035', - [extra_clean(['../Unboxed.hi', '../Unboxed.o'])], - ghci_script, ['print035.script']) +test('print035', normal, ghci_script, ['print035.script']) test('print036', expect_broken(9046), ghci_script, ['print036.script']) test('break001', normal, ghci_script, ['break001.script']) diff --git a/testsuite/tests/ghci.debugger/scripts/break001.script b/testsuite/tests/ghci.debugger/scripts/break001.script index a4d2634feb..3e82465416 100644 --- a/testsuite/tests/ghci.debugger/scripts/break001.script +++ b/testsuite/tests/ghci.debugger/scripts/break001.script @@ -1,4 +1,4 @@ -:l ../Test2 +:l Test2 :b 3 :b 5 f (1 :: Integer) diff --git a/testsuite/tests/ghci.debugger/scripts/break001.stdout b/testsuite/tests/ghci.debugger/scripts/break001.stdout index 99ffda067a..50be9af2cc 100644 --- a/testsuite/tests/ghci.debugger/scripts/break001.stdout +++ b/testsuite/tests/ghci.debugger/scripts/break001.stdout @@ -1,9 +1,9 @@ -Breakpoint 0 activated at ../Test2.hs:3:7-9 -Breakpoint 1 activated at ../Test2.hs:5:7 -Stopped in Test2.f, ../Test2.hs:3:7-9 +Breakpoint 0 activated at Test2.hs:3:7-9 +Breakpoint 1 activated at Test2.hs:5:7 +Stopped in Test2.f, Test2.hs:3:7-9 _result :: Integer = _ x :: Integer = 1 -Stopped in Test2.g, ../Test2.hs:5:7 +Stopped in Test2.g, Test2.hs:5:7 _result :: Integer = _ y :: Integer = 1 y :: Integer = 1 diff --git a/testsuite/tests/ghci.debugger/scripts/break002.script b/testsuite/tests/ghci.debugger/scripts/break002.script index 0bc2605e4f..adc6a1420e 100644 --- a/testsuite/tests/ghci.debugger/scripts/break002.script +++ b/testsuite/tests/ghci.debugger/scripts/break002.script @@ -1,5 +1,5 @@ -- can't set breakpoints on non-interpreted things: :b Data.List.map -:l ../Test2.hs +:l Test2.hs :b Data.List.map diff --git a/testsuite/tests/ghci.debugger/scripts/break003.script b/testsuite/tests/ghci.debugger/scripts/break003.script index 68ca96fcd2..a72c3ac4a3 100644 --- a/testsuite/tests/ghci.debugger/scripts/break003.script +++ b/testsuite/tests/ghci.debugger/scripts/break003.script @@ -1,4 +1,4 @@ -:l ../Test3 +:l Test3 :b 2 main f diff --git a/testsuite/tests/ghci.debugger/scripts/break003.stdout b/testsuite/tests/ghci.debugger/scripts/break003.stdout index d510a476ff..19d7a442a1 100644 --- a/testsuite/tests/ghci.debugger/scripts/break003.stdout +++ b/testsuite/tests/ghci.debugger/scripts/break003.stdout @@ -1,5 +1,5 @@ -Breakpoint 0 activated at ../Test3.hs:2:18-31 -Stopped in Main.mymap, ../Test3.hs:2:18-31 +Breakpoint 0 activated at Test3.hs:2:18-31 +Stopped in Main.mymap, Test3.hs:2:18-31 _result :: [a] = _ f :: t -> a = _ x :: t = _ diff --git a/testsuite/tests/ghci.debugger/scripts/break004.script b/testsuite/tests/ghci.debugger/scripts/break004.script index e4bb16fd1a..12421ab168 100644 --- a/testsuite/tests/ghci.debugger/scripts/break004.script +++ b/testsuite/tests/ghci.debugger/scripts/break004.script @@ -1,4 +1,4 @@ -:l ../Test4.hs +:l Test4.hs :b f seq (f (+(1::Int)) "abc") () -- We can subvert the Unknown machinery this was and pass the string diff --git a/testsuite/tests/ghci.debugger/scripts/break005.script b/testsuite/tests/ghci.debugger/scripts/break005.script index c6fec5e019..8d2f262cd3 100644 --- a/testsuite/tests/ghci.debugger/scripts/break005.script +++ b/testsuite/tests/ghci.debugger/scripts/break005.script @@ -1,4 +1,4 @@ -:l ../QSort +:l QSort :st qsort [1::Integer,2] :step seq left () diff --git a/testsuite/tests/ghci.debugger/scripts/break005.stdout b/testsuite/tests/ghci.debugger/scripts/break005.stdout index 35e92d44f0..4311e70fb6 100644 --- a/testsuite/tests/ghci.debugger/scripts/break005.stdout +++ b/testsuite/tests/ghci.debugger/scripts/break005.stdout @@ -1,9 +1,9 @@ -Stopped in QSort.qsort, ../QSort.hs:5:16-51 +Stopped in QSort.qsort, QSort.hs:5:16-51 _result :: [Integer] = _ a :: Integer = 1 left :: [Integer] = _ right :: [Integer] = _ -Stopped in QSort.qsort, ../QSort.hs:5:17-26 +Stopped in QSort.qsort, QSort.hs:5:17-26 _result :: [a] = _ left :: [a] = _ () diff --git a/testsuite/tests/ghci.debugger/scripts/break006.script b/testsuite/tests/ghci.debugger/scripts/break006.script index 6cbc050742..9546290fd4 100644 --- a/testsuite/tests/ghci.debugger/scripts/break006.script +++ b/testsuite/tests/ghci.debugger/scripts/break006.script @@ -1,4 +1,4 @@ -:l ../Test3.hs +:l Test3.hs :st mymap (+1) [1::Integer,2,3] :show bindings f x -- should fail, unknown return type diff --git a/testsuite/tests/ghci.debugger/scripts/break006.stdout b/testsuite/tests/ghci.debugger/scripts/break006.stdout index 35fa44564c..8a2463fa4e 100644 --- a/testsuite/tests/ghci.debugger/scripts/break006.stdout +++ b/testsuite/tests/ghci.debugger/scripts/break006.stdout @@ -1,4 +1,4 @@ -Stopped in Main.mymap, ../Test3.hs:2:18-31 +Stopped in Main.mymap, Test3.hs:2:18-31 _result :: [a] = _ f :: Integer -> a = _ x :: Integer = 1 diff --git a/testsuite/tests/ghci.debugger/scripts/break008.script b/testsuite/tests/ghci.debugger/scripts/break008.script index 0cdf7566e6..700182e9d2 100644 --- a/testsuite/tests/ghci.debugger/scripts/break008.script +++ b/testsuite/tests/ghci.debugger/scripts/break008.script @@ -1,5 +1,5 @@ -:l ../Test3 +:l Test3 :b 1 mymap id [] -- second load, should discard the breakpoints without blowing up -:l ../Test3.hs +:l Test3.hs diff --git a/testsuite/tests/ghci.debugger/scripts/break008.stdout b/testsuite/tests/ghci.debugger/scripts/break008.stdout index 1a8427fa4f..8af6ed33c1 100644 --- a/testsuite/tests/ghci.debugger/scripts/break008.stdout +++ b/testsuite/tests/ghci.debugger/scripts/break008.stdout @@ -1,3 +1,3 @@ -Breakpoint 0 activated at ../Test3.hs:1:14-15 -Stopped in Main.mymap, ../Test3.hs:1:14-15 +Breakpoint 0 activated at Test3.hs:1:14-15 +Stopped in Main.mymap, Test3.hs:1:14-15 _result :: [a] = _ diff --git a/testsuite/tests/ghci.debugger/scripts/break009.script b/testsuite/tests/ghci.debugger/scripts/break009.script index 3e43b07a70..7a1857f7c2 100644 --- a/testsuite/tests/ghci.debugger/scripts/break009.script +++ b/testsuite/tests/ghci.debugger/scripts/break009.script @@ -1,7 +1,7 @@ -:l ../Test6.hs +:l Test6.hs :b 5 main -- stopped now -:l ../Test6.hs +:l Test6.hs main -- should not break diff --git a/testsuite/tests/ghci.debugger/scripts/break009.stdout b/testsuite/tests/ghci.debugger/scripts/break009.stdout index d870b8f568..ab09ffa7c1 100644 --- a/testsuite/tests/ghci.debugger/scripts/break009.stdout +++ b/testsuite/tests/ghci.debugger/scripts/break009.stdout @@ -1,4 +1,4 @@ -Breakpoint 0 activated at ../Test6.hs:5:8-11 -Stopped in Main.main, ../Test6.hs:5:8-11 +Breakpoint 0 activated at Test6.hs:5:8-11 +Stopped in Main.main, Test6.hs:5:8-11 _result :: a = _ *** Exception: Prelude.head: empty list diff --git a/testsuite/tests/ghci.debugger/scripts/break010.script b/testsuite/tests/ghci.debugger/scripts/break010.script index c4cfe917f2..9780672473 100644 --- a/testsuite/tests/ghci.debugger/scripts/break010.script +++ b/testsuite/tests/ghci.debugger/scripts/break010.script @@ -1,4 +1,4 @@ -:l ../Test6.hs +:l Test6.hs :b 5 main :abandon diff --git a/testsuite/tests/ghci.debugger/scripts/break010.stdout b/testsuite/tests/ghci.debugger/scripts/break010.stdout index 91e0d21bc0..7273cb5e14 100644 --- a/testsuite/tests/ghci.debugger/scripts/break010.stdout +++ b/testsuite/tests/ghci.debugger/scripts/break010.stdout @@ -1,5 +1,5 @@ -Breakpoint 0 activated at ../Test6.hs:5:8-11 -Stopped in Main.main, ../Test6.hs:5:8-11 +Breakpoint 0 activated at Test6.hs:5:8-11 +Stopped in Main.main, Test6.hs:5:8-11 _result :: a = _ -Stopped in Main.main, ../Test6.hs:5:8-11 +Stopped in Main.main, Test6.hs:5:8-11 _result :: a = _ diff --git a/testsuite/tests/ghci.debugger/scripts/break011.script b/testsuite/tests/ghci.debugger/scripts/break011.script index e913a2f240..af3f3015eb 100644 --- a/testsuite/tests/ghci.debugger/scripts/break011.script +++ b/testsuite/tests/ghci.debugger/scripts/break011.script @@ -3,7 +3,7 @@ error "foo" :set -fbreak-on-exception error "foo" :abandon -:l ../Test7.hs +:l Test7.hs :tr main :hist :back diff --git a/testsuite/tests/ghci.debugger/scripts/break011.stdout b/testsuite/tests/ghci.debugger/scripts/break011.stdout index c49db52b05..47fb7b135d 100644 --- a/testsuite/tests/ghci.debugger/scripts/break011.stdout +++ b/testsuite/tests/ghci.debugger/scripts/break011.stdout @@ -5,15 +5,15 @@ Stopped in <exception thrown>, <unknown> _exception :: e = _ Stopped in <exception thrown>, <unknown> _exception :: e = _ --1 : main (../Test7.hs:2:18-28) --2 : main (../Test7.hs:2:8-29) +-1 : main (Test7.hs:2:18-28) +-2 : main (Test7.hs:2:8-29) <end of history> -Logged breakpoint at ../Test7.hs:2:18-28 +Logged breakpoint at Test7.hs:2:18-28 _result :: a -Logged breakpoint at ../Test7.hs:2:8-29 +Logged breakpoint at Test7.hs:2:8-29 _result :: IO a no more logged breakpoints -Logged breakpoint at ../Test7.hs:2:18-28 +Logged breakpoint at Test7.hs:2:18-28 _result :: a Stopped at <unknown> _exception :: e @@ -22,28 +22,28 @@ _exception = SomeException (ErrorCallWithLocation "foo" "CallStack (from HasCallStack): - error, called at ../Test7.hs:2:18 in main:Main") + error, called at Test7.hs:2:18 in main:Main") _result :: a = _ _exception :: SomeException = SomeException (ErrorCallWithLocation "foo" "CallStack (from HasCallStack): - error, called at ../Test7.hs:2:18 in main:Main") + error, called at Test7.hs:2:18 in main:Main") *** Exception: foo CallStack (from HasCallStack): - error, called at ../Test7.hs:2:18 in main:Main + error, called at Test7.hs:2:18 in main:Main Stopped in <exception thrown>, <unknown> _exception :: e = SomeException (ErrorCallWithLocation "foo" "CallStack (from HasCallStack): - error, called at ../Test7.hs:2:18 in main:Main") + error, called at Test7.hs:2:18 in main:Main") Stopped in <exception thrown>, <unknown> _exception :: e = SomeException (ErrorCallWithLocation "foo" "CallStack (from HasCallStack): - error, called at ../Test7.hs:2:18 in main:Main") + error, called at Test7.hs:2:18 in main:Main") *** Exception: foo CallStack (from HasCallStack): - error, called at ../Test7.hs:2:18 in main:Main + error, called at Test7.hs:2:18 in main:Main diff --git a/testsuite/tests/ghci.debugger/scripts/break017.script b/testsuite/tests/ghci.debugger/scripts/break017.script index 05c99acdda..8873b1a0d8 100644 --- a/testsuite/tests/ghci.debugger/scripts/break017.script +++ b/testsuite/tests/ghci.debugger/scripts/break017.script @@ -1,4 +1,4 @@ -:l ../QSort.hs +:l QSort.hs :set -fbreak-on-exception :trace qsort ("abc" ++ undefined) :back diff --git a/testsuite/tests/ghci.debugger/scripts/break017.stdout b/testsuite/tests/ghci.debugger/scripts/break017.stdout index 7a1664db78..0de6e662ac 100644 --- a/testsuite/tests/ghci.debugger/scripts/break017.stdout +++ b/testsuite/tests/ghci.debugger/scripts/break017.stdout @@ -1,6 +1,6 @@ "Stopped in <exception thrown>, <unknown> _exception :: e = _ -Logged breakpoint at ../QSort.hs:6:24-38 +Logged breakpoint at QSort.hs:6:24-38 _result :: [Char] a :: Char as :: [Char] diff --git a/testsuite/tests/ghci.debugger/scripts/break018.script b/testsuite/tests/ghci.debugger/scripts/break018.script index a30af6bfd1..e26face4b0 100644 --- a/testsuite/tests/ghci.debugger/scripts/break018.script +++ b/testsuite/tests/ghci.debugger/scripts/break018.script @@ -2,7 +2,7 @@ -- Maybe we should not want to put in scope the things binded in the mdo scope, to avoid silliness. :set -XRecursiveDo -:l ../mdo.hs +:l mdo.hs :st l2dll "hello world" :st :st diff --git a/testsuite/tests/ghci.debugger/scripts/break018.stdout b/testsuite/tests/ghci.debugger/scripts/break018.stdout index 4ca3d6aece..cb6fa51726 100644 --- a/testsuite/tests/ghci.debugger/scripts/break018.stdout +++ b/testsuite/tests/ghci.debugger/scripts/break018.stdout @@ -1,13 +1,13 @@ -Stopped in Main.l2dll, ../mdo.hs:(30,16)-(32,27) +Stopped in Main.l2dll, mdo.hs:(30,16)-(32,27) _result :: IO (N Char) = _ x :: Char = 'h' xs :: [Char] = _ -Stopped in Main.l2dll, ../mdo.hs:30:30-42 +Stopped in Main.l2dll, mdo.hs:30:30-42 _result :: IO (N Char) = _ f :: N Char = _ l :: N Char = _ x :: Char = 'h' -Stopped in Main.newNode, ../mdo.hs:(8,17)-(9,42) +Stopped in Main.newNode, mdo.hs:(8,17)-(9,42) _result :: IO (N Char) = _ b :: N Char = _ c :: Char = 'h' diff --git a/testsuite/tests/ghci.debugger/scripts/break019.script b/testsuite/tests/ghci.debugger/scripts/break019.script index 59537e7364..f4fdd7db47 100644 --- a/testsuite/tests/ghci.debugger/scripts/break019.script +++ b/testsuite/tests/ghci.debugger/scripts/break019.script @@ -1,3 +1,3 @@ -- Test for #1505 -:load ../Test2.hs +:load Test2.hs :break Test2 diff --git a/testsuite/tests/ghci.debugger/scripts/break027.script b/testsuite/tests/ghci.debugger/scripts/break027.script index 039e18a7b5..b1d4de116a 100644 --- a/testsuite/tests/ghci.debugger/scripts/break027.script +++ b/testsuite/tests/ghci.debugger/scripts/break027.script @@ -1,4 +1,4 @@ -:l ../QSort +:l QSort :break qsort qsort [3::Integer,2,1] :i a diff --git a/testsuite/tests/ghci.debugger/scripts/break027.stdout b/testsuite/tests/ghci.debugger/scripts/break027.stdout index 895ce8bcfa..f9c2d20de2 100644 --- a/testsuite/tests/ghci.debugger/scripts/break027.stdout +++ b/testsuite/tests/ghci.debugger/scripts/break027.stdout @@ -1,6 +1,6 @@ -Breakpoint 0 activated at ../QSort.hs:4:12-13 -Breakpoint 1 activated at ../QSort.hs:5:16-51 -Stopped in QSort.qsort, ../QSort.hs:5:16-51 +Breakpoint 0 activated at QSort.hs:4:12-13 +Breakpoint 1 activated at QSort.hs:5:16-51 +Stopped in QSort.qsort, QSort.hs:5:16-51 _result :: [Integer] = _ a :: Integer = 3 left :: [Integer] = _ diff --git a/testsuite/tests/ghci.debugger/scripts/dynbrk001.script b/testsuite/tests/ghci.debugger/scripts/dynbrk001.script index 95c1ab6118..71c18fff06 100644 --- a/testsuite/tests/ghci.debugger/scripts/dynbrk001.script +++ b/testsuite/tests/ghci.debugger/scripts/dynbrk001.script @@ -1,7 +1,7 @@ :set -fprint-explicit-foralls -:l ../QSort +:l QSort :delete 1 -- Illegal: empty breakpoint list diff --git a/testsuite/tests/ghci.debugger/scripts/dynbrk002.script b/testsuite/tests/ghci.debugger/scripts/dynbrk002.script index 043e02328b..4d429824c4 100644 --- a/testsuite/tests/ghci.debugger/scripts/dynbrk002.script +++ b/testsuite/tests/ghci.debugger/scripts/dynbrk002.script @@ -1,6 +1,6 @@ -- :abandon stops a debugging session -:l ../QSort +:l QSort :break QSort 5 run :abandon diff --git a/testsuite/tests/ghci.debugger/scripts/dynbrk002.stdout b/testsuite/tests/ghci.debugger/scripts/dynbrk002.stdout index f4d7444aac..ef46c58bf5 100644 --- a/testsuite/tests/ghci.debugger/scripts/dynbrk002.stdout +++ b/testsuite/tests/ghci.debugger/scripts/dynbrk002.stdout @@ -1,5 +1,5 @@ -Breakpoint 0 activated at ../QSort.hs:5:16-51 -Stopped in QSort.qsort, ../QSort.hs:5:16-51 +Breakpoint 0 activated at QSort.hs:5:16-51 +Stopped in QSort.qsort, QSort.hs:5:16-51 _result :: [Integer] = _ a :: Integer = 8 left :: [Integer] = _ diff --git a/testsuite/tests/ghci.debugger/scripts/dynbrk004.script b/testsuite/tests/ghci.debugger/scripts/dynbrk004.script index eb0bad6940..43cee16a4a 100644 --- a/testsuite/tests/ghci.debugger/scripts/dynbrk004.script +++ b/testsuite/tests/ghci.debugger/scripts/dynbrk004.script @@ -1,7 +1,7 @@ -- Instrumentation of mdo notation :set -XRecursiveDo -:l ../mdo.hs +:l mdo.hs :break Main 13 :break Main 12 :break Main 11 diff --git a/testsuite/tests/ghci.debugger/scripts/dynbrk004.stdout b/testsuite/tests/ghci.debugger/scripts/dynbrk004.stdout index dfdfc45a6b..af7100edb9 100644 --- a/testsuite/tests/ghci.debugger/scripts/dynbrk004.stdout +++ b/testsuite/tests/ghci.debugger/scripts/dynbrk004.stdout @@ -1,4 +1,4 @@ -Breakpoint 0 activated at ../mdo.hs:13:16-30 -Breakpoint 1 activated at ../mdo.hs:12:16-30 -Breakpoint 2 activated at ../mdo.hs:11:16-30 -Breakpoint 3 activated at ../mdo.hs:14:16-30 +Breakpoint 0 activated at mdo.hs:13:16-30 +Breakpoint 1 activated at mdo.hs:12:16-30 +Breakpoint 2 activated at mdo.hs:11:16-30 +Breakpoint 3 activated at mdo.hs:14:16-30 diff --git a/testsuite/tests/ghci.debugger/scripts/getargs.script b/testsuite/tests/ghci.debugger/scripts/getargs.script index 4574386df3..c6a5c45e74 100644 --- a/testsuite/tests/ghci.debugger/scripts/getargs.script +++ b/testsuite/tests/ghci.debugger/scripts/getargs.script @@ -1,4 +1,4 @@ -:l ../getargs.hs +:l getargs.hs :set args 42 :step main :step diff --git a/testsuite/tests/ghci.debugger/scripts/getargs.stdout b/testsuite/tests/ghci.debugger/scripts/getargs.stdout index 3169eb6b1f..27a3df2b29 100644 --- a/testsuite/tests/ghci.debugger/scripts/getargs.stdout +++ b/testsuite/tests/ghci.debugger/scripts/getargs.stdout @@ -1,3 +1,3 @@ -Stopped in Main.main, ../getargs.hs:3:8-24 +Stopped in Main.main, getargs.hs:3:8-24 _result :: IO () = _ ["42"] diff --git a/testsuite/tests/ghci.debugger/scripts/hist001.script b/testsuite/tests/ghci.debugger/scripts/hist001.script index 5f8eab637e..a15b3b151b 100644 --- a/testsuite/tests/ghci.debugger/scripts/hist001.script +++ b/testsuite/tests/ghci.debugger/scripts/hist001.script @@ -1,4 +1,4 @@ -:l ../Test3.hs +:l Test3.hs -- set a break on the [] case in map :b 1 -- trace an execution diff --git a/testsuite/tests/ghci.debugger/scripts/hist001.stdout b/testsuite/tests/ghci.debugger/scripts/hist001.stdout index 9ae5688cb0..a19a34f315 100644 --- a/testsuite/tests/ghci.debugger/scripts/hist001.stdout +++ b/testsuite/tests/ghci.debugger/scripts/hist001.stdout @@ -1,21 +1,21 @@ -Breakpoint 0 activated at ../Test3.hs:1:14-15 -[2,3Stopped in Main.mymap, ../Test3.hs:1:14-15 +Breakpoint 0 activated at Test3.hs:1:14-15 +[2,3Stopped in Main.mymap, Test3.hs:1:14-15 _result :: [a] = _ --1 : mymap (../Test3.hs:2:22-31) --2 : mymap (../Test3.hs:2:18-20) --3 : mymap (../Test3.hs:2:18-31) --4 : mymap (../Test3.hs:2:22-31) --5 : mymap (../Test3.hs:2:18-20) --6 : mymap (../Test3.hs:2:18-31) +-1 : mymap (Test3.hs:2:22-31) +-2 : mymap (Test3.hs:2:18-20) +-3 : mymap (Test3.hs:2:18-31) +-4 : mymap (Test3.hs:2:22-31) +-5 : mymap (Test3.hs:2:18-20) +-6 : mymap (Test3.hs:2:18-31) <end of history> -Logged breakpoint at ../Test3.hs:2:22-31 +Logged breakpoint at Test3.hs:2:22-31 _result :: [a] f :: t -> a xs :: [t] xs :: [t] = [] f :: t -> a = _ _result :: [a] = _ -Logged breakpoint at ../Test3.hs:2:18-20 +Logged breakpoint at Test3.hs:2:18-20 _result :: a f :: Integer -> a x :: Integer @@ -24,10 +24,10 @@ x :: Integer = 2 f :: Integer -> a = _ _result :: a = _ _result = 3 -Logged breakpoint at ../Test3.hs:2:18-31 +Logged breakpoint at Test3.hs:2:18-31 _result :: [a] f :: Integer -> a x :: Integer xs :: [Integer] -Logged breakpoint at ../Test3.hs:2:18-20 +Logged breakpoint at Test3.hs:2:18-20 _result :: a diff --git a/testsuite/tests/ghci.debugger/scripts/listCommand001.script b/testsuite/tests/ghci.debugger/scripts/listCommand001.script index 767b27c47f..04097175e2 100644 --- a/testsuite/tests/ghci.debugger/scripts/listCommand001.script +++ b/testsuite/tests/ghci.debugger/scripts/listCommand001.script @@ -4,7 +4,7 @@ -- can't list a compiled module :list Data.List.map -- can't list a compiled module -:l ../Test3.hs +:l Test3.hs :list mymap :list main :list 4 diff --git a/testsuite/tests/ghci.debugger/scripts/print002.script b/testsuite/tests/ghci.debugger/scripts/print002.script index 629bb92e74..af39d1384f 100644 --- a/testsuite/tests/ghci.debugger/scripts/print002.script +++ b/testsuite/tests/ghci.debugger/scripts/print002.script @@ -11,7 +11,7 @@ let i = Just (10::Integer) case i of Just j -> Control.Exception.evaluate j :p i -:l ../Test.hs +:l Test.hs let s = S1 'a' 'b' 'c' s diff --git a/testsuite/tests/ghci.debugger/scripts/print003.script b/testsuite/tests/ghci.debugger/scripts/print003.script index f172ffb708..e9f6094592 100644 --- a/testsuite/tests/ghci.debugger/scripts/print003.script +++ b/testsuite/tests/ghci.debugger/scripts/print003.script @@ -1,6 +1,6 @@ -- Simple Recovery of types - opaque types :set -XExistentialQuantification -XDeriveDataTypeable -XGeneralizedNewtypeDeriving -:l ../Test +:l Test let t = O (map Just [[1,1],[2,2]]) :p t -- should have bound _t1 now diff --git a/testsuite/tests/ghci.debugger/scripts/print005.script b/testsuite/tests/ghci.debugger/scripts/print005.script index f08b7752a3..49c0799de5 100644 --- a/testsuite/tests/ghci.debugger/scripts/print005.script +++ b/testsuite/tests/ghci.debugger/scripts/print005.script @@ -1,6 +1,6 @@ -- Recovery of types, polymorphic bindings inside a bkpt -:l ../QSort +:l QSort :break 5 qsort [8::Integer, 4] diff --git a/testsuite/tests/ghci.debugger/scripts/print005.stdout b/testsuite/tests/ghci.debugger/scripts/print005.stdout index 171055ade6..40e5104749 100644 --- a/testsuite/tests/ghci.debugger/scripts/print005.stdout +++ b/testsuite/tests/ghci.debugger/scripts/print005.stdout @@ -1,5 +1,5 @@ -Breakpoint 0 activated at ../QSort.hs:5:16-51 -Stopped in QSort.qsort, ../QSort.hs:5:16-51 +Breakpoint 0 activated at QSort.hs:5:16-51 +Stopped in QSort.qsort, QSort.hs:5:16-51 _result :: [Integer] = _ a :: Integer = 8 left :: [Integer] = _ @@ -12,7 +12,7 @@ left = (_t2::[Integer]) left = 4 : (_t3::[Integer]) 1 left = [4] -Stopped in QSort.qsort, ../QSort.hs:5:16-51 +Stopped in QSort.qsort, QSort.hs:5:16-51 _result :: [Integer] = _ a :: Integer = 4 left :: [Integer] = _ diff --git a/testsuite/tests/ghci.debugger/scripts/print006.script b/testsuite/tests/ghci.debugger/scripts/print006.script index 4afd178359..782dee6102 100644 --- a/testsuite/tests/ghci.debugger/scripts/print006.script +++ b/testsuite/tests/ghci.debugger/scripts/print006.script @@ -2,7 +2,7 @@ -- This scenario demands propagation of types up in the tree of terms :set -XExistentialQuantification -XDeriveDataTypeable -XGeneralizedNewtypeDeriving -:l ../Test +:l Test let t = O (map Just [[1,1],[2,2]]) :p t seq _t1 () -- The contents of the opaque diff --git a/testsuite/tests/ghci.debugger/scripts/print007.script b/testsuite/tests/ghci.debugger/scripts/print007.script index 69fbb4d2dd..548d6ea009 100644 --- a/testsuite/tests/ghci.debugger/scripts/print007.script +++ b/testsuite/tests/ghci.debugger/scripts/print007.script @@ -5,7 +5,7 @@ -- but they seem to be not. -- So this test fails with wrong output :set -XExistentialQuantification -XDeriveDataTypeable -XGeneralizedNewtypeDeriving -:l ../Test +:l Test let s = S2 'a' 'b' seq s () @@ -13,7 +13,7 @@ seq s () :set -funbox-strict-fields :l -:l ../Test +:l Test let s = S2 'a' 'b' seq s () @@ -22,7 +22,7 @@ seq s () :set -funbox-strict-fields -O :l -:l ../Test +:l Test let s = S2 'a' 'b' seq s () diff --git a/testsuite/tests/ghci.debugger/scripts/print008.script b/testsuite/tests/ghci.debugger/scripts/print008.script index 52ca7dc857..51b44a6d67 100644 --- a/testsuite/tests/ghci.debugger/scripts/print008.script +++ b/testsuite/tests/ghci.debugger/scripts/print008.script @@ -2,7 +2,7 @@ -- testing that tyvars are instantiated to unknown :set -XExistentialQuantification -XDeriveDataTypeable -XGeneralizedNewtypeDeriving -:l ../Test +:l Test let t = O (map Just [[1,1],[2,2]]) :p t diff --git a/testsuite/tests/ghci.debugger/scripts/print010.script b/testsuite/tests/ghci.debugger/scripts/print010.script index 4b488fa867..857f9265aa 100644 --- a/testsuite/tests/ghci.debugger/scripts/print010.script +++ b/testsuite/tests/ghci.debugger/scripts/print010.script @@ -1,7 +1,7 @@ -- Another tricky type reconstruction case :set -XExistentialQuantification -XDeriveDataTypeable -XGeneralizedNewtypeDeriving -:l ../Test +:l Test let o = O (map id [0..3]) :p o diff --git a/testsuite/tests/ghci.debugger/scripts/print011.script b/testsuite/tests/ghci.debugger/scripts/print011.script index 9d200dcaa2..fec9d9a406 100644 --- a/testsuite/tests/ghci.debugger/scripts/print011.script +++ b/testsuite/tests/ghci.debugger/scripts/print011.script @@ -1,7 +1,7 @@ -- Type reconstruction with newtypes involved :set -XExistentialQuantification -XDeriveDataTypeable -XGeneralizedNewtypeDeriving -:l ../Test +:l Test let i = map (Just . Just) [My 1 .. My 3] :p i diff --git a/testsuite/tests/ghci.debugger/scripts/print012.script b/testsuite/tests/ghci.debugger/scripts/print012.script index a24a6a610e..61b654ae22 100644 --- a/testsuite/tests/ghci.debugger/scripts/print012.script +++ b/testsuite/tests/ghci.debugger/scripts/print012.script @@ -1,6 +1,6 @@ :set -XGADTs -XRankNTypes -XExistentialQuantification -XDeriveDataTypeable -XGeneralizedNewtypeDeriving -:l ../GADT -:a ../Test +:l GADT +:a Test :m +Main let o = O (id foo) :p o diff --git a/testsuite/tests/ghci.debugger/scripts/print013.script b/testsuite/tests/ghci.debugger/scripts/print013.script index cc80c29c63..cf8fdad2de 100644 --- a/testsuite/tests/ghci.debugger/scripts/print013.script +++ b/testsuite/tests/ghci.debugger/scripts/print013.script @@ -1,7 +1,7 @@ -- Test handling of extra fields in the representation due to dictionaries :set -XGADTs -XRankNTypes -:l ../GADT +:l GADT let d = DictN (1 :: Integer) :p d diff --git a/testsuite/tests/ghci.debugger/scripts/print014.script b/testsuite/tests/ghci.debugger/scripts/print014.script index e6d595871a..2758d25e84 100644 --- a/testsuite/tests/ghci.debugger/scripts/print014.script +++ b/testsuite/tests/ghci.debugger/scripts/print014.script @@ -1,7 +1,7 @@ -- Test handling of extra fields in the representation due to existentials. :set -XGADTs -XRankNTypes -:l ../GADT +:l GADT let e = Exist 1 :p e diff --git a/testsuite/tests/ghci.debugger/scripts/print016.script b/testsuite/tests/ghci.debugger/scripts/print016.script index aa5cb048bd..f27122de38 100644 --- a/testsuite/tests/ghci.debugger/scripts/print016.script +++ b/testsuite/tests/ghci.debugger/scripts/print016.script @@ -1,7 +1,7 @@ -- Type reconstruction with newtypes involved, more gruesome. :set -XExistentialQuantification -XDeriveDataTypeable -XGeneralizedNewtypeDeriving -:l ../Test +:l Test let a = map MkT [1::Integer .. 2] :p a seq _t1 () diff --git a/testsuite/tests/ghci.debugger/scripts/print017.script b/testsuite/tests/ghci.debugger/scripts/print017.script index d049ffd1dd..861294cd87 100644 --- a/testsuite/tests/ghci.debugger/scripts/print017.script +++ b/testsuite/tests/ghci.debugger/scripts/print017.script @@ -1,7 +1,7 @@ -- More newtypes goodness :set -XExistentialQuantification -XDeriveDataTypeable -XGeneralizedNewtypeDeriving -:l ../Test +:l Test let a = map (MkT2 . MkT) [1::Integer .. 2] :p a seq _t1 () diff --git a/testsuite/tests/ghci.debugger/scripts/print018.script b/testsuite/tests/ghci.debugger/scripts/print018.script index 12f7cc1519..c0f8ae0aa4 100644 --- a/testsuite/tests/ghci.debugger/scripts/print018.script +++ b/testsuite/tests/ghci.debugger/scripts/print018.script @@ -2,7 +2,7 @@ -- Found by Bernie Pope :set -XExistentialQuantification -XDeriveDataTypeable -XGeneralizedNewtypeDeriving -:l ../Test +:l Test :break poly poly Unary diff --git a/testsuite/tests/ghci.debugger/scripts/print018.stdout b/testsuite/tests/ghci.debugger/scripts/print018.stdout index 3f070f7b74..e0ab829716 100644 --- a/testsuite/tests/ghci.debugger/scripts/print018.stdout +++ b/testsuite/tests/ghci.debugger/scripts/print018.stdout @@ -1,5 +1,5 @@ -Breakpoint 0 activated at ../Test.hs:40:10-17 -Stopped in Test.Test2.poly, ../Test.hs:40:10-17 +Breakpoint 0 activated at Test.hs:40:10-17 +Stopped in Test.Test2.poly, Test.hs:40:10-17 _result :: () = _ x :: a = _ x = (_t1::a) diff --git a/testsuite/tests/ghci.debugger/scripts/print019.script b/testsuite/tests/ghci.debugger/scripts/print019.script index a7653720d6..b4a6d2bab8 100644 --- a/testsuite/tests/ghci.debugger/scripts/print019.script +++ b/testsuite/tests/ghci.debugger/scripts/print019.script @@ -1,5 +1,5 @@ :set -XExistentialQuantification -XDeriveDataTypeable -XGeneralizedNewtypeDeriving -:l ../Test +:l Test let a = O (id 'a') let b = O (id "abc") :p a diff --git a/testsuite/tests/ghci.debugger/scripts/print020.script b/testsuite/tests/ghci.debugger/scripts/print020.script index e0101955cb..026bb4d630 100644 --- a/testsuite/tests/ghci.debugger/scripts/print020.script +++ b/testsuite/tests/ghci.debugger/scripts/print020.script @@ -1,5 +1,5 @@ :set -fno-warn-overlapping-patterns -:l ../HappyTest.hs +:l HappyTest.hs :break lexer main :force _result diff --git a/testsuite/tests/ghci.debugger/scripts/print020.stdout b/testsuite/tests/ghci.debugger/scripts/print020.stdout index bbeeae1223..991ed11c67 100644 --- a/testsuite/tests/ghci.debugger/scripts/print020.stdout +++ b/testsuite/tests/ghci.debugger/scripts/print020.stdout @@ -1,18 +1,18 @@ -Breakpoint 0 activated at ../HappyTest.hs:226:12-13 -Breakpoint 1 activated at ../HappyTest.hs:228:11-19 -Breakpoint 2 activated at ../HappyTest.hs:228:23-30 -Breakpoint 3 activated at ../HappyTest.hs:229:11-19 -Breakpoint 4 activated at ../HappyTest.hs:229:23-35 -Breakpoint 5 activated at ../HappyTest.hs:230:11-19 -Breakpoint 6 activated at ../HappyTest.hs:230:23-35 -Breakpoint 7 activated at ../HappyTest.hs:231:18-35 -Breakpoint 8 activated at ../HappyTest.hs:232:18-37 -Breakpoint 9 activated at ../HappyTest.hs:233:18-38 -Breakpoint 10 activated at ../HappyTest.hs:234:18-38 -Breakpoint 11 activated at ../HappyTest.hs:235:18-36 -Breakpoint 12 activated at ../HappyTest.hs:236:18-35 -Breakpoint 13 activated at ../HappyTest.hs:237:18-35 -Stopped in Main.lexer, ../HappyTest.hs:228:11-19 +Breakpoint 0 activated at HappyTest.hs:226:12-13 +Breakpoint 1 activated at HappyTest.hs:228:11-19 +Breakpoint 2 activated at HappyTest.hs:228:23-30 +Breakpoint 3 activated at HappyTest.hs:229:11-19 +Breakpoint 4 activated at HappyTest.hs:229:23-35 +Breakpoint 5 activated at HappyTest.hs:230:11-19 +Breakpoint 6 activated at HappyTest.hs:230:23-35 +Breakpoint 7 activated at HappyTest.hs:231:18-35 +Breakpoint 8 activated at HappyTest.hs:232:18-37 +Breakpoint 9 activated at HappyTest.hs:233:18-38 +Breakpoint 10 activated at HappyTest.hs:234:18-38 +Breakpoint 11 activated at HappyTest.hs:235:18-36 +Breakpoint 12 activated at HappyTest.hs:236:18-35 +Breakpoint 13 activated at HappyTest.hs:237:18-35 +Stopped in Main.lexer, HappyTest.hs:228:11-19 _result :: Bool = _ c :: Char = '1' *** Ignoring breakpoint diff --git a/testsuite/tests/ghci.debugger/scripts/print023.script b/testsuite/tests/ghci.debugger/scripts/print023.script index 95f37ff18d..512015f1e3 100644 --- a/testsuite/tests/ghci.debugger/scripts/print023.script +++ b/testsuite/tests/ghci.debugger/scripts/print023.script @@ -1,7 +1,7 @@ -- Another type reconstruction with newtypes test :set -XExistentialQuantification -XDeriveDataTypeable -XGeneralizedNewtypeDeriving -:l ../Test +:l Test let a = MkT [1::Integer .. 2] seq a () diff --git a/testsuite/tests/ghci.debugger/scripts/print024.script b/testsuite/tests/ghci.debugger/scripts/print024.script index 381676e0d7..8b951c65d4 100644 --- a/testsuite/tests/ghci.debugger/scripts/print024.script +++ b/testsuite/tests/ghci.debugger/scripts/print024.script @@ -1,7 +1,7 @@ -- stg_ap_rep exception after using :print with newtypes :set -XExistentialQuantification -XDeriveDataTypeable -XGeneralizedNewtypeDeriving -:l ../Test +:l Test let a = MkT (1 :: Integer) seq a () diff --git a/testsuite/tests/ghci.debugger/scripts/print034.script b/testsuite/tests/ghci.debugger/scripts/print034.script index 39f2743719..eaa53ad846 100644 --- a/testsuite/tests/ghci.debugger/scripts/print034.script +++ b/testsuite/tests/ghci.debugger/scripts/print034.script @@ -1,8 +1,8 @@ -- More GADT goodness :set -XGADTs -XRankNTypes -XDeriveDataTypeable -XGeneralizedNewtypeDeriving -:l ../GADT -:a ../Test +:l GADT +:a Test :m +Main let o = O (One False Main.Nil) :p o diff --git a/testsuite/tests/ghci.debugger/scripts/print035.script b/testsuite/tests/ghci.debugger/scripts/print035.script index fece23b46f..d5d48ddef1 100644 --- a/testsuite/tests/ghci.debugger/scripts/print035.script +++ b/testsuite/tests/ghci.debugger/scripts/print035.script @@ -2,7 +2,7 @@ -- handled correctly by RtClosureInspect :set -XUnboxedTuples -fobject-code -:l ../Unboxed +:l Unboxed :p o1 :p o2 force_them diff --git a/testsuite/tests/ghci/prog001/prog001.script b/testsuite/tests/ghci/prog001/prog001.script index c30f4fe735..3d0e973c57 100644 --- a/testsuite/tests/ghci/prog001/prog001.script +++ b/testsuite/tests/ghci/prog001/prog001.script @@ -1,6 +1,6 @@ :unset +s -:l ../shell.hs +:l shell.hs :def shell (\s -> do shell s; return "") -- first, tidy up: diff --git a/testsuite/tests/ghci/prog002/prog002.script b/testsuite/tests/ghci/prog002/prog002.script index 02d9362ca5..34f5d91758 100644 --- a/testsuite/tests/ghci/prog002/prog002.script +++ b/testsuite/tests/ghci/prog002/prog002.script @@ -1,7 +1,7 @@ :unset +s :unset +t -:l ../shell.hs +:l shell.hs :def shell (\s -> do shell s; return "") -- first, clean up: diff --git a/testsuite/tests/ghci/prog003/prog003.script b/testsuite/tests/ghci/prog003/prog003.script index 66490a0dea..9ad7d33dfb 100644 --- a/testsuite/tests/ghci/prog003/prog003.script +++ b/testsuite/tests/ghci/prog003/prog003.script @@ -7,7 +7,7 @@ -- versions of each module, and make sure each combination behaves -- sensibly. -:l ../shell.hs +:l shell.hs :def shell (\s -> do shell s; return "") -- clean up diff --git a/testsuite/tests/ghci/prog010/ghci.prog010.script b/testsuite/tests/ghci/prog010/ghci.prog010.script index f86829b3cf..49e3308ff0 100644 --- a/testsuite/tests/ghci/prog010/ghci.prog010.script +++ b/testsuite/tests/ghci/prog010/ghci.prog010.script @@ -1,6 +1,6 @@ -- test for #1205 -:l ../shell.hs +:l shell.hs :def shell (\s -> do shell s; return "") :shell rm -f A.o A.hi B.o B.hi diff --git a/testsuite/tests/ghci/prog012/prog012.script b/testsuite/tests/ghci/prog012/prog012.script index 5e178389ac..8f438ecf9a 100644 --- a/testsuite/tests/ghci/prog012/prog012.script +++ b/testsuite/tests/ghci/prog012/prog012.script @@ -1,4 +1,4 @@ -:l ../shell.hs +:l shell.hs :def shell (\s -> do shell s; return "") :l diff --git a/testsuite/tests/ghci/scripts/Defer02.script b/testsuite/tests/ghci/scripts/Defer02.script index 3fc6aff5b0..3ff0bee911 100755 --- a/testsuite/tests/ghci/scripts/Defer02.script +++ b/testsuite/tests/ghci/scripts/Defer02.script @@ -1,6 +1,6 @@ -- Test -fwarn-type-errors -- This test shows how each error is printed at runtime -:l ../../typecheck/should_run/Defer01 +:l Defer01 t5624 print a print (b B) @@ -11,4 +11,4 @@ print (h ()) print (i ()) print j print (k 2) -l
\ No newline at end of file +l diff --git a/testsuite/tests/ghci/scripts/Defer02.stderr b/testsuite/tests/ghci/scripts/Defer02.stderr index bcc6c5eff5..f845b63fd2 100644 --- a/testsuite/tests/ghci/scripts/Defer02.stderr +++ b/testsuite/tests/ghci/scripts/Defer02.stderr @@ -1,5 +1,5 @@ -..\..\typecheck\should_run\Defer01.hs:11:40: warning: [-Wdeferred-type-errors (in -Wdefault)]
+Defer01.hs:11:40: warning: [-Wdeferred-type-errors (in -Wdefault)]
• Couldn't match type ‘Char’ with ‘[Char]’
Expected type: String
Actual type: Char
@@ -7,21 +7,21 @@ In the second argument of ‘(>>)’, namely ‘putStr ','’
In the expression: putStr "Hello World" >> putStr ','
-..\..\typecheck\should_run\Defer01.hs:14:5: warning: [-Wdeferred-type-errors (in -Wdefault)]
+Defer01.hs:14:5: warning: [-Wdeferred-type-errors (in -Wdefault)]
• Couldn't match expected type ‘Int’ with actual type ‘Char’
• In the expression: 'p'
In an equation for ‘a’: a = 'p'
-..\..\typecheck\should_run\Defer01.hs:18:7: warning: [-Wdeferred-type-errors (in -Wdefault)]
+Defer01.hs:18:7: warning: [-Wdeferred-type-errors (in -Wdefault)]
• No instance for (Eq B) arising from a use of ‘==’
• In the expression: x == x
In an equation for ‘b’: b x = x == x
-..\..\typecheck\should_run\Defer01.hs:25:1: warning: [-Woverlapping-patterns (in -Wdefault)]
+Defer01.hs:25:1: warning: [-Woverlapping-patterns (in -Wdefault)]
Pattern match has inaccessible right hand side
In an equation for ‘c’: c (C2 x) = ...
-..\..\typecheck\should_run\Defer01.hs:25:4: warning: [-Wdeferred-type-errors (in -Wdefault)]
+Defer01.hs:25:4: warning: [-Wdeferred-type-errors (in -Wdefault)]
• Couldn't match type ‘Int’ with ‘Bool’
Inaccessible code in
a pattern with constructor: C2 :: Bool -> C Bool,
@@ -29,50 +29,50 @@ • In the pattern: C2 x
In an equation for ‘c’: c (C2 x) = True
-..\..\typecheck\should_run\Defer01.hs:28:5: warning: [-Wdeferred-type-errors (in -Wdefault)]
+Defer01.hs:28:5: warning: [-Wdeferred-type-errors (in -Wdefault)]
• No instance for (Num (a -> a)) arising from the literal ‘1’
(maybe you haven't applied a function to enough arguments?)
• In the expression: 1
In an equation for ‘d’: d = 1
-..\..\typecheck\should_run\Defer01.hs:31:5: warning: [-Wdeferred-type-errors (in -Wdefault)]
+Defer01.hs:31:5: warning: [-Wdeferred-type-errors (in -Wdefault)]
• Couldn't match expected type ‘Char -> t’ with actual type ‘Char’
• The function ‘e’ is applied to one argument,
but its type ‘Char’ has none
In the expression: e 'q'
In an equation for ‘f’: f = e 'q'
• Relevant bindings include
- f :: t (bound at ..\..\typecheck\should_run\Defer01.hs:31:1)
+ f :: t (bound at Defer01.hs:31:1)
-..\..\typecheck\should_run\Defer01.hs:34:8: warning: [-Wdeferred-type-errors (in -Wdefault)]
+Defer01.hs:34:8: warning: [-Wdeferred-type-errors (in -Wdefault)]
• Couldn't match expected type ‘Char’ with actual type ‘a’
‘a’ is a rigid type variable bound by
the type signature for:
h :: forall a. a -> (Char, Char)
- at ..\..\typecheck\should_run\Defer01.hs:33:1-21
+ at Defer01.hs:33:1-21
• In the expression: x
In the expression: (x, 'c')
In an equation for ‘h’: h x = (x, 'c')
• Relevant bindings include
- x :: a (bound at ..\..\typecheck\should_run\Defer01.hs:34:3)
+ x :: a (bound at Defer01.hs:34:3)
h :: a -> (Char, Char)
- (bound at ..\..\typecheck\should_run\Defer01.hs:34:1)
+ (bound at Defer01.hs:34:1)
-..\..\typecheck\should_run\Defer01.hs:39:17: warning: [-Wdeferred-type-errors (in -Wdefault)]
+Defer01.hs:39:17: warning: [-Wdeferred-type-errors (in -Wdefault)]
• Couldn't match expected type ‘Bool’ with actual type ‘T a’
• In the first argument of ‘not’, namely ‘(K a)’
In the expression: (not (K a))
In the expression: seq (not (K a)) ()
• Relevant bindings include
- a :: a (bound at ..\..\typecheck\should_run\Defer01.hs:39:3)
- i :: a -> () (bound at ..\..\typecheck\should_run\Defer01.hs:39:1)
+ a :: a (bound at Defer01.hs:39:3)
+ i :: a -> () (bound at Defer01.hs:39:1)
-..\..\typecheck\should_run\Defer01.hs:43:5: warning: [-Wdeferred-type-errors (in -Wdefault)]
+Defer01.hs:43:5: warning: [-Wdeferred-type-errors (in -Wdefault)]
• No instance for (MyClass a1) arising from a use of ‘myOp’
• In the expression: myOp 23
In an equation for ‘j’: j = myOp 23
-..\..\typecheck\should_run\Defer01.hs:43:10: warning: [-Wdeferred-type-errors (in -Wdefault)]
+Defer01.hs:43:10: warning: [-Wdeferred-type-errors (in -Wdefault)]
• Ambiguous type variable ‘a1’ arising from the literal ‘23’
prevents the constraint ‘(Num a1)’ from being solved.
Probable fix: use a type annotation to specify what ‘a1’ should be.
@@ -86,13 +86,13 @@ In the expression: myOp 23
In an equation for ‘j’: j = myOp 23
-..\..\typecheck\should_run\Defer01.hs:45:1: warning: [-Wdeferred-type-errors (in -Wdefault)]
+Defer01.hs:45:1: warning: [-Wdeferred-type-errors (in -Wdefault)]
Couldn't match type ‘Int’ with ‘Bool’
Inaccessible code in
the type signature for:
k :: Int ~ Bool => Int -> Bool
-..\..\typecheck\should_run\Defer01.hs:45:6: warning: [-Wdeferred-type-errors (in -Wdefault)]
+Defer01.hs:45:6: warning: [-Wdeferred-type-errors (in -Wdefault)]
• Couldn't match type ‘Int’ with ‘Bool’
Inaccessible code in
the type signature for:
@@ -101,18 +101,18 @@ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
In the type signature: k :: (Int ~ Bool) => Int -> Bool
-..\..\typecheck\should_run\Defer01.hs:46:1: warning: [-Woverlapping-patterns (in -Wdefault)]
+Defer01.hs:46:1: warning: [-Woverlapping-patterns (in -Wdefault)]
Pattern match is redundant
In an equation for ‘k’: k x = ...
-..\..\typecheck\should_run\Defer01.hs:49:5: warning: [-Wdeferred-type-errors (in -Wdefault)]
+Defer01.hs:49:5: warning: [-Wdeferred-type-errors (in -Wdefault)]
• Couldn't match expected type ‘IO a0’
with actual type ‘Char -> IO ()’
• Probable cause: ‘putChar’ is applied to too few arguments
In the first argument of ‘(>>)’, namely ‘putChar’
In the expression: putChar >> putChar 'p'
In an equation for ‘l’: l = putChar >> putChar 'p'
-*** Exception: ..\..\typecheck\should_run\Defer01.hs:11:40: error:
+*** Exception: Defer01.hs:11:40: error:
• Couldn't match type ‘Char’ with ‘[Char]’
Expected type: String
Actual type: Char
@@ -120,12 +120,12 @@ In the second argument of ‘(>>)’, namely ‘putStr ','’
In the expression: putStr "Hello World" >> putStr ','
(deferred type error)
-*** Exception: ..\..\typecheck\should_run\Defer01.hs:14:5: error:
+*** Exception: Defer01.hs:14:5: error:
• Couldn't match expected type ‘Int’ with actual type ‘Char’
• In the expression: 'p'
In an equation for ‘a’: a = 'p'
(deferred type error)
-*** Exception: ..\..\typecheck\should_run\Defer01.hs:18:7: error:
+*** Exception: Defer01.hs:18:7: error:
• No instance for (Eq B) arising from a use of ‘==’
• In the expression: x == x
In an equation for ‘b’: b x = x == x
@@ -138,45 +138,45 @@ • In the first argument of ‘c’, namely ‘(C2 True)’
In the first argument of ‘print’, namely ‘(c (C2 True))’
In the expression: print (c (C2 True))
-*** Exception: ..\..\typecheck\should_run\Defer01.hs:28:5: error:
+*** Exception: Defer01.hs:28:5: error:
• No instance for (Num (a -> a)) arising from the literal ‘1’
(maybe you haven't applied a function to enough arguments?)
• In the expression: 1
In an equation for ‘d’: d = 1
(deferred type error)
-*** Exception: ..\..\typecheck\should_run\Defer01.hs:31:5: error:
+*** Exception: Defer01.hs:31:5: error:
• Couldn't match expected type ‘Char -> t’ with actual type ‘Char’
• The function ‘e’ is applied to one argument,
but its type ‘Char’ has none
In the expression: e 'q'
In an equation for ‘f’: f = e 'q'
• Relevant bindings include
- f :: t (bound at ..\..\typecheck\should_run\Defer01.hs:31:1)
+ f :: t (bound at Defer01.hs:31:1)
(deferred type error)
-*** Exception: ..\..\typecheck\should_run\Defer01.hs:34:8: error:
+*** Exception: Defer01.hs:34:8: error:
• Couldn't match expected type ‘Char’ with actual type ‘a’
‘a’ is a rigid type variable bound by
the type signature for:
h :: forall a. a -> (Char, Char)
- at ..\..\typecheck\should_run\Defer01.hs:33:1-21
+ at Defer01.hs:33:1-21
• In the expression: x
In the expression: (x, 'c')
In an equation for ‘h’: h x = (x, 'c')
• Relevant bindings include
- x :: a (bound at ..\..\typecheck\should_run\Defer01.hs:34:3)
+ x :: a (bound at Defer01.hs:34:3)
h :: a -> (Char, Char)
- (bound at ..\..\typecheck\should_run\Defer01.hs:34:1)
+ (bound at Defer01.hs:34:1)
(deferred type error)
-*** Exception: ..\..\typecheck\should_run\Defer01.hs:39:17: error:
+*** Exception: Defer01.hs:39:17: error:
• Couldn't match expected type ‘Bool’ with actual type ‘T a’
• In the first argument of ‘not’, namely ‘(K a)’
In the expression: (not (K a))
In the expression: seq (not (K a)) ()
• Relevant bindings include
- a :: a (bound at ..\..\typecheck\should_run\Defer01.hs:39:3)
- i :: a -> () (bound at ..\..\typecheck\should_run\Defer01.hs:39:1)
+ a :: a (bound at Defer01.hs:39:3)
+ i :: a -> () (bound at Defer01.hs:39:1)
(deferred type error)
-*** Exception: ..\..\typecheck\should_run\Defer01.hs:43:5: error:
+*** Exception: Defer01.hs:43:5: error:
• No instance for (MyClass a1) arising from a use of ‘myOp’
• In the expression: myOp 23
In an equation for ‘j’: j = myOp 23
@@ -187,7 +187,7 @@ • In the first argument of ‘print’, namely ‘(k 2)’
In the expression: print (k 2)
In an equation for ‘it’: it = print (k 2)
-*** Exception: ..\..\typecheck\should_run\Defer01.hs:49:5: error:
+*** Exception: Defer01.hs:49:5: error:
• Couldn't match expected type ‘IO a0’
with actual type ‘Char -> IO ()’
• Probable cause: ‘putChar’ is applied to too few arguments
diff --git a/testsuite/tests/ghci/scripts/T6106.script b/testsuite/tests/ghci/scripts/T6106.script index be6de46362..e8761542e1 100644 --- a/testsuite/tests/ghci/scripts/T6106.script +++ b/testsuite/tests/ghci/scripts/T6106.script @@ -1,4 +1,4 @@ -:l ../shell.hs +:l shell.hs :def shell (\s -> do shell s; return "") :l diff --git a/testsuite/tests/ghci/scripts/ghci026.script b/testsuite/tests/ghci/scripts/ghci026.script index 871de86741..0f77a7ad50 100644 --- a/testsuite/tests/ghci/scripts/ghci026.script +++ b/testsuite/tests/ghci/scripts/ghci026.script @@ -1,6 +1,6 @@ import Data.Maybe :browse -:l ../prog002/A1.hs +:l prog002/A1.hs :browse -:add ../prog002/B.hs +:add prog002/B.hs :browse diff --git a/testsuite/tests/ghci/scripts/ghci038.script b/testsuite/tests/ghci/scripts/ghci038.script index fabc8b5564..c534cfc5b2 100644 --- a/testsuite/tests/ghci/scripts/ghci038.script +++ b/testsuite/tests/ghci/scripts/ghci038.script @@ -1,5 +1,5 @@ -- Tests for ":show imports" and import/:module -:l ../shell.hs +:l shell.hs :def shell (\s -> do shell s; return "") :l diff --git a/testsuite/tests/ghci/scripts/ghci058.script b/testsuite/tests/ghci/scripts/ghci058.script index a05aa73ccc..c9bbd696f5 100644 --- a/testsuite/tests/ghci/scripts/ghci058.script +++ b/testsuite/tests/ghci/scripts/ghci058.script @@ -1,5 +1,5 @@ -:l ../shell.hs +:l shell.hs :def shell (\s -> do shell s; return "") :set prompt "" diff --git a/testsuite/tests/perf/haddock/all.T b/testsuite/tests/perf/haddock/all.T index b4600d4a9f..3160a8a1e4 100644 --- a/testsuite/tests/perf/haddock/all.T +++ b/testsuite/tests/perf/haddock/all.T @@ -47,7 +47,7 @@ test('haddock.base', # 2016-04-06: 5509757068 (x86/Linux) ], stats, - ['../../../../libraries/base/dist-install/haddock.t']) + ['haddock.t']) test('haddock.Cabal', [unless(in_tree_compiler(), skip), req_haddock @@ -97,7 +97,7 @@ test('haddock.Cabal', # 2016-04-06: 6268156056 (x86/Linux) ], stats, - ['../../../../libraries/Cabal/Cabal/dist-install/haddock.t']) + ['haddock.t']) test('haddock.compiler', [unless(in_tree_compiler(), skip), req_haddock @@ -131,4 +131,4 @@ test('haddock.compiler', # 2016-04-06: 16222702892 (x86/Linux) ], stats, - ['../../../../compiler/stage2/haddock.t']) + ['haddock.t']) diff --git a/testsuite/tests/perf/should_run/all.T b/testsuite/tests/perf/should_run/all.T index d039f68dbf..caf4effd2d 100644 --- a/testsuite/tests/perf/should_run/all.T +++ b/testsuite/tests/perf/should_run/all.T @@ -68,7 +68,7 @@ test('lazy-bs-alloc', # 2014-01-28: Widen 1->2% (x86/Windows was at 425212) # 2016-04-06: 429760 (x86/Linux) no idea what happened only_ways(['normal']), - extra_run_opts('../../numeric/should_run/arith011.stdout'), + extra_run_opts('arith011.stdout'), ignore_output, # Use `+RTS -G1` for more stable residency measurements. Note [residency]. diff --git a/testsuite/tests/rts/all.T b/testsuite/tests/rts/all.T index f03309e6d8..f15e8a05c7 100644 --- a/testsuite/tests/rts/all.T +++ b/testsuite/tests/rts/all.T @@ -69,7 +69,7 @@ test('T2783', [ omit_ways(['ghci']), exit_code(1) ], compile_and_run, ['']) test('testwsdeque', [unless(in_tree_compiler(), skip), req_smp, # needs atomic 'cas' c_src, only_ways(['threaded1', 'threaded2'])], - compile_and_run, ['-I../../../rts']) + compile_and_run, ['']) test('T3236', [c_src, only_ways(['normal','threaded1']), exit_code(1)], compile_and_run, ['']) @@ -269,7 +269,8 @@ if [ $be_quiet -eq 1 ] && [ -z $VERBOSE ]; then TEST_VERBOSITY="VERBOSE=1 NO_PRINT_SUMMARY=YES" fi -$make $MAKE_TEST_TARGET stage=2 $BINDIST $TEST_VERBOSITY THREADS=$threads 2>&1 | tee testlog +# Use LOCAL=0, see Note [Running tests in /tmp]. +$make $MAKE_TEST_TARGET stage=2 $BINDIST LOCAL=0 $TEST_VERBOSITY THREADS=$threads 2>&1 | tee testlog check_packages post-testsuite |