Skip to content

Commit

Permalink
fixup test outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
sheaf committed May 6, 2024
1 parent d85322e commit c3554cd
Show file tree
Hide file tree
Showing 22 changed files with 29 additions and 42 deletions.
4 changes: 2 additions & 2 deletions Cabal/src/Distribution/Simple/SetupHooks/Errors.hs
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ rulesExceptionMessage = \case
DuplicateRuleId rId r1 r2 ->
unlines $
[ "Duplicate pre-build rule (" <> show rId <> ")"
, " - " <> show r1
, " - " <> show r2
, " - " <> show (ruleBinary r1)
, " - " <> show (ruleBinary r2)
]

locPath :: Location -> String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ Build profile: -w ghc-<GHCVER> -O1
In order, the following will be built:
- pkg-0 (lib) (first run)
Configuring library for pkg-0...
Error: [Cabal-7125]
Failed to build pkg-0-inplace. The failure occurred during the configure step. The exception was:
-----BEGIN CABAL OUTPUT-----
Error: [Cabal-5559]
[autogen-guard] To use the autogenerated module PackageInfo_* you need to specify `cabal-version: 3.12` or higher.
Error: [Cabal-7125]
Failed to build pkg-0-inplace. The failure occurred during the configure step.
CallStack (from HasCallStack):
dieWithException, called at src/Distribution/Simple/Configure.hs:2674:10 in Cabal-3.13.0.0-inplace:Distribution.Simple.Configure

Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# cabal v2-update
Downloading the latest package list from test-local-repo
# cabal v2-build
The package description file setup-dep/setup-dep.cabal has warnings: setup-dep/setup-dep.cabal:4:23: Packages with 'cabal-version: 1.12' or later should specify a specific version of the Cabal spec of the form 'cabal-version: x.y'. Use 'cabal-version: 1.20'.
The package description file pkg/pkg.cabal has warnings: pkg/pkg.cabal:4:23: Packages with 'cabal-version: 1.12' or later should specify a specific version of the Cabal spec of the form 'cabal-version: x.y'. Use 'cabal-version: 1.20'.
Resolving dependencies...
Error: [Cabal-7107]
Could not resolve dependencies:
Expand Down
2 changes: 2 additions & 0 deletions cabal-testsuite/PackageTests/Exec/cabal.out
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@ In order, the following will be built:
Configuring my-0.1...
Preprocessing executable 'my-executable' for my-0.1...
Building executable 'my-executable' for my-0.1...
Preprocessing library for my-0.1...
Building library for my-0.1...
# my my-executable
This is my-executable
7 changes: 0 additions & 7 deletions cabal-testsuite/PackageTests/NewBuild/CmdRun/Script/cabal.out
Original file line number Diff line number Diff line change
@@ -1,7 +0,0 @@
# cabal v2-run
Resolving dependencies...
Build profile: -w ghc-<GHCVER> -O1
In order, the following will be built:
- fake-package-0 (exe:script-script.hs) (first run)
Configuring executable 'script-script.hs' for fake-package-0...
Building executable 'script-script.hs' for fake-package-0...
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Test.Cabal.Prelude

main = cabalTest $ do
main = cabalTest $ recordMode DoNotRecord $ do
res <- cabal' "v2-run" ["script.hs"]
assertOutputContains "Hello World" res

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# cabal v2-run
The package description file ./script.cabal has warnings: script.cabal:0:0: A package using 'cabal-version: >=1.10' must use section syntax. See the Cabal user guide for details.
Error: [Cabal-7121]
Failed extracting script block: `{- cabal:` start marker not found
Original file line number Diff line number Diff line change
@@ -1,7 +0,0 @@
# cabal v2-run
Resolving dependencies...
Build profile: -w ghc-<GHCVER> -O1
In order, the following will be built:
- fake-package-0 (exe:script-script.lhs) (first run)
Configuring executable 'script-script.lhs' for fake-package-0...
Building executable 'script-script.lhs' for fake-package-0...
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Test.Cabal.Prelude

main = cabalTest $ do
main = cabalTest $ recordMode DoNotRecord $ do
res <- cabal' "v2-run" ["script.lhs"]
assertOutputContains "Hello World" res
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# cabal v2-configure
The package description file ./ConfigFile.cabal has warnings: ConfigFile.cabal:0:0: A package using 'cabal-version: >=1.10' must use section syntax. See the Cabal user guide for details.
Config file not written due to flag(s).
# cabal v2-configure
Config file not written due to flag(s).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# cabal v2-update
Downloading the latest package list from test-local-repo
# cabal v2-build
The package description file ./my-local-package.cabal has warnings: my-local-package.cabal:3:23: Packages with 'cabal-version: 1.12' or later should specify a specific version of the Cabal spec of the form 'cabal-version: x.y'. Use 'cabal-version: 1.20'.
Resolving dependencies...
Build profile: -w ghc-<GHCVER> -O1
In order, the following would be built:
Expand All @@ -12,6 +13,7 @@ In order, the following would be built:
Resolving dependencies...
Wrote freeze file: <ROOT>/cabal.project.freeze
# cabal v2-build
The package description file ./my-local-package.cabal has warnings: my-local-package.cabal:3:23: Packages with 'cabal-version: 1.12' or later should specify a specific version of the Cabal spec of the form 'cabal-version: x.y'. Use 'cabal-version: 1.20'.
Resolving dependencies...
Build profile: -w ghc-<GHCVER> -O1
In order, the following would be built:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ In order, the following will be built:
- pkg-a-0.1 (lib) (first run)
- pkg-a-0.1 (test:testing) (first run)
Configuring library for pkg-a-0.1...
Warning: [no-default-language] Packages using 'cabal-version: >= 1.10' and before 'cabal-version: 3.4' must specify the 'default-language' field for each component (e.g. Haskell98 or Haskell2010). If a component uses different languages in different modules then list the other ones in the 'other-languages' field.
Preprocessing library for pkg-a-0.1...
Building library for pkg-a-0.1...
Configuring test suite 'testing' for pkg-a-0.1...
Warning: [no-default-language] Packages using 'cabal-version: >= 1.10' and before 'cabal-version: 3.4' must specify the 'default-language' field for each component (e.g. Haskell98 or Haskell2010). If a component uses different languages in different modules then list the other ones in the 'other-languages' field.
Preprocessing test suite 'testing' for pkg-a-0.1...
Building test suite 'testing' for pkg-a-0.1...
Running 1 test suites...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ library
test-suite testing
type: exitcode-stdio-1.0
build-depends: base, pkg-a
default-language: Haskell2010
main-is: Main.hs
hs-source-dirs: test

8 changes: 0 additions & 8 deletions cabal-testsuite/PackageTests/Regression/T5318/install.out
Original file line number Diff line number Diff line change
@@ -1,8 +0,0 @@
# cabal v1-install
Resolving dependencies...
Configuring empty-data-dir-0...
Preprocessing executable 'foo' for empty-data-dir-0...
Building executable 'foo' for empty-data-dir-0...
Installing executable foo in <PATH>
Warning: The directory <ROOT>/install.dist/home/.cabal/bin is not in the system search path.
Completed empty-data-dir-0
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import Test.Cabal.Prelude
main = cabalTest $
main = cabalTest $ recordMode DoNotRecord $
cabal "v1-install" []
3 changes: 0 additions & 3 deletions cabal-testsuite/PackageTests/Regression/T6440/cabal.out
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,12 @@ In order, the following will be built:
- cabal6440-0.1 (lib) (first run)
- cabal6440-0.1 (test:tests) (first run)
Configuring library 'intern6440' for cabal6440-0.1...
Warning: [no-default-language] Packages using 'cabal-version: >= 1.10' and before 'cabal-version: 3.4' must specify the 'default-language' field for each component (e.g. Haskell98 or Haskell2010). If a component uses different languages in different modules then list the other ones in the 'other-languages' field.
Preprocessing library 'intern6440' for cabal6440-0.1...
Building library 'intern6440' for cabal6440-0.1...
Configuring library for cabal6440-0.1...
Warning: [no-default-language] Packages using 'cabal-version: >= 1.10' and before 'cabal-version: 3.4' must specify the 'default-language' field for each component (e.g. Haskell98 or Haskell2010). If a component uses different languages in different modules then list the other ones in the 'other-languages' field.
Preprocessing library for cabal6440-0.1...
Building library for cabal6440-0.1...
Configuring test suite 'tests' for cabal6440-0.1...
Warning: [no-default-language] Packages using 'cabal-version: >= 1.10' and before 'cabal-version: 3.4' must specify the 'default-language' field for each component (e.g. Haskell98 or Haskell2010). If a component uses different languages in different modules then list the other ones in the 'other-languages' field.
Preprocessing test suite 'tests' for cabal6440-0.1...
Building test suite 'tests' for cabal6440-0.1...
Running 1 test suites...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ library intern6440
exposed-modules: Inn
build-depends: base
hs-source-dirs: srcint

default-language: Haskell2010

test-suite tests
main-is: Main.hs
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# cabal v2-build
The package description file ./issue7234.cabal has warnings: issue7234.cabal:13:3: The field "other-extensions" is available only since the Cabal specification version 1.10.
Resolving dependencies...
Error: [Cabal-7107]
Could not resolve dependencies:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# cabal v2-build
The package description file ./issue7234.cabal has warnings: issue7234.cabal:14:3: The field "other-extensions" is available only since the Cabal specification version 1.10.
Resolving dependencies...
Build profile: -w ghc-<GHCVER> -O1
In order, the following will be built:
- issue7234-0 (lib) (first run)
Warning: issue7234.cabal:14:3: The field "other-extensions" is available only since the Cabal specification version 1.10.
Configuring library for issue7234-0...
Preprocessing library for issue7234-0...
Building library for issue7234-0...
2 changes: 1 addition & 1 deletion cabal-testsuite/PackageTests/Regression/T9640/cabal.out
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# cabal v2-update
Downloading the latest package list from test-local-repo
# cabal build
The package description file ./depend-on-custom-with-exe.cabal has warnings: depend-on-custom-with-exe.cabal:16:1: Ignoring trailing fields after sections: "ghc-options"
Resolving dependencies...
Build profile: -w ghc-<GHCVER> -O1
In order, the following will be built:
Expand All @@ -10,7 +11,6 @@ Configuring one-custom-0.1.0.0...
Preprocessing library for one-custom-0.1.0.0...
Building library for one-custom-0.1.0.0...
Installing library in <PATH>
Warning: depend-on-custom-with-exe.cabal:16:1: Ignoring trailing fields after sections: "ghc-options"
Configuring library for depend-on-custom-with-exe-0.1.0.0...
Preprocessing library for depend-on-custom-with-exe-0.1.0.0...
Building library for depend-on-custom-with-exe-0.1.0.0...
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ Configuring setup-hooks-cyclic-rules-test-0.1.0.0...
# Setup build
Error: [Cabal-9077]
Hooks: cycles in dependency structure of rules:
Rule: [(RuleId {ruleNameSpace = RulesNameSpace {rulesUnitId = UnitId "main", rulesModuleName = ModuleName "SetupHooks", rulesSrcLoc = (18,59)}, ruleName = "r3"})[0]] --> [setup.dist/work/dist/build/autogen/G3.hs]
Rule: [(RuleId {ruleNameSpace = RulesNameSpace {rulesUnitId = UnitId "main", rulesModuleName = ModuleName "SetupHooks", rulesSrcLoc = (18,59)}, ruleName = "r3"})[0]] --> [("setup.dist/work/dist/build/autogen","G3.hs")]

Rule: [(RuleId {ruleNameSpace = RulesNameSpace {rulesUnitId = UnitId "main", rulesModuleName = ModuleName "SetupHooks", rulesSrcLoc = (18,59)}, ruleName = "r2"})[0]] --> [setup.dist/work/dist/build/autogen/G1.hs]
Rule: [(RuleId {ruleNameSpace = RulesNameSpace {rulesUnitId = UnitId "main", rulesModuleName = ModuleName "SetupHooks", rulesSrcLoc = (18,59)}, ruleName = "r2"})[0]] --> [("setup.dist/work/dist/build/autogen","G1.hs")]
|
`- Rule: [(RuleId {ruleNameSpace = RulesNameSpace {rulesUnitId = UnitId "main", rulesModuleName = ModuleName "SetupHooks", rulesSrcLoc = (18,59)}, ruleName = "r1"})[0]] --> [setup.dist/work/dist/build/autogen/G2.hs]
`- Rule: [(RuleId {ruleNameSpace = RulesNameSpace {rulesUnitId = UnitId "main", rulesModuleName = ModuleName "SetupHooks", rulesSrcLoc = (18,59)}, ruleName = "r1"})[0]] --> [("setup.dist/work/dist/build/autogen","G2.hs")]

Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ Configuring setup-hooks-duplicate-rule-id-test-0.1.0.0...
# Setup build
Error: [Cabal-7717]
Duplicate pre-build rule (RuleId {ruleNameSpace = RulesNameSpace {rulesUnitId = UnitId "main", rulesModuleName = ModuleName "SetupHooks", rulesSrcLoc = (17,59)}, ruleName = "myRule"})
- Rule: [] --> [src/A.hs]
- Rule: [] --> [src/B.hs]
- Rule: [] --> [("src","A.hs")]
- Rule: [] --> [("src","B.hs")]

0 comments on commit c3554cd

Please sign in to comment.