Skip to content
This repository has been archived by the owner on Aug 2, 2020. It is now read-only.

Commit

Permalink
Test conditions for building win32 and unix packages
Browse files Browse the repository at this point in the history
See #197
  • Loading branch information
snowleopard committed Oct 30, 2016
1 parent f808265 commit 63ba250
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Rules/Selftest.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import Test.QuickCheck

import Base
import Expression
import GHC
import Oracles.Config.Setting
import Oracles.ModuleFiles
import Settings
import Settings.Builders.Ar
Expand Down Expand Up @@ -94,9 +96,13 @@ testModuleName = do

testPackages :: Action ()
testPackages = do
putBuild $ "==== Packages, interpretInContext"
putBuild $ "==== Check system configuration"
win <- windowsHost -- This depends on the @boot@ and @configure@ scripts.
putBuild $ "==== Packages, interpretInContext, configuration flags"
forM_ [Stage0 ..] $ \stage -> do
pkgs <- stagePackages stage
when (win32 `elem` pkgs) . test $ win
when (unix `elem` pkgs) . test $ not win
test $ pkgs == nubOrd pkgs

testWay :: Action ()
Expand Down

0 comments on commit 63ba250

Please sign in to comment.