Ticket #811: cabal-head-fix-test-suite-conditionals.dpatch

File cabal-head-fix-test-suite-conditionals.dpatch, 37.5 KB (added by ttuegel, 2 years ago)

Fix bug in Cabal HEAD.

Line 
11 patch for repository /home/ttuegel/repos/cabal-head:
2
3Thu Mar 10 20:56:53 CST 2011  Thomas Tuegel <ttuegel@gmail.com>
4  * Fix for test suite stanzas with conditionals.
5  Ticket #811. This fixes a problem where Cabal would fail to detect the "type"
6  field of a test suite when the test suite contained a conditional. Conditionals
7  can now be used, with the restriction that the "type" field and the appropriate
8  "main-is" or "test-module" field must be specified together in any conditional
9  branch where they occur.
10
11New patches:
12
13[Fix for test suite stanzas with conditionals.
14Thomas Tuegel <ttuegel@gmail.com>**20110311025653
15 Ignore-this: efd7ec9f666f09c582761cc9fe3be59e
16 Ticket #811. This fixes a problem where Cabal would fail to detect the "type"
17 field of a test suite when the test suite contained a conditional. Conditionals
18 can now be used, with the restriction that the "type" field and the appropriate
19 "main-is" or "test-module" field must be specified together in any conditional
20 branch where they occur.
21] {
22hunk ./Distribution/PackageDescription/Parse.hs 262
23 validateTestSuite :: LineNo -> TestSuiteStanza -> ParseResult TestSuite
24 validateTestSuite line stanza =
25     case testStanzaTestType stanza of
26-      Nothing ->
27-        syntaxError line $
28-             "The 'type' field is required for test suites. "
29-          ++ "The available test types are: "
30-          ++ intercalate ", " (map display knownTestTypes)
31+      Nothing -> return $
32+        emptyTestSuite { testBuildInfo = testStanzaBuildInfo stanza }
33 
34       Just tt@(TestTypeUnknown _ _) ->
35         return emptyTestSuite {
36hunk ./Distribution/PackageDescription/Parse.hs 760
37                 "'test-suite' needs one argument (the test suite's name)"
38             testname <- lift $ runP line_no "test" parseTokenQ sec_label
39             flds <- collectFields (parseTestFields line_no) sec_fields
40-            skipField
41-            (repos, flags, lib, exes, tests) <- getBody
42-            return (repos, flags, lib, exes, (testname, flds): tests)
43+            let checkTestType ts ct =
44+                    let ts' = mappend ts $ condTreeData ct
45+                        extractComponents (_, t, Nothing) = [t]
46+                        extractComponents (_, t, Just e) = [t, e]
47+                        subTrees = concatMap extractComponents $ condTreeComponents ct
48+                    in hasTestInterface ts' && (all (checkTestType ts') subTrees)
49+                hasTestInterface t = testInterface t /= testInterface emptyTestSuite
50+            if checkTestType emptyTestSuite flds
51+                then do
52+                    skipField
53+                    (repos, flags, lib, exes, tests) <- getBody
54+                    return (repos, flags, lib, exes, (testname, flds) : tests)
55+                else lift $ syntaxError line_no $
56+                         "Test suite \"" ++ testname
57+                      ++ "\" is missing required field \"type\" or the field "
58+                      ++ "is not present in all conditional branches. The "
59+                      ++ "available test types are: "
60+                      ++ intercalate ", " (map display knownTestTypes)
61 
62         | sec_type == "library" -> do
63             when (not (null sec_label)) $ lift $
64}
65
66Context:
67
68[Update release script for recent haskell.org server changes
69Duncan Coutts <duncan@community.haskell.org>**20110227171445
70 Ignore-this: 3243990fca0f6e619dbaca47615bd009
71]
72[Fix release date in changelog
73Duncan Coutts <duncan@community.haskell.org>**20110227150619
74 Ignore-this: 2cc2858ea00e5005364f369178a944e3
75]
76[Always use verbosity slient when calling hc-pkg dump
77Duncan Coutts <duncan@community.haskell.org>**20110210200603
78 Ignore-this: d2c50f0bde7987559d859579f6ff1fcf
79 We don't want to contaminate the hc-pkg output with info/debug messages.
80 Coincidentally the messages that current ghc-pkg versions produce at
81 -v2 verbosity level do not cause a problem. There's no reason to expect
82 future versions to work that way however.
83]
84[Fix HcPkg.dump for the case of an empty database
85Duncan Coutts <duncan@community.haskell.org>**20110210200111
86 Ignore-this: bb604d49d2d6be488ffba50378fed858
87 Previously it returned the value [emptyInstalledPackageInfo]
88]
89[add --enable-executable-dynamic option for dynamic linking of executables
90Jens Petersen <juhp@community.haskell.org>**20110130110206
91 Ignore-this: f336897c2ad0ea6560247576d358231f
92]
93[Update copyright year
94Duncan Coutts <duncan@community.haskell.org>**20110131145403
95 Ignore-this: 367addece3538851282fa35dc59a772f
96]
97[Add changelog entry for version 1.10.1.0
98Duncan Coutts <duncan@community.haskell.org>**20110131145428
99 Ignore-this: 7dd98797de68db6c8d1ffc2dc2b5b78b
100]
101[Add synopsis field to the installed package info
102Duncan Coutts <duncan@community.haskell.org>**20110131003635
103 Ignore-this: b94db22dcd5a7753056da9a44fe8c23e
104 The description is already included. The one-line synopsis should be
105 there too. Note that this is an API change that will affect compilers.
106]
107[Rewrite intro to user guide and split into multiple files
108Duncan Coutts <duncan@community.haskell.org>**20110130220047
109 Ignore-this: f353d514c4c46f241471e6aad485bce9
110 The chapter on installing packages still needs to be rewritten
111 to describe the cabal tool, rather than runhaskell Setup.hs
112]
113[Added unit test for exitcode-stdio-1.0 test suite with and without HPC.
114Thomas Tuegel <ttuegel@gmail.com>**20110114165132
115 Ignore-this: e69128c5cf06923d4b961753ffaa2ff4
116]
117[Fixes for running test suite with HPC.
118Thomas Tuegel <ttuegel@gmail.com>**20110113114354
119 Ignore-this: 84bf3cb6a47188db0b6fcde5ce1d4eda
120]
121[Add a couple TODOs relating to the hpc feature
122Duncan Coutts <duncan@haskell.org>**20110131001517
123 Ignore-this: c78bbf1d75948431d9740648089eabb6
124]
125[Support building libraries and test suites with HPC; automatic report generation.
126Thomas Tuegel <ttuegel@gmail.com>**20110130173451
127 Ignore-this: cbffdc7d0fb03bd7d6745aa64625cc3c
128]
129[Export a bunch of utils for package configurations
130Duncan Coutts <duncan@community.haskell.org>**20110129205103
131 Ignore-this: b0654528a073185e0c9e9e84330da517
132]
133[Get the mapTreeData util from the right place
134Duncan Coutts <duncan@community.haskell.org>**20110129204834
135 Ignore-this: 9cc5712b72583e94c43a7bab448942e7
136 Originally Thomas had moved them to Distribution.PackageDescription
137 but I'm rather of the opinion that the functions (and the data
138 structure) that they manipluate is ugly and I'd rather keep them
139 hidden away in a less public module.
140]
141[Support more placeholders in --test-option[s] template
142Johan Tibell <johan.tibell@gmail.com>**20110111101957
143 Ignore-this: 4a58dba3d8fc411aca1fa7c6c0062398
144 
145 Now supports $pkgid, $compiler, $os, $arch, and $test-suite.
146]
147[Allow name template in --test-option and --test-options
148Johan Tibell <johan.tibell@gmail.com>**20110111073013
149 Ignore-this: 82ec6b757182c0b3372b50dd1dd9367b
150 
151 Only $test-suite is supported for now.
152]
153[Tracking enabled/disabled TestSuites in PackageDescription.
154Thomas Tuegel <ttuegel@gmail.com>**20110110174227
155 Ignore-this: 412a5fdbef2dc7fbc7dc698c86917e5e
156 This patch adds the 'testEnabled' field to TestSuite. It's
157 undesirable to track build status information in the static package
158 description, but there is no better solution at this time. This
159 patch has the side-effect of fixing several TODOs in
160 Distribution.Simple.Configure.
161]
162[Relax QA check on test-suite sections to require only Cabal 1.8
163Duncan Coutts <duncan@community.haskell.org>**20110129182623
164 Ignore-this: 8d960e7720c5b9c0a23879980a8b3f53
165 Only Cabal-1.10 and later can use test suites. Versions of Cabal prior
166 to 1.8 actually barf on test-suite sections, while Cabal-1.8 will
167 ignore these sections with a warning. Previously the QA check enforced
168 that packages with test-suite section specify 'cabal-version: >= 1.10'
169 but strictly speaking we only need to require 'cabal-version: >= 1.8'.
170 This relaxation allows people to write packages using test suites such
171 that people using Cabal-1.8 will be able to build and install the
172 package, just not run the test suite. Clear as mud?
173]
174[Add --html for haddock command.
175Thomas Schilling <nominolo@googlemail.com>**20090816014017
176 
177 This makes it easier to build both html documentation and a hoogle
178 database:
179 
180   ./setup haddock [--html]   # build only HTML docs (default)
181   ./setup haddock --hoogle   # build only Hoogle DB
182   ./setup haddock --hoogle --html   # build both
183]
184[Look for hsc2hs in the same place as ghc
185Ian Lynagh <igloo@earth.li>**20110125200353
186 This is particularly important on OS X, where there may be both 32
187 and 64bit versions around.
188]
189[Follow changes in GHC's linker flag handling
190Ian Lynagh <igloo@earth.li>**20110124231819]
191[Add NondecreasingIndentation support for old GHCs
192Ian Lynagh <igloo@earth.li>**20110121233655
193 Ignore-this: 18b866cd7806e90c13c70e5c9065ea14
194]
195[reexport setFileOrdinary/Executable functions from Utils module
196Duncan Coutts <duncan@community.haskell.org>**20110117150104
197 Ignore-this: 5edb64c3c69ae247ce25ff72dc655baf
198]
199[Preserve executable bit during in sdist for extra-source-files
200Duncan Coutts <duncan@community.haskell.org>**20110117144243
201 Ignore-this: d419dc5d8050d3236a4c78fcad5f7d6b
202]
203[Fix a documentation reference to ghc 6.14
204Duncan Coutts <duncan@haskell.org>**20101027134319
205 Ignore-this: cc05b5066884008491a9c60d6c64782d
206]
207[Fix import warnings
208Ian Lynagh <igloo@earth.li>**20110115005030
209 Ignore-this: 4bc4d971238ed7ef331690bb9b1cbfa3
210]
211[Pass gcc/ld locations and flags to configure scripts
212Ian Lynagh <igloo@earth.li>**20110115004346
213 Flags are passed through the CFLAGS and LDFLAGS variables
214]
215[Get extra gcc and ld flags from GHC
216Ian Lynagh <igloo@earth.li>**20101220173544]
217[Change my email address
218Duncan Coutts <duncan@community.haskell.org>**20110114173347
219 Ignore-this: 5ce93c85c0d8e3100c669d363447648a
220]
221[Use the standard names for file copy functions rather than a local rename
222Duncan Coutts <duncan@haskell.org>**20110114173219
223 Ignore-this: 140a927eae404fa4fa96ec86d6fb5682
224]
225[sdist perms fix
226ramsdell@mitre.org**20101220181308
227 Ignore-this: ca0ff71dc7318d12c4f64134c636a08e
228]
229[Clarify docs about LocalBuildInfo installedPkgs field
230Duncan Coutts <duncan@haskell.org>**20110111005941
231 Ignore-this: 73c6ac8cb2b5e0fbd912dfad6a6f9d5f
232 Only deps of current package, not all installed packages.
233 Confusion reported by quuuux on #haskell.
234]
235[Removed documentation for obsolete options to 'setup test' from the User Guide.
236Thomas Tuegel <ttuegel@gmail.com>**20110109180811
237 Ignore-this: ce7298400abd573023e5c3c1abbef10
238]
239[Document the '--{en,dis}able-tests' options in the User Guide
240Thomas Tuegel <ttuegel@gmail.com>**20101204164404
241 Ignore-this: 28972ba6e70a3e91754dd42bfe9c2a5e
242]
243[Update the changelog for 1.8.0.4, 1.8.0.6 and 1.10.0.0
244Duncan Coutts <duncan@haskell.org>**20101118203701
245 Ignore-this: 2b1693427bd29b84432b1b35a2f627c6
246]
247[Replace uses of the old try function with the new one
248Ian Lynagh <igloo@earth.li>**20101218230920
249 Ignore-this: e0a9db2f97bc3f90ceb5772944f4e25b
250]
251[Replace uses of the old catch function with the new one
252Ian Lynagh <igloo@earth.li>**20101218213608]
253[Add GADTSyntax to extension list
254Ian Lynagh <igloo@earth.li>**20101218150259]
255[Allow CABAL_VERSION to be defined when bootstrapping
256Ian Lynagh <igloo@earth.li>**20101212213359
257 Needed for the GHC build system
258]
259[Add NondecreasingIndentation to Language.Haskell.Extension
260Ian Lynagh <igloo@earth.li>**20101124223953
261 Ignore-this: 2d072a45d76770cf97553b0e5df9e998
262]
263[Export commandParseArgs
264Duncan Coutts <duncan@haskell.org>**20101105140655
265 Ignore-this: f452f13b130e886ecd8262c6f24a0c52
266]
267[Add some more extensions that GHC knows about
268Ian Lynagh <igloo@earth.li>**20101026220409
269 Ignore-this: 92bbbb269985fe576798cd2cdba4ceca
270]
271[Whitespace only
272Ian Lynagh <igloo@earth.li>**20101026220403
273 Ignore-this: 8746b070884de3ed45db486a0a49db3e
274]
275[Fix parsing of empty default-language fields
276Ian Lynagh <igloo@earth.li>**20101026220312
277 Ignore-this: 99011d6c9af431e7c8d90c3cee364606
278]
279[Add support for general extension en/disabling
280Ian Lynagh <igloo@earth.li>**20101026145503]
281[Tweak a couple of types
282Ian Lynagh <igloo@earth.li>**20101026131250]
283[Generalise deprecatedExtensions
284Ian Lynagh <igloo@earth.li>**20101026131121
285 It now works with Extensions rather than KnownExtensions
286]
287[Split known-extensions off into their own type, and remove knownExtensions
288Ian Lynagh <igloo@earth.li>**20101025232624
289 The knownExtensions list had already got out of sync with the datatype.
290 Now we use an Enum instance to get the list of constructors.
291 Also, having the actual extensions in a separate type than UnknownExtension
292 and EnableExtension makes it easier to add extension disabling support
293 later.
294]
295[Add a test program to look for ghc extensions that are not registered
296Duncan Coutts <duncan@haskell.org>**20101025163536
297 Ignore-this: cf38e2434eba386b83b818a29fd5ac14
298 Should live in the ghc testsuite but no harm having it here too.
299]
300[Make the .cabal file fully 1.10-compliant
301Ian Lynagh <igloo@earth.li>**20101020133037
302 Ignore-this: 66409062c8d4b698f69aa58a83b85ef1
303 Add Default-Language field, and change Extensions to Default-Extensions.
304]
305[Require "cabal-version: >= 1.10" as we use the new testsuite syntax
306Ian Lynagh <igloo@earth.li>**20101020131829
307 Ignore-this: 6aecdd77f78234f0359af0509f1ba636
308]
309[Fix warnings: Remove duplicate imports
310Ian Lynagh <igloo@earth.li>**20101020125710
311 Ignore-this: dea9d889078c729459e1ab92a8e54c08
312]
313[Merge conflicts
314Ian Lynagh <igloo@earth.li>**20101020112200
315 Ignore-this: d96cab403511f914d9d8df1a29ca58ee
316]
317[Add final newline
318Simon Marlow <marlowsd@gmail.com>**20101013125337
319 Ignore-this: 99e055c7186219369902a63c63c3fd76
320 Something in the Windows build was complaining about the lack of a
321 final newline.
322]
323[Update the pretty printer to the current testsuite interface
324Duncan Coutts <duncan@haskell.org>**20101020120506
325 Ignore-this: 480a349e93be8228f81f93632cabe2c7
326]
327[Improve error messages about programs not being found
328Duncan Coutts <duncan@haskell.org>**20101019074436
329 Ignore-this: 9b4daf9a09179482049146669af59f76
330 Make it clear it is a program we are talking about, not a library.
331]
332[Add a note about the remaining issue with runhugs scripts
333Duncan Coutts <duncan@haskell.org>**20101018232248
334 Ignore-this: 3e83a3238d08cdb3ad9e353d43fbf7fa
335]
336[Add package QA checks for the new language and extensions fields
337Duncan Coutts <duncan@haskell.org>**20101018180343
338 Ignore-this: a063fd21e86e4e19b8152258c5a0711f
339]
340[Check at configure time that languages are supported by the compiler
341Duncan Coutts <duncan@haskell.org>**20101018180300
342 Ignore-this: e3988c2eff46129b1f2732cd9647c935
343]
344[Add compiler support for using the new languages and extensions fields
345Duncan Coutts <duncan@haskell.org>**20101018180151
346 Ignore-this: ec1b61767d492dcd2dfa6a07ace3b982
347]
348[Add hugs support for the languages and extensions fields
349Duncan Coutts <duncan@haskell.org>**20101018175647
350 Ignore-this: 9b39c392119aebbbad22a64dcf992f88
351 Incidentally, should fixe ticket #43.
352]
353[Add parsing for the new language and extensions fields
354Duncan Coutts <duncan@haskell.org>**20101018091918
355 Ignore-this: c59c8ef96c83f35e293c8f495b89fda6
356]
357[Add new language and extensions fields (internal data structures)
358Duncan Coutts <duncan@haskell.org>**20101018090620
359 Ignore-this: f49dd9278b0053bc441a37beeb2f6145
360 New fields default-language and other-languages for specifying the
361 base languages for the package, e.g. Haskell98, Haskell2010
362 New fields default-extensions and other-extensions for the language
363 extensions. Separate from the old extensions field.
364 The separation lets us express the difference between declaring to
365 the outside world that a package uses certain languages or extensions
366 and whether certain languages or extensions should be applied to
367 all modules in the package component.
368]
369[Extend the Compiler interface to list the supported languages
370Duncan Coutts <duncan@haskell.org>**20101018082608
371 Ignore-this: 8b1ab7cc14f35dd6604c2a85173ad48
372]
373[Add a Language type, starting with Haskell98 and Haskell2010
374Duncan Coutts <duncan@haskell.org>**20101018082208
375 Ignore-this: de80df5317b5d44900e30c947a86364b
376]
377[Merge and tweaks following pretty printer changes
378Duncan Coutts <duncan@haskell.org>**20101018195344
379 Ignore-this: 513a2b0ce02fed98f5beba0dd893eb16
380]
381[pretty printer fixes (FreeText starting with ., version tags, version range parens, option order).
382jnf@arcor.de**20101011094517
383 Ignore-this: 400ac5be014f1529632bd16ffd878a92
384]
385[reentered accidentally lost exports
386jnf@arcor.de**20100929105852
387 Ignore-this: 2ad4ecfac6feba4c2a59a131c05c8a40
388]
389[new cabal pretty printer.
390jnf@arcor.de**20100929103653
391 Ignore-this: 43f954ec31373e327f2c29fcbf3f0865
392]
393[Fix old doc links
394Duncan Coutts <duncan@haskell.org>**20100727012425
395 Ignore-this: 9e9d0f2045adebe7bb38b5d1a7d2d71a
396]
397[Add note about ticket #689 about deprecated extensions
398Duncan Coutts <duncan@haskell.org>**20100622151328
399 Ignore-this: 56cf0027a4c10f4c07045e2ccdbb819c
400]
401[Head version needs cabal-version: >=1.8 due to test stanza
402Duncan Coutts <duncan@haskell.org>**20101017155521
403 Ignore-this: 6652a529071ccb2eb1cdeda3451aac30
404]
405[Remove unused cpp version definition
406Duncan Coutts <duncan@haskell.org>**20101017155218
407 Ignore-this: 8dc3425bd811d60d28c2eaf365ec1e66
408]
409[Change the way we handle the version number during bootstrapping
410Duncan Coutts <duncan@haskell.org>**20101016191252
411 Ignore-this: e21559acc28b7bd811dc4fe147e645b2
412 Means we only need to have the version in one place now. Yay.
413]
414[Restore compatability with ghc-6.8 and 6.6 but drop support for ghc-6.4
415Duncan Coutts <duncan@haskell.org>**20101016182714
416 Ignore-this: 6aef933e4bfb4a9c47021d17370805ea
417]
418[Add the Cabal unit tests as a test-suite stanza
419Duncan Coutts <duncan@haskell.org>**20101016165656
420 Ignore-this: b9abbfe867754b8bf5b02919c1f25509
421 Still some other tests that need hooking up to this mechanism
422]
423[Update the unit tests of the testsuite feature
424Duncan Coutts <duncan@haskell.org>**20101016165615
425 Ignore-this: bc08d2a8609943f40e901c42916072c2
426]
427[Rename test --human-log to just --log
428Duncan Coutts <duncan@haskell.org>**20101016153441
429 Ignore-this: a2ccb95759a67ae2888a2db2d2ba678d
430 Still have --machine-log as a separate flag
431]
432[Remove the test --append-human-log and --replay features
433Duncan Coutts <duncan@haskell.org>**20101016153235
434 Ignore-this: 23d9c6431f929cd4078c54e03928cef2
435]
436[Add instance Text TestShowDetails parsing and use it for --show-details flag
437Duncan Coutts <duncan@haskell.org>**20101016153015
438 Ignore-this: 1018e874b8acbf51bd7081df1210285
439 Rather than Read/Show
440]
441[Fix a cabal-version check so it accepts the field missing entirely
442Duncan Coutts <duncan@haskell.org>**20101016151929
443 Ignore-this: e30f6fe6e7f54cc5c791a3b6761e93de
444]
445[Add testsuites to the allBuildInfo function, used mainly in checks
446Duncan Coutts <duncan@haskell.org>**20101013172229
447 Ignore-this: be876b609bf1266f3928f25e94f87703
448]
449[Update the message for a package check
450Duncan Coutts <duncan@haskell.org>**20101013172206
451 Ignore-this: 875cc7c6a763321f2e3251195c9dfb1e
452]
453[Add a few TODOs about package checks
454Duncan Coutts <duncan@haskell.org>**20101013172128
455 Ignore-this: 837bda043d740f0b92549f3379d43909
456]
457[Check test-suite sections even when they have been disabled at configure time
458Duncan Coutts <duncan@haskell.org>**20101013171851
459 Ignore-this: 938113ec297b2e5c511a72c5ac8a86d
460]
461[Default to Haskell98 for GHC 7.x
462Duncan Coutts <duncan@haskell.org>**20101013022258
463 Ignore-this: c34b946f55e5ec054cc842914f58b5a5
464 GHC 7 defaults to Haskell2010, we stick with 98 for the moment.
465 We will later introduce a new language field to control this.
466]
467[Change the syntax and behaviour of the cabal-version field
468Duncan Coutts <duncan@haskell.org>**20101013014933
469 Ignore-this: c4cb33360d623ff312b5c3f2d78f730c
470 For historical reasons the cabal-version is specified with a version range,
471 to indicate the range of versions of tools that the package will work with.
472 We now think it makes more sense to specify the version of the Cabal spec
473 that the package follows. Old Cabal versions will not be able to parse simple
474 versions in this field. So we initially make the parser allow plain versions
475 but then we add a check to warn about using it prior to Cabal-1.12 at which
476 point it will be allowed.
477 Added a check about using version ranges that are not of the form '>= x.y'.
478 Also change behaviour to ignore upper bounds in the given version range.
479]
480[Fix duplicate import warnings
481Ian Lynagh <igloo@earth.li>**20101012131227
482 Ignore-this: a9b51a864f95206f4d972f1e7506be55
483]
484[Remove the ghc Makefile stuff for the old docbook xml
485Duncan Coutts <duncan@haskell.org>**20101010210026
486 Ignore-this: 6c714ba98b60e15e44577b64d2de3e1c
487 Not woth keeping it, none of it can sensibly be reused. The GHC
488 devs will need to add something new for the markdown user guide.
489]
490[Update Makefile for new markdown user guide
491Duncan Coutts <duncan@haskell.org>**20101010205938
492 Ignore-this: dcb5bd072c619516e23329f170458d72
493]
494[Add a FIXME about parsing cabal files
495Duncan Coutts <duncan@haskell.org>**20101010203421
496 Ignore-this: 12804d54e81b5ea5878e52628717bc1d
497]
498[Refactor the missing VCS info QA check
499Duncan Coutts <duncan@haskell.org>**20101010192346
500 Ignore-this: fa6a50a9bd43cf9069e7cd16e23a2b4e
501 Starting with Marc Weber's code and just moving
502 it about and making it fit in a bit nicer.
503]
504[Remove redundant import
505Duncan Coutts <duncan@haskell.org>**20101010190724
506 Ignore-this: a978a6a257a31a57d07d57471f04af49
507]
508[Rename LocalBuildInfo extraArgs to extraConfigArgs to avoid name clashes
509Duncan Coutts <duncan@haskell.org>**20101010190036
510 Ignore-this: 817061002399a51cbf31da2ba002737b
511]
512[Add a bunch of TODOs about the test feature
513Duncan Coutts <duncan@haskell.org>**20101010173245
514 Ignore-this: f2acc005fef4996a2c5260356eaf219f
515]
516[Change how the test suite interfaces are represented, parsed and used
517Duncan Coutts <duncan@haskell.org>**20101010162526
518 Ignore-this: 8773e7756fc23bc04c9e5b2b14031512
519 Also, stick to version 0.9 of the "detailed" test interface, since it's
520 not quite finalised yet. Misc other minor code cleanups.
521]
522[Added test suites to Cabal User Guide
523Thomas Tuegel <ttuegel@gmail.com>**20100811141332
524 Ignore-this: 3975acc803fdba809ca1c8abeef21677
525 Ticket #215 (Overhaul support for packages' tests).
526]
527[Removed "$stdio" from acceptable template variables
528Thomas Tuegel <ttuegel@gmail.com>**20100810201828
529 Ignore-this: c50e05e9a73c726567eff0a364f29750
530 Ticket #215 (Overhaul support for packages' tests).  In the usage message, the
531 template variable "$stdio" was incorrectly listed as being available in the
532 "--human-log" and "--machine-log" flags.  The variable has been removed.
533]
534[Added --test-option(s) flags
535Thomas Tuegel <ttuegel@gmail.com>**20100809161341
536 Ignore-this: cea82267bbc0b16d5f21bfc086285905
537 Ticket #215 (Overhaul support for packages' tests).  This patch adds the
538 --test-option(s) flags for passing command-line options to test executables.
539]
540[Respect verbosity flag when outputting test log
541Thomas Tuegel <ttuegel@gmail.com>**20100809151517
542 Ignore-this: 73668e49eeea216c27b5233c7e3fe2cb
543 Ticket #215 (Overhaul support for packages' tests).  This patch corrects the
544 printing of the human-readable test log to the terminal so the setting of the
545 verbosity flag is respected.
546]
547[Added --replay option to cabal test
548Thomas Tuegel <ttuegel@gmail.com>**20100803164932
549 Ignore-this: c97d70e21d3847aa4d889304a7e94451
550 Ticket #215 (Overhaul support for packages' tests).  This patch adds support for
551 using machine logs from previous runs to replay tests with the same options.
552 When using --replay, Cabal will replay all test suites listed in the machine log
553 specified; test suite names specified on the command line are ignored.
554]
555[Renamed "library" test suite type to "detailed"
556Thomas Tuegel <ttuegel@gmail.com>**20100803141125
557 Ignore-this: 457c1a155020303962ae55b2bcd8415c
558 Ticket #215 (Overhaul support for packages' tests).
559]
560[Fixed human test log output for failing tests
561Thomas Tuegel <ttuegel@gmail.com>**20100803030246
562 Ignore-this: f9d3ef127cdb849762af79f31a0c80c9
563 Ticket #215 (Overhaul support for packages' tests).  This patch corrects the bug
564 in the human test log output to terminal where the line wrapping code in Cabal
565 caused terminal control codes output by the test framework to be placed
566 incorrectly.  Line wrapping is no longer performed.
567]
568[Displaying human-readable test log when requested
569Thomas Tuegel <ttuegel@gmail.com>**20100730151818
570 Ignore-this: 98f0adb8e47a52a59ccb3581982157ed
571 Ticket #215 (Overhaul support for packages' tests).  This patch causes Cabal to
572 display the contents of the human-readable log file on the terminal when run
573 with --show-details=always or when run with --show-details=failures and a
574 failure is detected.  The structure of the test logging code has been changed
575 for clarity to debug a problem where test executables that write to their stderr
576 channel disrupt terminal output.
577]
578[Added debugging output to test summary
579Thomas Tuegel <ttuegel@gmail.com>**20100730134008
580 Ignore-this: 826d20639f17ae0650d1c9b8a56b43a7
581 Ticket #215 (Overhaul support for packages' tests).
582]
583[Using correct name of log file in human-readable log
584Thomas Tuegel <ttuegel@gmail.com>**20100730041720
585 Ignore-this: 3c6df44f5d6414ce1fe2b58c50590726
586 Ticket #215 (Overhaul support for packages' tests).  Previously, human-readable
587 logs listed the name of the temporary file where test suite output is
588 initially logged.
589]
590[Renamed option '--test-filter' to '--show-details'
591Thomas Tuegel <ttuegel@gmail.com>**20100730023026
592 Ignore-this: 8b78eed5ccf9cb7ed6a55b86d886e5cc
593 Ticket #215 (Overhaul support for packages' tests).
594]
595[Displaying location of test suite log on terminal
596Thomas Tuegel <ttuegel@gmail.com>**20100729141159
597 Ignore-this: e98a67180c6ff1511b86e442f9acf3c1
598 Ticket #215 (Overhaul support for packages' tests).  It was decided that
599 indicating the location of the human-readable test suite log made Cabal's test
600 runner easier to use.
601]
602[Passing names of test suites to run to test stage
603Thomas Tuegel <ttuegel@gmail.com>**20100726150811
604 Ignore-this: bf556a0a06fe26b132f1eb5caec21805
605 Ticket #215 (Overhaul support for packages' tests).
606]
607[Fixed deprecation warning in Distribution.TestSuite
608Thomas Tuegel <ttuegel@gmail.com>**20100726141448
609 Ignore-this: 64cd6a5a936efd6b0ee0f50564440a9d
610 Ticket #215 (Overhaul support for packages' tests).  Warning resulted from use
611 of Control.OldException.
612]
613[Fixed help message for machine-log path template
614Thomas Tuegel <ttuegel@gmail.com>**20100724164652
615 Ignore-this: 52205830166a307eedce807e908f7a0a
616 Ticket #215 (Overhaul support for packages' tests).  The message previously
617 indicated that $test-suite is acceptable in the machine log path template,
618 which is not true.
619]
620[Catching exceptions when lifting pure tests to IO
621Thomas Tuegel <ttuegel@gmail.com>**20100724134336
622 Ignore-this: 89a2265a94ee0082935d236dd64c12d4
623 Ticket #215 (Overhaul support for packages' tests).
624]
625[Using common function to name path environment variables in PathsModule and Test
626Thomas Tuegel <ttuegel@gmail.com>**20100722145840
627 Ignore-this: 5cea1a3e77acb84a162de3d1c85a3fe6
628 Ticket #215 (Overhaul support for packages' tests).  The names of environment
629 variables used to set package paths at runtime were previously hard-coded into
630 the function that generates the paths module.  A function generating the
631 variable names is now exported from Distribution.Simple.Build.PathsModule and
632 used to set the datadir in Distribution.Simple.Test to prevent breakage if the
633 naming scheme changes.
634]
635[Added documentation for machine-readable test log types
636Thomas Tuegel <ttuegel@gmail.com>**20100722140017
637 Ignore-this: 60f934e11b1c3ee4df9f48677528af47
638 Ticket #215 (Overhaul support for packages' tests).
639]
640[Improved documentation for Distribution.TestSuite
641Thomas Tuegel <ttuegel@gmail.com>**20100722124239
642 Ignore-this: f7b1261270c4815b0691ce33c664908c
643 Ticket #215 (Overhaul support for packages' tests).
644]
645[Fixed documentation errors in Distribution.Simple.Test
646Thomas Tuegel <ttuegel@gmail.com>**20100721221844
647 Ignore-this: b111e727b4a556b17c2a1eb4dfd6971b
648 Ticket #215 (Overhaul support for packages' tests).
649]
650[Renamed Distribution.TestSuite.optionLookup to lookupOption
651Thomas Tuegel <ttuegel@gmail.com>**20100721170724
652 Ignore-this: 3a5e79fd0a14d974e664a74af5cb83d1
653 Ticket #215 (Overhaul support for packages' tests.)
654]
655[Added console-style test summary information to human-readable logs
656Thomas Tuegel <ttuegel@gmail.com>**20100721163516
657 Ignore-this: 494c2220285ef4bda036ecdfd7242adf
658 Ticket #215 (Overhaul support for packages' tests).
659]
660[Added flag allowing human-readable test logs to be appended instead of overwritten
661Thomas Tuegel <ttuegel@gmail.com>**20100721160421
662 Ignore-this: f157a4830f82a4a978c1cfb1931a0258
663 Ticket #215 (Overhaul support for packages' tests).
664]
665[Added clarifying comments to Distribution.Simple.Test
666Thomas Tuegel <ttuegel@gmail.com>**20100721160417
667 Ignore-this: 100000890351a75557a6dfa0f71c419f
668 Ticket #215 (Overhaul support for packages' tests).
669]
670[Using a separate PathTemplateEnv for machine test logs
671Thomas Tuegel <ttuegel@gmail.com>**20100720204724
672 Ignore-this: 4920c6e88b8d3d3d788ba42d6b5268af
673 Ticket #215 (Overhaul support for packages' tests).  Previously, the use of a
674 dummy test suite name would lead to unintuitive expansions of the PathTemplate
675 governing the location of the machine-readable package test log.
676]
677[Exporting machine log types from Distribution.Simple.Test
678Thomas Tuegel <ttuegel@gmail.com>**20100720204558
679 Ignore-this: 6920621dbabf471cef7d688904b9b1b8
680 Ticket #215 (Overhaul support for packages' tests).  These types were exported
681 to enable parsing of test logs by external utilities.
682]
683[Added 'check' and 'optionLookup' to Distribution.TestSuite
684Thomas Tuegel <ttuegel@gmail.com>**20100720134707
685 Ignore-this: 21ef44dc0087ff8333b1722309f8fbdd
686 Ticket #215 (Overhaul support for packages' tests).  These functions were added
687 for the benefit of test runner authors.
688]
689[Saving Options from test runs for reproducability
690Thomas Tuegel <ttuegel@gmail.com>**20100715180003
691 Ignore-this: 858c387d83e93e193f7c66df3901f6e3
692 Ticket #215 (Overhaul support for packages' tests).  Saving the Options used
693 required changes to the TestSuite interface, with the Option values now being
694 specified as Strings and not Dynamics.  This was necessary because the lack of
695 a Read instance for Dynamic.
696]
697[Improvements to test suite logging
698Thomas Tuegel <ttuegel@gmail.com>**20100715020549
699 Ignore-this: b47f4358302b283e93ccaff81db123f2
700 Ticket #215 (Overhaul support for packages' tests).  This patch includes proper
701 support for both machine- and human-readable logs.
702]
703[Removed duplicate code for test suite interface version checks
704Thomas Tuegel <ttuegel@gmail.com>**20100713144835
705 Ignore-this: e06c264351013480a66c013ca398db4b
706 Ticket #215 (Overhaul support for packages' tests).  Duplicate code for checking
707 the test suite interface version was replaced with a single function
708 'testVersion1 :: Version -> Bool' exported from Distribution.PackageDescription.
709]
710[Added QA checks for test suite name conflicts
711Thomas Tuegel <ttuegel@gmail.com>**20100712154401
712 Ignore-this: df13e2f16cf4e879f5d5f6538c6e7db8
713 Ticket #215 (Overhaul suppport for packages' tests).
714]
715[New test suite log format
716Thomas Tuegel <ttuegel@gmail.com>**20100708132650
717 Ignore-this: 96a300e6acedd0de63757713fbb1d832
718 Ticket #215 (Overhaul support for package's tests).  This patch adds a new test
719 log file format based on the TestSuiteLog data structure.  The interface between
720 Cabal and the library test suite runner has consequently changed.
721]
722[Inheriting existing environment for test suite executables
723Thomas Tuegel <ttuegel@gmail.com>**20100707222244
724 Ignore-this: 6f08245c83817a85c7da5a05f810abd6
725 Ticket #215 (Overhaul support for packages' tests).  Previously, the test
726 runner replaced the environment for test suite executables with one containing
727 only the datadir path for package data files.  For test suites invoking other
728 programs, it is necessary to preserve the system paths, so the datadir path
729 variable is appended to the inherited environment.
730]
731[Improvements to library test suite runner, including documentation
732Thomas Tuegel <ttuegel@gmail.com>**20100624181304
733 Ignore-this: 45baa7905de5423e91707f52e590bbad
734 Ticket #215 (Overhaul support for packages' tests).
735]
736[Renamed 'result' and 'getResult' to 'run' and 'runM'
737Thomas Tuegel <ttuegel@gmail.com>**20100623184640
738 Ignore-this: 7bb6dd598eaa135fcbf73e82ab0d2ce2
739 Ticket #215 (Overhaul support for packages' tests).
740]
741[Setting datadir environment variables when running tests
742Thomas Tuegel <ttuegel@gmail.com>**20100623183201
743 Ignore-this: 7a9e26c684417871609847f6e4d4883e
744 Ticket #215 (Overhaul support for packages' tests).
745]
746[Added convenience functions and default instances making export of 'Test' constructors unnecessary
747Thomas Tuegel <ttuegel@gmail.com>**20100623151934
748 Ignore-this: 1979265e345e268787b5b6fe49bdfd64
749 Ticket #215 (Overhaul support for packages' tests).
750]
751[Added support for running the default stub executables Cabal creates for library test suites
752Thomas Tuegel <ttuegel@gmail.com>**20100623151903
753 Ignore-this: 2be1bbfb07a7fc0e3a0d2c9e5bdf2252
754 Ticket #215 (Overhaul support for packages' tests).
755]
756[Removed dependency on extensible-exceptions from detailed test suite interface
757Thomas Tuegel <ttuegel@gmail.com>**20100623150227
758 Ignore-this: 50ad3ee8c2dc5f62b48aa84d0318c3e6
759 Ticket #215 (Overhaul support for packages' tests).
760]
761[Added support for building detailed library test suites
762Thomas Tuegel <ttuegel@gmail.com>**20100623150222
763 Ignore-this: 1f2a6034af9adf493088265cc8481df5
764 Ticket #215 (Overhaul support for packages' tests).  This patch preprocesses
765 and builds library test suites.  The fake packages are created for each test
766 suite, where the fake package and test suite share the same name; the packages
767 and libraries are registered in the inplace package database so that test
768 agents can build stub executables against them.
769]
770[Improved security of test log file creation
771Thomas Tuegel <ttuegel@gmail.com>**20100621114726
772 Ignore-this: 6fed3aa4ebcb587b48bb2a256fcbc61b
773 Ticket #215 (Overhaul support for packages' tests).  The algorithm previously
774 used to name the log files for test output suffers from a known vulnerability
775 due to the predictability of chosen names.
776]
777[Added detailed test interface
778Thomas Tuegel <ttuegel@gmail.com>**20100617210631
779 Ignore-this: 161624662d6ec7946a33415ddbff4445
780 Ticket #215 (Overhaul support for packages' tests).  This patch provides the
781 detailed test interface for exposing individual tests to Cabal and other test
782 agents.  It also provides the simple function Cabal will provide as the default
783 test runner.
784]
785[Fixed test suite breakage due to TestSuite API changes
786Thomas Tuegel <ttuegel@gmail.com>**20100629212935
787 Ignore-this: 8de228836efb206e1adb833c841ae757
788 Ticket #215 (Overhaul support for packages' tests).  The update to the
789 TestSuite parser which stopped disallowed configurations during parsing also
790 broke the existing test suite with API changes.
791]
792[Added --test-filter flag
793Thomas Tuegel <ttuegel@gmail.com>**20100624175917
794 Ignore-this: e8fcaddf34a42326d0f3a1081aafb724
795 Ticket #215 (Overhaul support for packages' tests).
796]
797[Qualified import of Distribution.Simple.Setup in Distribution.Simple.Haddock
798Thomas Tuegel <ttuegel@gmail.com>**20100623193755
799 Ignore-this: ec5750f56b22f67e5862036fcdd8ecee
800]
801[Using path templates to name test log files
802Thomas Tuegel <ttuegel@gmail.com>**20100622162317
803 Ignore-this: af6564bf6154e29e363ee343c9fc5806
804 Ticket #215 (Overhaul support for packages' tests).
805]
806[More docs about the meaning of the cabal-version field
807Duncan Coutts <duncan@haskell.org>**20101010154251
808 Ignore-this: 381ede9227f7a9db78f1007364660648
809]
810[Document how Cabal-Version affects behaviour of build-depends
811Ben Millwood <haskell@benmachine.co.uk>**20100926025550
812 Ignore-this: ba6367db93c15906331457a0468db436
813]
814[initial support for building executables with UHC
815Atze Dijkstra <atze@cs.uu.nl>**20100923214130
816 Ignore-this: bbbf1adcec2fcfe87ce1db18c804f21a
817]
818[Added flags related to UHC, uhcbase package
819Atze Dijkstra <atze@cs.uu.nl>**20100706115341
820 Ignore-this: f7dd2b14e3146f8844635ddcb70ac3b9
821]
822[Minor changes to the auto-reconfiguration feature.
823Duncan Coutts <duncan@haskell.org>**20101010144111
824 Ignore-this: 944f595482ea42eb1907fb1150d6d4c0
825 Change the messages slightly. Make configure return the
826 new lbi, rather than having to re-read the lbi from file
827 (avoiding potential infinite loop if the IO failed).
828]
829[Auto-reconfiguration when .cabal is newer than setup-config
830Dmitry Astapov <dastapov@gmail.com>**20100825131106
831 Ignore-this: 22ab2b6de0251f6cf1da7c2538544d4
832 
833 This patch adds "ConfigFlags" to the "LocalBuildInfo" and reuses them to
834 perform "configureAction" when .cabal file is changed. This has
835 the same effect as re-running "configure" with the most recent used
836 set of options, which should be the sensible thing to do.
837 
838 Closes #294, #477, #309 and #518.
839]
840[Fix processing of ghc-shared-options
841Duncan Coutts <duncan@haskell.org>**20101009204809
842 Ignore-this: 571b3d70fbc705282b9fdfdafdc2f009
843 Original patch was:
844   Sun Oct  7 13:41:53 BST 2007  Thorkil Naur <naur@post11.tele.dk>
845     * Fix processing of shared options
846 Re-recorded due to code churn
847]
848[Correct spelling of 'transative'
849Duncan Coutts <duncan@haskell.org>**20101009202836
850 Ignore-this: fe7ec5ae621135024403ae0aa42094c2
851 Original patch by:
852   Thu Aug 21 21:19:51 MDT 2008  dbueno@gmail.com
853     * Correct spelling of 'transative'.
854 Re-recorded due to conflict.
855]
856[print a warning if repository location isn't specified and the cabal project looks like being tracked by a version control system
857marco-oweber@gmx.de**20091129192013
858 Ignore-this: 5ce5073f1793193e437353490eff0276
859]
860[Bump Cabal HEAD version to 1.11.0
861Duncan Coutts <duncan@haskell.org>**20101010154518
862 Ignore-this: 407e2b1c0de8c10f399841b3fbea1dd3
863]
864[TAG 1.10 branch forked
865Duncan Coutts <duncan@haskell.org>**20101010155050
866 Ignore-this: 7b0241166f919e2a374a2a69669b2e6b
867]
868Patch bundle hash:
869139797fe06091db0019895ce279354b929162560