Ticket #847: cabal-1.10-allow-multiple-test-options.dpatch

File cabal-1.10-allow-multiple-test-options.dpatch, 4.2 KB (added by ttuegel, 2 years ago)

Patch for Cabal-1.10 to allow multiple test options

Line 
11 patch for repository /home/ttuegel/repos/cabal-1.10:
2
3Mon May 23 12:54:45 CDT 2011  Thomas Tuegel <ttuegel@gmail.com>
4  * Allow multiple test options (backported to Cabal-1.10)
5
6New patches:
7
8[Allow multiple test options (backported to Cabal-1.10)
9Thomas Tuegel <ttuegel@gmail.com>**20110523175445
10 Ignore-this: 2dd2899dfcb36d0cfedaf8a327f3ace1
11] {
12hunk ./Distribution/Simple/Setup.hs 1240
13     --TODO: eliminate the test list and pass it directly as positional args to the testHook
14     testList :: Flag [String],
15     -- TODO: think about if/how options are passed to test exes
16-    testOptions :: Flag [PathTemplate]
17+    testOptions :: [PathTemplate]
18   }
19 
20 defaultTestFlags :: TestFlags
21hunk ./Distribution/Simple/Setup.hs 1251
22     testMachineLog = toFlag $ toPathTemplate $ "$pkgid.log",
23     testShowDetails = toFlag Failures,
24     testList = Flag [],
25-    testOptions = Flag []
26+    testOptions = []
27   }
28 
29 testCommand :: CommandUI TestFlags
30hunk ./Distribution/Simple/Setup.hs 1295
31              ++ "(name templates can use $pkgid, $compiler, "
32              ++ "$os, $arch, $test-suite)")
33             testOptions (\v flags -> flags { testOptions = v })
34-            (reqArg' "TEMPLATES" (toFlag . map toPathTemplate . splitArgs)
35-                (map fromPathTemplate . fromFlagOrDefault []))
36+            (reqArg' "TEMPLATES" (map toPathTemplate . splitArgs) (const []))
37       , option [] ["test-option"]
38             ("give extra option to test executables "
39              ++ "(no need to quote options containing spaces, "
40hunk ./Distribution/Simple/Setup.hs 1302
41              ++ "name template can use $pkgid, $compiler, "
42              ++ "$os, $arch, $test-suite)")
43             testOptions (\v flags -> flags { testOptions = v })
44-            (reqArg' "TEMPLATE" (\x -> toFlag [toPathTemplate x])
45-                (map fromPathTemplate . fromFlagOrDefault []))
46+            (reqArg' "TEMPLATE" (\x -> [toPathTemplate x])
47+                (map fromPathTemplate))
48       ]
49 
50 emptyTestFlags :: TestFlags
51hunk ./Distribution/Simple/Test.hs 169
52     let distPref = fromFlag $ testDistPref flags
53         verbosity = fromFlag $ testVerbosity flags
54         testLogDir = distPref </> "test"
55-        optionTemplates = fromFlag $ testOptions flags
56-        options = map (testOption pkg_descr lbi suite) optionTemplates
57+        options = map (testOption pkg_descr lbi suite) $ testOptions flags
58 
59     pwd <- getCurrentDirectory
60     existingEnv <- getEnvironment
61}
62
63Context:
64
65[Refactor to avoid problems when $HOME is not set
66Ian Lynagh <igloo@earth.li>**20110417154135
67 Ignore-this: 75c06dea58512d01c9d28e7de4881222
68 We now avoid calling getWindowsProgramFilesDir and
69 getAppUserDataDirectory when we don't need to know their results.
70 This means that a GHC build goes through when $HOME is unset
71 (GHC trac #5047).
72]
73[Remove log files before running tests by default.
74Thomas Tuegel <ttuegel@gmail.com>**20110303041840
75 Ignore-this: 9007c1adc908897843ea29591decea3c
76]
77[Including test suites in product of 'setup sdist'.
78Thomas Tuegel <ttuegel@gmail.com>**20110119153404
79 Ignore-this: a7fcc71333e13c763547561aced2375c
80 See ticket #792.
81]
82[Fix to build with ghc-6.6 and 6.8
83Duncan Coutts <duncan@community.haskell.org>**20110311140038
84 Ignore-this: 6a20e732968b7655402a922880562b6c
85]
86[Fix for test suite stanza with conditionals.
87Thomas Tuegel <ttuegel@gmail.com>**20110418134745
88 Ignore-this: 9cbfa7d384d7e0d640e905946c1c36cb
89 Ticket #811. This fixes a problem where Cabal would fail to detect the "type"
90 field of a test suite when the test suite contained a conditional.
91 Conditionals can now be used, with the restriction that the "type" field and
92 the appropriate "main-is" or "test-module" field must be specified together
93 in any conditional branch where they occur.
94]
95[Update release script for recent haskell.org server changes
96Duncan Coutts <duncan@community.haskell.org>**20110227171445
97 Ignore-this: 3243990fca0f6e619dbaca47615bd009
98]
99[Fix release date in changelog
100Duncan Coutts <duncan@community.haskell.org>**20110227150619
101 Ignore-this: 2cc2858ea00e5005364f369178a944e3
102]
103[TAG 1.10.1.0
104Duncan Coutts <duncan@community.haskell.org>**20110227171356
105 Ignore-this: f3491cd8e122c859a166d5c85296bdee
106]
107Patch bundle hash:
1083b6e3369a5d8d97367e7684658f78dd49d126c02