Changes between Version 12 and Version 13 of Building/RunningTests/Adding


Ignore:
Timestamp:
Feb 13, 2013 3:40:47 PM (3 years ago)
Author:
igloo
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Building/RunningTests/Adding

    v12 v13  
    178178
    179179 * '''normal'''                don't change any options from the defaults
     180
    180181 * '''skip'''                  skip this test
    181  * '''skip_if_no_ghci'''       skip unless GHCi is available
    182 
    183  * '''skip_if_fast'''          skip if "fast" is enabled
    184182
    185183 * '''omit_ways(ways)'''       skip this test for certain ways
    186 
    187184 * '''only_ways(ways)'''       do this test certain ways only
    188 
    189185 * '''extra_ways(ways)'''      add some ways which would normally be disabled
    190186
    191187 * '''omit_compiler_types(compilers)'''                           skip this test for certain compilers
    192 
    193188 * '''only_compiler_types(compilers)'''       do this test for certain compilers only
    194189
    195190 * '''expect_broken(bug)''' this test is a expected not to work due to the indicated trac bug number
    196 
    197191 * '''expect_broken_for(bug, ways)''' as expect_broken, but only for the indicated ways
    198192
    199  * '''if_compiler_type(compiler_type, f)''' Do `f`, but only for the given compiler type
    200 
    201  * '''if_platform(plat, f)'''  Do `f`, but only if we are on the specific platform given
    202 
    203  * '''if_tag(tag, f)'''        do `f` if the compiler has a given tag
    204 
    205  * '''unless_tag(tag, f)'''    do `f` unless the compiler has a given tag
    206 
    207193 * '''set_stdin(file)'''       use a different file for stdin
    208 
    209194 * '''no_stdin'''              use no stdin at all (otherwise use `/dev/null`)
    210195
     
    228213
    229214 * '''c_src'''                 look for a `.c` file
    230 
    231215 * '''objc_src'''              look for a `.m` file
    232 
    233216 * '''objcpp_src'''            look for a `.mm` file
    234217
    235  * '''cmd_prefix(string)'''    prefix this string to the command when run
     218 * '''pre_cmd(string)'''       run this command before running the test
     219 * '''compiler_cmd_prefix(string)''' prefix this string to the compilation command when run
     220 * '''cmd_prefix(string)'''    prefix this string to the execution command when run
    236221
    237222 * '''normalise_slashes'''     convert backslashes to forward slashes before comparing the output
    238223
    239 The following should normally not be used; instead, use the `expect_broken*`
     224 * '''when(predicate, f)'''    Do `f`, but only if `predicate` is `True`
     225 * '''unless(predicate, f)'''  Do `f`, but only if `predicate` is `False`
     226
     227There are a number of predicates which can be used:
     228
     229 * '''doing_ghci'''            GHCi is available
     230
     231 * '''fast'''                  the testsuite is running in "fast" mode
     232
     233 * '''compiler_type(ct)'''     a compiler of type `ct` (which could be `'ghc'`, `'hug'`, etc) is being tested
     234
     235 * '''platform(plat)'''        the testsuite is running on platform `plat` (which could be `'x86_64-unknown-mingw32'` etc)
     236
     237 * '''tag(t)'''                the compiler has tag `t`
     238
     239The following helpers should normally not be used; instead, use the `expect_broken*`
    240240functions above so that the problem doesn't get forgotten about, and when we
    241241come back to look at the test later we know whether current behaviour is why
     
    243243
    244244 * '''expect_fail'''           this test is an expected failure, i.e. there is a known bug in the compiler, but we don't want to fix it.
    245 
    246245 * '''expect_fail_for(ways)''' expect failure for certain ways
    247246