summaryrefslogtreecommitdiff
path: root/testsuite/tests/plugins
Commit message (Collapse)AuthorAgeFilesLines
* Ditch static flagsSylvain Henry2017-02-021-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch converts the 4 lasting static flags (read from the command line and unsafely stored in immutable global variables) into dynamic flags. Most use cases have been converted into reading them from a DynFlags. In cases for which we don't have easy access to a DynFlags, we read from 'unsafeGlobalDynFlags' that is set at the beginning of each 'runGhc'. It's not perfect (not thread-safe) but it is still better as we can set/unset these 4 flags before each run when using GHC API. Updates haddock submodule. Rebased and finished by: bgamari Test Plan: validate Reviewers: goldfire, erikd, hvr, austin, simonmar, bgamari Reviewed By: simonmar Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2839 GHC Trac Issues: #8440
* Spelling fixesGabor Greif2017-02-023-3/+3
|
* Remove clean_cmd and extra_clean usage from .T filesThomas Miedema2017-01-221-46/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | The `clean_cmd` and `extra_clean` setup functions don't do anything. Remove them from .T files. Created using https://github.com/thomie/refactor-ghc-testsuite. This diff is a test for the .T-file parser/processor/pretty-printer in that repository. find . -name '*.T' -exec ~/refactor-ghc-testsuite/Main "{}" \; Tests containing inline comments or multiline strings are not modified. Preparation for #12223. Test Plan: Harbormaster Reviewers: austin, hvr, simonmar, mpickering, bgamari Reviewed By: mpickering Subscribers: mpickering Differential Revision: https://phabricator.haskell.org/D3000 GHC Trac Issues: #12223
* testsuite: Mark T10294 as fixedBen Gamari2016-12-151-2/+1
| | | | | | | | | | | | | | | | It seems that c3c702441137dc8f7ee0dd5ac313be96d625459a resolved #10301. It took a while to notice this since it only broke when tested against a statically linked GHC, a configuration which Harbormaster doesn't test. Test Plan: Validate Reviewers: angerman, austin Subscribers: thomie, nomeata Differential Revision: https://phabricator.haskell.org/D2856 GHC Trac Issues: #10294, #10301
* base: Bump version to 4.10.0.0Ben Gamari2016-12-151-1/+1
| | | | Updates a number of submodules.
* Make globals use sharedCAFMoritz Angermann2016-12-112-4/+1
| | | | | | | | | | | | | | | | | | | Summary: The use of globals is quite painful when multiple rts are loaded, e.g. when plugins are loaded, which bring in a second rts. The sharedCAF appraoch was employed for the FastStringTable; I've taken the libery to extend this to the other globals I could find. This is a reboot of D2575, that should hopefully not exhibit the same windows build issues. Reviewers: Phyx, simonmar, goldfire, bgamari, austin, hvr, erikd Reviewed By: Phyx, simonmar, bgamari Subscribers: mpickering, thomie Differential Revision: https://phabricator.haskell.org/D2773
* Revert "Make globals use sharedCAF"Ben Gamari2016-11-302-1/+4
| | | | | This reverts commit 6f7ed1e51bf360621a3c2a447045ab3012f68575 due to breakage of the build on Windows.
* Make globals use sharedCAFMoritz Angermann2016-11-292-4/+1
| | | | | | | | | | | | | | | The use of globals is quite painful when multiple rts are loaded, e.g. when plugins are loaded, which bring in a second rts. The sharedCAF appraoch was employed for the FastStringTable; I've taken the libery to extend this to the other globals I could find. Reviewers: rwbarton, simonmar, austin, hvr, erikd, bgamari Reviewed By: simonmar, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2575
* Replace -fshow-source-paths with -fhide-source-pathsSylvain Henry2016-11-293-6/+6
| | | | | | | | | | | | | | | | | | | | | This patch reverts the change introduced with 587dcccfdfa7a319e27300a4f3885071060b1f8e and restores the previous default output of GHC (i.e., show source path and object path for each compiled module). The -fhide-source-paths flag can be used to hide these paths and reduce the line noise. Reviewers: gracjan, nomeata, austin, bgamari, simonmar, hvr Reviewed By: hvr Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2728 GHC Trac Issues: #12851
* Make default output less verbose (source/object paths)Sylvain HENRY2016-11-113-6/+6
| | | | | | | | | | | | Reviewers: simonmar, mpickering, austin, bgamari Reviewed By: bgamari Subscribers: mpickering, nomeata, thomie Differential Revision: https://phabricator.haskell.org/D2679 GHC Trac Issues: #12807
* The Backpack patch.Edward Z. Yang2016-10-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch implements Backpack for GHC. It's a big patch but I've tried quite hard to keep things, by-in-large, self-contained. The user facing specification for Backpack can be found at: https://github.com/ezyang/ghc-proposals/blob/backpack/proposals/0000-backpack.rst A guide to the implementation can be found at: https://github.com/ezyang/ghc-proposals/blob/backpack-impl/proposals/0000-backpack-impl.rst Has a submodule update for Cabal, as well as a submodule update for filepath to handle more strict checking of cabal-version. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, austin, simonmar, bgamari, goldfire Subscribers: thomie, mpickering Differential Revision: https://phabricator.haskell.org/D1482
* accept current (problematic) outputGabor Greif2016-09-041-1/+5
|
* test #12567: add new testcase with expected plugin behaviourGabor Greif2016-09-045-0/+25
|
* Testsuite: delete dead code + cleanupThomas Miedema2016-06-201-5/+1
| | | | | | * Set config settings directly in mk/test.mk, instead of indirectly in config/ghc * passing --hpcdir for WAY=hpc is unnecessary
* Testsuite: run tests in /tmp after copying required filesThomas Miedema2016-05-171-8/+9
| | | | | | | | | | | | | | | | | | | | | | | Major change to the testsuite driver. For each TEST: * create a directory `<testdir>` inside `/tmp`. * link/copy all source files that the test needs into `<testdir>`. * run the test inside `<testdir>`. * delete `<testdir>` Extra files are (temporarily) tracked in `testsuite/driver/extra_files.py`, but can also be specified using the `extra_files` setup function. Differential Revision: https://phabricator.haskell.org/D1187 Reviewed by: Rufflewind, bgamari Trac: #11980
* Testsuite: delete empty files [skip ci]Thomas Miedema2016-02-251-0/+0
|
* Testsuite: Introduce config.plugin_way_flags.Thomas Miedema2016-02-251-1/+1
| | | | Refactoring only.
* Testsuite: pass '-s --no-print-directory' to MAKEThomas Miedema2016-02-213-3/+3
| | | | This seems necessary after 9634e24 (#11569).
* Use a better test for profilingSimon Marlow2016-02-203-3/+3
| | | | | | | | The previous test failed for me because I had GhcRTSWays += thr_debug_p in my validate.mk, which doesn't enable profiling by itself.
* Testsuite: delete compiler_lt/le/gt/ge setup functionsThomas Miedema2016-02-171-1/+0
| | | | | | | | Since we're not consisently keeping track of which tests should pass with which compiler versions, there is no point in keeping these functions. Update submodules containers, hpc and stm.
* Implement -hide-all-plugin-packages and -plugin-package(-id), fixing #11244Edward Z. Yang2015-12-224-3/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The basic idea is that we have a new set of "exposed modules" which are /only/ used for plugins, i.e. -fplugin Foo and --frontend Foo. You can interact with this namespace using the flags -plugin-package-id and -plugin-package. By default, this namespace contains all modules in the user namespace (as before), but you can toggle that using -hide-all-plugin-packages. There is one nasty hack: GhcMake respects -fplugin in GHC_OPTIONS to make local plugins work correctly. It also bails out of you have an import of a module which doesn't exist locally or in the package database. The upshot is that we need to be sure to check in the plugin modules too, so we don't give a spurious failure when a plugin is in the plugin namespace but not the main namespace. A better way to fix this would be to distinguish between plugin and normal dependencies in ModSummary. I cheated a little and tweaked a few existing plugins tests to exercise the new code paths. TODO: Documentation Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: bgamari, austin, simonpj, duncan Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1661 GHC Trac Issues: #11244
* Testsuite: mark frontend01 conditionally expect_broken on #10301Thomas Miedema2015-12-171-1/+4
| | | | This should fix validate on Travis.
* Frontend plugins.Edward Z. Yang2015-12-125-0/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Frontend plugins enable users to write plugins to replace GHC major modes. E.g. instead of saying ghc --make A B C a user can now say ghc --frontend GHC.Frontend.Shake A B C which might provide an alternative implementation of a multi-module build. For more details, see the manual entry. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonmar, bgamari, austin, simonpj Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1598 GHC Trac Issues: #11194
* Make GHCi & TH work when the compiler is built with -profSimon Marlow2015-11-073-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Amazingly, there were zero changes to the byte code generator and very few changes to the interpreter - mainly because we've used good abstractions that hide the differences between profiling and non-profiling. So that bit was pleasantly straightforward, but there were a pile of other wibbles to get the whole test suite through. Note that a compiler built with -prof is now like one built with -dynamic, in that to use TH you have to build the code the same way. For dynamic, we automatically enable -dynamic-too when TH is required, but we don't have anything equivalent for profiling, so you have to explicitly use -prof when building code that uses TH with a profiled compiler. For this reason Cabal won't work with TH. We don't expect to ship a profiled compiler, so I think that's OK. Test Plan: validate with GhcProfiled=YES in validate.mk Reviewers: goldfire, bgamari, rwbarton, austin, hvr, erikd, ezyang Reviewed By: ezyang Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1407 GHC Trac Issues: #4837, #545
* Bump `base` version to 4.9.0.0 (closes #11026)Herbert Valerio Riedel2015-11-011-1/+1
| | | | | | | | | | | This also relaxes a few upper bounds on base in the ghc.git repo; This required a mass-rewrite in testsuite/ sed -i s,base-4.8.2.0,base-4.9.0.0,g $(git grep -Fl 'base-4.8.2.0') because it turns out the testsuite is still sensitive to package version changes.
* Testsuite: mark T10294 conditionally expect_broken on #10301Thomas Miedema2015-07-151-1/+1
| | | | Fix 8e6a50339a4a61d4f2cbec645c78abc85098a294.
* Mark test case for #10294 conditionally expect_broken on #10301Joachim Breitner2015-07-151-1/+1
| | | | | | the hypothesis is that it only breaks with `DYNAMIC_GHC_PROGRAMS = NO`, so use `unless(have_dynamic(),expect_broken(10301))` to not break the Phabricator build.
* Mark test case for #10294 expect_broken on #10301Joachim Breitner2015-07-151-1/+2
| | | | | as it is broken on Travis, and in #10301 others have reported the same error.
* Filter orphan rules based on imports, fixes #10294 and #10420.Edward Z. Yang2015-06-2015-11/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: If we have an orphan rule in our database, don't apply it unless the defining module is transitively imported by the module we are processing. We do this by defining a new RuleEnv data type which includes both the RuleBase as well as the set of visible orphan modules, and threading this through the relevant environments (CoreReader, RuleCheckEnv and ScEnv). This is analogous to the instances fix we applied in #2182 4c834fdddf4d44d12039da4d6a2c63a660975b95, but done for RULES. An important knock-on effect is that we can remove some buggy code in LoadInterface which tried to avoid loading interfaces that were loaded by plugins (which sometimes caused instances and rules to NEVER become visible). One note about tests: I renamed the old plugins07 test to T10420 and replaced plugins07 with a test to ensure that a plugin import did not cause new rules to be loaded in. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, austin, goldfire Subscribers: bgamari, thomie Differential Revision: https://phabricator.haskell.org/D950 GHC Trac Issues: #10420
* Failing test for #10420 using plugins.Edward Z. Yang2015-05-1510-1/+77
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Basic Python 3 support for testsuite driver (Trac #9184)Krzysztof Gogolewski2014-10-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Most of the changes is adaptation of old Python 2 only code. My priority was not breaking Python 2, and so I avoided bigger changes to the driver. In particular, under Python 3 the output is a str and buffering cannot be disabled. To test, define PYTHON=python3 in testsuite/mk/boilerplate.mk. Thanks to aspidites <emarshall85@gmail.com> who provided the initial patch. Test Plan: validate under 2 and 3 Reviewers: hvr, simonmar, thomie, austin Reviewed By: thomie, austin Subscribers: aspidites, thomie, simonmar, ezyang, carter Differential Revision: https://phabricator.haskell.org/D233 GHC Trac Issues: #9184
* Change testsuite to not use old-style file package databasesDuncan Coutts2014-08-291-1/+1
| | | | Now uses ghc-pkg init. The file-style databases are no longer supported.
* Be less verbose when printing Names when we don't know what's in scopeSimon Peyton Jones2014-04-241-1/+1
| | | | | | | | Previously we always printed qualified names, but that makes a lot of debug or warning output very verbose. So now we only print qualified names with -dppr-debug. Civilised output (from pukka error messages, with the environment available) is unaffected
* Use U+2018 instead of U+201B quote mark in compiler messagesHerbert Valerio Riedel2014-02-252-2/+2
| | | | | | | This matches GCC's choice of Unicode quotation marks (i.e. U+2018 and U+2019) and therefore looks more familiar on the console. This addresses #2507. Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Looks like plugin06 really only works with dynamic libraries enabledJoachim Breitner2013-12-021-1/+2
| | | | | | | | Otherwise we get ghc-stage2: panic! (the 'impossible' happened) (GHC version 7.7.20131202 for x86_64-unknown-linux): Static flags have not been initialised! Please call GHC.parseStaticFlags early enough.
* Try to set flags for some tests involving TH rightJoachim Breitner2013-12-021-2/+1
| | | | this tries to imporve upon 435c5955359d6e46a2fb905231678ac37ac0e71a.
* Run T7478, plugins06, T7918 only when dynamic libraries are availableJoachim Breitner2013-11-121-0/+1
| | | | | as they fail in a non-helpful way otherwise. This should help the testsuite pass on travis.
* Fix plugins02 with dynamic GHCIan Lynagh2013-03-161-1/+1
|
* Fix tests for dynamic ghcIan Lynagh2013-03-153-4/+4
|
* plugins01 should be using $(TEST_HC_OPTS), not $(HC_OPTS)Ian Lynagh2013-03-071-1/+1
| | | | Removes the need to explicitly pass it -fforce-recomp
* Force recompilation to ensure plugin output, fixes #7597Edward Z. Yang2013-03-061-1/+1
| | | | Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
* Update outputs following the unicode quote change in GHC's outputIan Lynagh2013-02-242-2/+3
|
* Convert more helper functionsIan Lynagh2013-02-111-1/+1
|
* Pass the test name to the test optionsIan Lynagh2013-02-071-1/+1
| | | | | | | | This allows them to give framework failures. I also had to change how setTestOpts works. Now, rather than applying the options to the directory's "default options", it just stores the options to be applied for each test (i.e. once we know the test name).
* plugins*: Follow changes in ghcIan Lynagh2012-12-141-1/+1
|
* Make the plugin tests standaloneIan Lynagh2012-11-173-36/+36
|
* Testsuite fixes for when we only have dynamic librariesIan Lynagh2012-10-251-1/+1
|
* use $(MAKE) instead of make (#7180)Simon Marlow2012-08-231-2/+2
|
* Follow changes in FastStringIan Lynagh2012-07-151-1/+1
|
* Fix cleanup for some tests.Paolo Capriotti2012-06-271-1/+2
|