Commit ab45de12 authored by Edward Z. Yang's avatar Edward Z. Yang

Failing test for #10420 using plugins.

Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
parent 59720370
......@@ -1197,6 +1197,7 @@ mk/ghcconfig*_inplace_bin_ghc-stage2.exe.mk
/tests/plugins/plugins01
/tests/plugins/plugins05
/tests/plugins/plugins06
/tests/plugins/plugins07
/tests/plugins/simple-plugin/dist/
/tests/plugins/simple-plugin/install/
/tests/plugins/simple-plugin/local.package.conf
......@@ -1204,6 +1205,7 @@ mk/ghcconfig*_inplace_bin_ghc-stage2.exe.mk
/tests/plugins/simple-plugin/pkg.plugins02/
/tests/plugins/simple-plugin/pkg.plugins03/
/tests/plugins/simple-plugin/setup
/tests/plugins/rule-defining-plugin/pkg.plugins07/
/tests/polykinds/Freeman
/tests/polykinds/MonoidsFD
/tests/polykinds/MonoidsTF
......
......@@ -2,9 +2,12 @@ TOP=../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
.PHONY: plugins01
.PHONY: plugins01 plugins07
plugins01:
"$(TEST_HC)" $(TEST_HC_OPTS) $(ghcPluginWayFlags) --make -v0 plugins01.hs -package-db simple-plugin/pkg.plugins01/local.package.conf -fplugin Simple.Plugin -fplugin-opt Simple.Plugin:Irrelevant_Option -package simple-plugin
./plugins01
plugins07:
"$(TEST_HC)" $(TEST_HC_OPTS) $(ghcPluginWayFlags) --make -v0 -O plugins07.hs -package-db rule-defining-plugin/pkg.plugins07/local.package.conf -package rule-defining-plugin
./plugins07
{-# OPTIONS_GHC -fplugin RuleDefiningPlugin #-}
module Plugins07a where
......@@ -38,3 +38,9 @@ test('plugins06',
only_ways([config.ghc_plugin_way]) ],
multimod_compile_and_run, ['plugins06', '-package ghc'])
test('plugins07',
[pre_cmd('$MAKE -s --no-print-directory -C rule-defining-plugin package.plugins07'),
clean_cmd('$MAKE -s --no-print-directory -C rule-defining-plugin clean.plugins07'),
expect_broken(10420)],
run_command,
['$MAKE -s --no-print-directory plugins07'])
module Main where
import Plugins07a
import RuleDefiningPlugin
{-# NOINLINE x #-}
x = "foo"
main = putStrLn (show x)
Copyright (c) 2008, Max Bolingbroke
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the name of Max Bolingbroke nor the names of other contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
clean.%:
rm -rf pkg.$*
HERE := $(abspath .)
$(eval $(call canonicalise,HERE))
package.%:
$(MAKE) clean.$*
mkdir pkg.$*
"$(TEST_HC)" -outputdir pkg.$* --make -v0 -o pkg.$*/setup Setup.hs
"$(GHC_PKG)" init pkg.$*/local.package.conf
pkg.$*/setup configure --distdir pkg.$*/dist -v0 $(CABAL_PLUGIN_BUILD) --prefix="$(HERE)/pkg.$*/install" --with-compiler="$(TEST_HC)" --with-hc-pkg="$(GHC_PKG)" --package-db=pkg.$*/local.package.conf
pkg.$*/setup build --distdir pkg.$*/dist -v0
pkg.$*/setup install --distdir pkg.$*/dist -v0
module RuleDefiningPlugin where
import GhcPlugins
{-# RULES "unsound" forall x. show x = "SHOWED" #-}
plugin :: Plugin
plugin = defaultPlugin
import Distribution.Simple
main = defaultMain
Name: rule-defining-plugin
Version: 0.1
Synopsis: For testing
Cabal-Version: >= 1.2
Build-Type: Simple
License: BSD3
License-File: LICENSE
Author: Edward Z. Yang
Homepage: http://ezyang.com
Library
Build-Depends: base, ghc
ghc-options: -O
Exposed-Modules:
RuleDefiningPlugin
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment