Ejemplo n.º 1
0
def isabelle_build(env, case, paths, dep_paths, playground, *cmdargs, **kwargs):

    more_settings = kwargs.get('more_settings', '')
    keep_results = kwargs.get('keep_results', True)
    timeout = kwargs.get('timeout', DEFAULT_TIMEOUT)

    isabelle_home = paths[0]

    home_user_dir = path.join(isabelle_home, 'home_user')
    os.makedirs(home_user_dir)

    # copy over build results from dependencies
    heap_dir = path.join(isabelle_home, 'heaps')
    classes_dir = path.join(heap_dir, 'classes')
    os.makedirs(classes_dir)

    for dep_path in dep_paths:
        subprocess.check_call(['cp', '-a'] + glob(dep_path + '/*') + [heap_dir])

    subprocess.check_call(['ln', '-s', classes_dir, path.join(isabelle_home, 'lib', 'classes')])
    jars = glob(path.join(classes_dir, 'ext', '*.jar'))
    if jars:
        subprocess.check_call(['touch'] + jars)

    # misc preparations
    if 'lxbroy10' in misc.hostnames():  # special settings for lxbroy10
        more_settings += '''
ISABELLE_GHC="/usr/bin/ghc"
'''

    prepare_isabelle_repository(isabelle_home, None, more_settings=more_settings)
    os.chdir(isabelle_home)

    args = (['-o', 'timeout=%s' % timeout] if timeout is not None else []) + list(cmdargs)

    # invoke build tool
    (return_code, log1) = env.run_process('%s/bin/isabelle' % isabelle_home, 'jedit', '-bf',
            USER_HOME=home_user_dir)
    (return_code, log2) = env.run_process('%s/bin/isabelle' % isabelle_home, 'build', '-s', '-v', *args,
            USER_HOME=home_user_dir)
    log = log1 + log2

    # collect report
    return (return_code == 0, extract_isabelle_run_summary(log),
      extract_report_data(isabelle_home, log), {'log': log}, heap_dir if keep_results else None)
Ejemplo n.º 2
0
import os
from os import path
from glob import glob
import re

from configurations import Isabelle as isabelle
from mira import misc

afp_settings = '''
ML_OPTIONS="-H 1000 --gcthreads 4"

ISABELLE_BUILD_OPTIONS="threads=4 parallel_proofs=2"
'''

afp_jobs = "6" if 'lxbroy10' in misc.hostnames() else "2"


@configuration(repos=[Isabelle, AFP], deps=[])
def AFP(*args):
    """Main AFP test, excluding very large sessions"""

    afp_thys = path.join(args[2][1], 'thys')
    return isabelle.isabelle_build(
        *(args + ("-j", afp_jobs, "-d", afp_thys, "-g", "AFP")),
        more_settings=afp_settings,
        keep_results=False)


# AFP-based Judgement Day configurations
Ejemplo n.º 3
0
    # copy over build results from dependencies
    heap_dir = path.join(isabelle_home, 'heaps')
    classes_dir = path.join(heap_dir, 'classes')
    os.makedirs(classes_dir)

    for dep_path in dep_paths:
        subprocess.check_call(['cp', '-a'] + glob(dep_path + '/*') + [heap_dir])

    subprocess.check_call(['ln', '-s', classes_dir, path.join(isabelle_home, 'lib', 'classes')])
    jars = glob(path.join(classes_dir, 'ext', '*.jar'))
    if jars:
        subprocess.check_call(['touch'] + jars)

    # misc preparations
    if 'lxbroy10' in misc.hostnames():  # special settings for lxbroy10
        more_settings += '''
ISABELLE_GHC="/usr/bin/ghc"
'''

    prepare_isabelle_repository(isabelle_home, None, more_settings=more_settings)
    os.chdir(isabelle_home)

    args = (['-o', 'timeout=%s' % timeout] if timeout is not None else []) + list(cmdargs)

    # invoke build tool
    (return_code, log1) = env.run_process('%s/bin/isabelle' % isabelle_home, 'jedit', '-bf',
            USER_HOME=home_user_dir)
    (return_code, log2) = env.run_process('%s/bin/isabelle' % isabelle_home, 'build', '-s', '-v', *args,
            USER_HOME=home_user_dir)
    log = log1 + log2
Ejemplo n.º 4
0
import os
from os import path
from glob import glob
import re

from configurations import Isabelle as isabelle
from mira import misc


afp_settings = """
ML_OPTIONS="-H 1000 --gcthreads 4"

ISABELLE_BUILD_OPTIONS="threads=4 parallel_proofs=2"
"""

afp_jobs = "6" if "lxbroy10" in misc.hostnames() else "2"


@configuration(repos=[Isabelle, AFP], deps=[])
def AFP(*args):
    """Main AFP test, excluding very large sessions"""

    afp_thys = path.join(args[2][1], "thys")
    return isabelle.isabelle_build(
        *(args + ("-j", afp_jobs, "-d", afp_thys, "-g", "AFP")), more_settings=afp_settings, keep_results=False
    )


# AFP-based Judgement Day configurations