Skip to content

Commit 2469702

Browse files
committed
fixup test outputs
1 parent 5a544cb commit 2469702

File tree

22 files changed

+29
-42
lines changed

22 files changed

+29
-42
lines changed

Cabal/src/Distribution/Simple/SetupHooks/Errors.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ rulesExceptionMessage = \case
171171
DuplicateRuleId rId r1 r2 ->
172172
unlines $
173173
[ "Duplicate pre-build rule (" <> show rId <> ")"
174-
, " - " <> show r1
175-
, " - " <> show r2
174+
, " - " <> show (ruleBinary r1)
175+
, " - " <> show (ruleBinary r2)
176176
]
177177

178178
locPath :: Location -> String

cabal-testsuite/PackageTests/BuildAutogenPackageGuard/cabal.out

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ Build profile: -w ghc-<GHCVER> -O1
44
In order, the following will be built:
55
- pkg-0 (lib) (first run)
66
Configuring library for pkg-0...
7+
Error: [Cabal-7125]
8+
Failed to build pkg-0-inplace. The failure occurred during the configure step. The exception was:
9+
-----BEGIN CABAL OUTPUT-----
710
Error: [Cabal-5559]
811
[autogen-guard] To use the autogenerated module PackageInfo_* you need to specify `cabal-version: 3.12` or higher.
9-
Error: [Cabal-7125]
10-
Failed to build pkg-0-inplace. The failure occurred during the configure step.
12+
CallStack (from HasCallStack):
13+
dieWithException, called at src/Distribution/Simple/Configure.hs:2674:10 in Cabal-3.13.0.0-inplace:Distribution.Simple.Configure
14+

cabal-testsuite/PackageTests/BuildTargets/UseLocalPackageForSetup/use-local-package-as-setup-dep.out

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# cabal v2-update
22
Downloading the latest package list from test-local-repo
33
# cabal v2-build
4+
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'.
5+
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'.
46
Resolving dependencies...
57
Error: [Cabal-7107]
68
Could not resolve dependencies:

cabal-testsuite/PackageTests/Exec/cabal.out

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@ In order, the following will be built:
66
Configuring my-0.1...
77
Preprocessing executable 'my-executable' for my-0.1...
88
Building executable 'my-executable' for my-0.1...
9+
Preprocessing library for my-0.1...
10+
Building library for my-0.1...
911
# my my-executable
1012
This is my-executable
Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +0,0 @@
1-
# cabal v2-run
2-
Resolving dependencies...
3-
Build profile: -w ghc-<GHCVER> -O1
4-
In order, the following will be built:
5-
- fake-package-0 (exe:script-script.hs) (first run)
6-
Configuring executable 'script-script.hs' for fake-package-0...
7-
Building executable 'script-script.hs' for fake-package-0...

cabal-testsuite/PackageTests/NewBuild/CmdRun/Script/cabal.test.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Test.Cabal.Prelude
22

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# cabal v2-run
2+
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.
23
Error: [Cabal-7121]
34
Failed extracting script block: `{- cabal:` start marker not found
Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +0,0 @@
1-
# cabal v2-run
2-
Resolving dependencies...
3-
Build profile: -w ghc-<GHCVER> -O1
4-
In order, the following will be built:
5-
- fake-package-0 (exe:script-script.lhs) (first run)
6-
Configuring executable 'script-script.lhs' for fake-package-0...
7-
Building executable 'script-script.lhs' for fake-package-0...
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Test.Cabal.Prelude
22

3-
main = cabalTest $ do
3+
main = cabalTest $ recordMode DoNotRecord $ do
44
res <- cabal' "v2-run" ["script.lhs"]
55
assertOutputContains "Hello World" res

cabal-testsuite/PackageTests/NewConfigure/ConfigFile/cabal.out

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# cabal v2-configure
2+
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.
23
Config file not written due to flag(s).
34
# cabal v2-configure
45
Config file not written due to flag(s).

cabal-testsuite/PackageTests/NewFreeze/BuildTools/new_freeze.out

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# cabal v2-update
22
Downloading the latest package list from test-local-repo
33
# cabal v2-build
4+
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'.
45
Resolving dependencies...
56
Build profile: -w ghc-<GHCVER> -O1
67
In order, the following would be built:
@@ -12,6 +13,7 @@ In order, the following would be built:
1213
Resolving dependencies...
1314
Wrote freeze file: <ROOT>/cabal.project.freeze
1415
# cabal v2-build
16+
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'.
1517
Resolving dependencies...
1618
Build profile: -w ghc-<GHCVER> -O1
1719
In order, the following would be built:

cabal-testsuite/PackageTests/Project/CoverageProject/cabal.out

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@ In order, the following will be built:
55
- pkg-a-0.1 (lib) (first run)
66
- pkg-a-0.1 (test:testing) (first run)
77
Configuring library for pkg-a-0.1...
8-
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.
98
Preprocessing library for pkg-a-0.1...
109
Building library for pkg-a-0.1...
1110
Configuring test suite 'testing' for pkg-a-0.1...
12-
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.
1311
Preprocessing test suite 'testing' for pkg-a-0.1...
1412
Building test suite 'testing' for pkg-a-0.1...
1513
Running 1 test suites...

cabal-testsuite/PackageTests/Project/CoverageProject/pkg-a/pkg-a.cabal

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ library
1818
test-suite testing
1919
type: exitcode-stdio-1.0
2020
build-depends: base, pkg-a
21+
default-language: Haskell2010
2122
main-is: Main.hs
2223
hs-source-dirs: test
2324

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +0,0 @@
1-
# cabal v1-install
2-
Resolving dependencies...
3-
Configuring empty-data-dir-0...
4-
Preprocessing executable 'foo' for empty-data-dir-0...
5-
Building executable 'foo' for empty-data-dir-0...
6-
Installing executable foo in <PATH>
7-
Warning: The directory <ROOT>/install.dist/home/.cabal/bin is not in the system search path.
8-
Completed empty-data-dir-0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import Test.Cabal.Prelude
2-
main = cabalTest $
2+
main = cabalTest $ recordMode DoNotRecord $
33
cabal "v1-install" []

cabal-testsuite/PackageTests/Regression/T6440/cabal.out

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,12 @@ In order, the following will be built:
66
- cabal6440-0.1 (lib) (first run)
77
- cabal6440-0.1 (test:tests) (first run)
88
Configuring library 'intern6440' for cabal6440-0.1...
9-
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.
109
Preprocessing library 'intern6440' for cabal6440-0.1...
1110
Building library 'intern6440' for cabal6440-0.1...
1211
Configuring library for cabal6440-0.1...
13-
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.
1412
Preprocessing library for cabal6440-0.1...
1513
Building library for cabal6440-0.1...
1614
Configuring test suite 'tests' for cabal6440-0.1...
17-
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.
1815
Preprocessing test suite 'tests' for cabal6440-0.1...
1916
Building test suite 'tests' for cabal6440-0.1...
2017
Running 1 test suites...

cabal-testsuite/PackageTests/Regression/T6440/cabal6440.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ library intern6440
1313
exposed-modules: Inn
1414
build-depends: base
1515
hs-source-dirs: srcint
16-
16+
default-language: Haskell2010
1717

1818
test-suite tests
1919
main-is: Main.hs

cabal-testsuite/PackageTests/Regression/T7234/Fail/cabal.out

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# cabal v2-build
2+
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.
23
Resolving dependencies...
34
Error: [Cabal-7107]
45
Could not resolve dependencies:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# cabal v2-build
2+
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.
23
Resolving dependencies...
34
Build profile: -w ghc-<GHCVER> -O1
45
In order, the following will be built:
56
- issue7234-0 (lib) (first run)
6-
Warning: issue7234.cabal:14:3: The field "other-extensions" is available only since the Cabal specification version 1.10.
77
Configuring library for issue7234-0...
88
Preprocessing library for issue7234-0...
99
Building library for issue7234-0...

cabal-testsuite/PackageTests/Regression/T9640/cabal.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# cabal v2-update
22
Downloading the latest package list from test-local-repo
33
# cabal build
4+
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"
45
Resolving dependencies...
56
Build profile: -w ghc-<GHCVER> -O1
67
In order, the following will be built:
@@ -10,7 +11,6 @@ Configuring one-custom-0.1.0.0...
1011
Preprocessing library for one-custom-0.1.0.0...
1112
Building library for one-custom-0.1.0.0...
1213
Installing library in <PATH>
13-
Warning: depend-on-custom-with-exe.cabal:16:1: Ignoring trailing fields after sections: "ghc-options"
1414
Configuring library for depend-on-custom-with-exe-0.1.0.0...
1515
Preprocessing library for depend-on-custom-with-exe-0.1.0.0...
1616
Building library for depend-on-custom-with-exe-0.1.0.0...

cabal-testsuite/PackageTests/SetupHooks/SetupHooksCyclicRules/setup.out

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ Configuring setup-hooks-cyclic-rules-test-0.1.0.0...
33
# Setup build
44
Error: [Cabal-9077]
55
Hooks: cycles in dependency structure of rules:
6-
Rule: [(RuleId {ruleNameSpace = RulesNameSpace {rulesUnitId = UnitId "main", rulesModuleName = ModuleName "SetupHooks", rulesSrcLoc = (18,59)}, ruleName = "r3"})[0]] --> [setup.dist/work/dist/build/autogen/G3.hs]
6+
Rule: [(RuleId {ruleNameSpace = RulesNameSpace {rulesUnitId = UnitId "main", rulesModuleName = ModuleName "SetupHooks", rulesSrcLoc = (18,59)}, ruleName = "r3"})[0]] --> [("setup.dist/work/dist/build/autogen","G3.hs")]
77

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

cabal-testsuite/PackageTests/SetupHooks/SetupHooksDuplicateRuleId/setup.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ Configuring setup-hooks-duplicate-rule-id-test-0.1.0.0...
33
# Setup build
44
Error: [Cabal-7717]
55
Duplicate pre-build rule (RuleId {ruleNameSpace = RulesNameSpace {rulesUnitId = UnitId "main", rulesModuleName = ModuleName "SetupHooks", rulesSrcLoc = (17,59)}, ruleName = "myRule"})
6-
- Rule: [] --> [src/A.hs]
7-
- Rule: [] --> [src/B.hs]
6+
- Rule: [] --> [("src","A.hs")]
7+
- Rule: [] --> [("src","B.hs")]

0 commit comments

Comments
 (0)