~louis/ubuntu/trusty/clamav/lp799623_fix_logrotate

« back to all changes in this revision

Viewing changes to libclamav/c++/llvm/utils/lit/lit/ExampleTests/Clang/lit.cfg

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2010-03-12 11:30:04 UTC
  • mfrom: (0.41.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20100312113004-b0fop4bkycszdd0z
Tags: 0.96~rc1+dfsg-0ubuntu1
* New upstream RC - FFE (LP: #537636):
  - Add OfficialDatabaseOnly option to clamav-base.postinst.in
  - Add LocalSocketGroup option to clamav-base.postinst.in
  - Add LocalSocketMode option to clamav-base.postinst.in
  - Add CrossFilesystems option to clamav-base.postinst.in
  - Add ClamukoScannerCount option to clamav-base.postinst.in
  - Add BytecodeSecurity opiton to clamav-base.postinst.in
  - Add DetectionStatsHostID option to clamav-freshclam.postinst.in
  - Add Bytecode option to clamav-freshclam.postinst.in
  - Add MilterSocketGroup option to clamav-milter.postinst.in
  - Add MilterSocketMode option to clamav-milter.postinst.in
  - Add ReportHostname option to clamav-milter.postinst.in
  - Bump libclamav SO version to 6.1.0 in libclamav6.install
  - Drop clamdmon from clamav.examples (no longer shipped by upstream)
  - Drop libclamav.a from libclamav-dev.install (not built by upstream)
  - Update SO version for lintian override for libclamav6
  - Add new Bytecode Testing Tool, usr/bin/clambc, to clamav.install
  - Add build-depends on python and python-setuptools for new test suite
  - Update debian/copyright for the embedded copy of llvm (using the system
    llvm is not currently feasible)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- Python -*-
 
2
 
 
3
# Configuration file for the 'lit' test runner.
 
4
 
 
5
# name: The name of this test suite.
 
6
config.name = 'Clang'
 
7
 
 
8
# testFormat: The test format to use to interpret tests.
 
9
#
 
10
# For now we require '&&' between commands, until they get globally killed and
 
11
# the test runner updated.
 
12
config.test_format = lit.formats.ShTest(execute_external = True)
 
13
 
 
14
# suffixes: A list of file extensions to treat as test files.
 
15
config.suffixes = ['.c', '.cpp', '.m', '.mm']
 
16
 
 
17
# target_triple: Used by ShTest and TclTest formats for XFAIL checks.
 
18
config.target_triple = 'foo'
 
19
 
 
20
###
 
21
 
 
22
# Discover the 'clang' and 'clangcc' to use.
 
23
 
 
24
import os
 
25
 
 
26
def inferClang(PATH):
 
27
    # Determine which clang to use.
 
28
    clang = os.getenv('CLANG')
 
29
 
 
30
    # If the user set clang in the environment, definitely use that and don't
 
31
    # try to validate.
 
32
    if clang:
 
33
        return clang
 
34
 
 
35
    # Otherwise look in the path.
 
36
    clang = lit.util.which('clang', PATH)
 
37
 
 
38
    if not clang:
 
39
        lit.fatal("couldn't find 'clang' program, try setting "
 
40
                  "CLANG in your environment")
 
41
 
 
42
    return clang
 
43
 
 
44
def inferClangCC(clang, PATH):
 
45
    clangcc = os.getenv('CLANGCC')
 
46
 
 
47
    # If the user set clang in the environment, definitely use that and don't
 
48
    # try to validate.
 
49
    if clangcc:
 
50
        return clangcc
 
51
 
 
52
    # Otherwise try adding -cc since we expect to be looking in a build
 
53
    # directory.
 
54
    if clang.endswith('.exe'):
 
55
        clangccName = clang[:-4] + '-cc.exe'
 
56
    else:
 
57
        clangccName = clang + '-cc'
 
58
    clangcc = lit.util.which(clangccName, PATH)
 
59
    if not clangcc:
 
60
        # Otherwise ask clang.
 
61
        res = lit.util.capture([clang, '-print-prog-name=clang-cc'])
 
62
        res = res.strip()
 
63
        if res and os.path.exists(res):
 
64
            clangcc = res
 
65
 
 
66
    if not clangcc:
 
67
        lit.fatal("couldn't find 'clang-cc' program, try setting "
 
68
                  "CLANGCC in your environment")
 
69
 
 
70
    return clangcc
 
71
 
 
72
clang = inferClang(config.environment['PATH'])
 
73
if not lit.quiet:
 
74
    lit.note('using clang: %r' % clang)
 
75
config.substitutions.append( (' clang ', ' ' + clang + ' ') )
 
76
 
 
77
clang_cc = inferClangCC(clang, config.environment['PATH'])
 
78
if not lit.quiet:
 
79
    lit.note('using clang-cc: %r' % clang_cc)
 
80
config.substitutions.append( (' clang-cc ', ' ' + clang_cc + ' ') )