-
Notifications
You must be signed in to change notification settings - Fork 844
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into 4027-ram-usage
- Loading branch information
Showing
12 changed files
with
105 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import StackTest | ||
|
||
import Control.Monad (unless) | ||
import Data.List (isInfixOf) | ||
|
||
-- Integration test for https://github.com/commercialhaskell/stack/issues/3959 | ||
main :: IO () | ||
main = do | ||
checkFlagsBeforeCommand | ||
checkFlagsAfterCommand | ||
|
||
checkFlagsBeforeCommand :: IO () | ||
checkFlagsBeforeCommand = stackCheckStderr ["--test", "--no-run-tests", "build"] checker | ||
|
||
checkFlagsAfterCommand :: IO () | ||
checkFlagsAfterCommand = stackCheckStderr ["build", "--test", "--no-run-tests"] checker | ||
|
||
checker :: String -> IO () | ||
checker output = do | ||
let testsAreDisabled = any (\ln -> "Test running disabled by" `isInfixOf` ln) (lines output) | ||
unless testsAreDisabled $ fail "Tests should not be run" |
10 changes: 10 additions & 0 deletions
10
test/integration/tests/3959-order-of-flags/files/package.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: issue3959 | ||
version: 0.1.0.0 | ||
|
||
dependencies: | ||
- base | ||
|
||
tests: | ||
test: | ||
main: Spec.hs | ||
source-dirs: test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
resolver: lts-11.6 |
2 changes: 2 additions & 0 deletions
2
test/integration/tests/3959-order-of-flags/files/test/Spec.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
main :: IO () | ||
main = fail "this always fails for the test" |