Skip to content
Snippets Groups Projects
Commit 9b916e81 authored by Matthew Pickering's avatar Matthew Pickering Committed by Marge Bot
Browse files

Add test for #18567

Closes #18567
parent 20173629
No related branches found
No related tags found
No related merge requests found
TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
SETUP = ./Setup -v0
# This test is for packages in internal libraries
T18567: clean
$(MAKE) clean
'$(TEST_HC)' $(TEST_HC_OPTS) -v0 --make Setup
$(SETUP) clean
$(SETUP) configure $(CABAL_MINIMAL_BUILD) --with-ghc='$(TEST_HC)' --ghc-options='$(TEST_HC_OPTS)'
$(SETUP) build
ifneq "$(CLEANUP)" ""
$(MAKE) clean
endif
clean :
$(RM) -r */dist Setup$(exeext) *.o *.hi
import Distribution.Simple
main = defaultMain
<no location info>: warning: [-Wunused-packages]
The following packages were specified via -package or -package-id flags,
but were not needed for compilation:
- internal-lib-0.1.0.0-1ShKL1eXB3aGPfTSujH0Bv-sublib-unused
if config.cleanup:
cleanup = 'CLEANUP=1'
else:
cleanup = 'CLEANUP=0'
test('T18567',
extra_files(['Setup.hs', 'sublib/', 'sublib-unused', 'src/', 'internal-lib.cabal']),
run_command,
['$MAKE -s --no-print-directory T18567 ' + cleanup])
cabal-version: 2.0
name: internal-lib
version: 0.1.0.0
license: BSD3
build-type: Simple
cabal-version: >=2.0
library
hs-source-dirs: src
exposed-modules: TestLib
build-depends: base, sublib, sublib-unused
default-language: Haskell2010
ghc-options: -Wunused-packages
library sublib-unused
hs-source-dirs: sublib-unused
exposed-modules: SublibUnused
build-depends: base
default-language: Haskell2010
library sublib
hs-source-dirs: sublib
exposed-modules: Sublib
build-depends: base
default-language: Haskell2010
module TestLib where
-- Uses sublib but not sublib-unused
import Sublib
module SublibUnused where
module Sublib where
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment