예제 #1
0
from SUITE.context import thistest
from test_support import check

# -Pgen --projects=intops.gpr, not recursive,
# expect intops related reports only

check(root_project='gen.gpr',
      projects=['intops'],
      recurse=False,
      xreports=['intops'])

# -Pgen --projects=boolops.gpr, not recursive,
# expect boolops related reports only

check(root_project='gen.gpr',
      projects=['boolops'],
      recurse=False,
      xreports=['boolops'])

# -Pgen --projects=boolops.gpr --projects=intops.gpr, not recusrive
# expect boolops & intops related reports

check(root_project='gen.gpr',
      projects=['boolops', 'intops'],
      recurse=False,
      xreports=['boolops', 'intops'])

# -Pgen --projects=boolops.gpr --projects=counters.gpr, not recusrive
# expect boolops & counters related reports

check(root_project='gen.gpr',
예제 #2
0
from SUITE.context import thistest
from SUITE.cutils import Wdir
from SUITE.tutils import gprbuild, gprfor

from test_support import check

wd = Wdir('wd_')
gprbuild(
    gprfor(
        srcdirs=[
            '../src',  # For the test sources
            '../../../../src'
        ],  # For the support sources
        mains=['test_ab.adb']))

check(test_ali='obj/test_ab.ali', mon_ali='obj/monitor.ali')

thistest.result()
예제 #3
0
from SUITE.cutils import Wdir, list_to_tmp
from SUITE.context import thistest
from test_support import check

# Create a directory to hold temporary files, so that we do not accumulate
# uncleaned temporary files across testsuite runs.
temp_file_dir = Wdir('tmp_files', clean=True)
temp_file_dir.to_homedir()

# Note that intops involves sub-units while boolops involves child-units,

# Lone unit, with sub units, in closure

check(
    root_project='gen.gpr',
    units=['intops'],
    recurse=True,
    xreports=['intops.ads', 'intops.adb', 'intops-add.adb', 'intops-sub.adb'])

# Lone unit, with child units, in closure

check(root_project='boolops',
      units=['boolops'],
      recurse=True,
      xreports=['boolops.ads', 'boolops.adb'])

# Likewise, using a response file to convey the units.

check(root_project='boolops',
      units=['@%s' % list_to_tmp(['boolops'], dir='tmp_files')],
      recurse=True,
예제 #4
0
"""
Check that --units override Coverage attributes in all projects.
"""

from SUITE.context import thistest
from test_support import check

# boolops.gpr features a Units attribute in Coverage project,
# listing all the units of the project

# Without --units, on closure -> everything

check(root_project='gen.gpr',
      recurse=True,
      xreports=['intops', 'boolops', 'counters'])

# --units=boolops.andthen in closure, andthen and parent
# spec reports only, despite the attribute in boolops.gpr

check(root_project='gen.gpr',
      recurse=True,
      units=['boolops.andthen'],
      xreports=['boolops.ads', 'boolops-andthen.adb'])

# --units=counters in closure, counters reports only
# despite the attribute in boolops.gpr

check(root_project='gen.gpr',
      recurse=True,
      units=['counters'],
      xreports=['counters.ads', 'counters.adb'])