Esempio n. 1
0
    # iot.js executable
    iotjs = join_path([opt_build_root(), 'iotjs', 'iotjs'])
    return run_cmd(CHECKTEST, [iotjs]) == 0


# parse arguments.
parse_args()

print('=======================================')
for opt_key in options:
    print ' -', opt_key, ':', options[opt_key]
print

# tidy check.
if opt_tidy():
    if not check_tidy(ROOT):
        print_error("Failed check_tidy")
        sys.exit(1)

# init submodules.
if opt_init_submodule():
    init_submodule()

# make build directory.
mkdir(opt_build_root())

# build libtuv or libuv
if opt_tuv():
    if not build_libtuv():
        print_error("Failed build_libtuv")
        sys.exit(1)
Esempio n. 2
0
print_build_option(option)

set_global_vars(option)

# clean build directory.
if option.clean:
    print_progress('Clear build directory')
    shutil.rmtree(build_root, True)
    shutil.rmtree(host_build_root, True)

create_build_directories(option)

# Perform tidy check.
print_progress('Tidy checking')
if not option.no_check_tidy:
    if not check_tidy(PROJECT_HOME):
        fail("Failed check_tidy")

# Perform init-submodule.
print_progress('Initialize submodules')
if not option.no_init_submodule:
    init_submodule()

# make build directory.
print_progress('Create build directory')
mkdir(build_root)

# build tuv.
print_progress('Build libtuv')
if not build_tuv(option):
    fail('Failed to build libtuv')
Esempio n. 3
0
print_build_option(option)

set_global_vars(option)

# clean build directory.
if option.clean:
    print_progress('Clear build directory')
    shutil.rmtree(build_root, True)
    shutil.rmtree(host_build_root, True)

create_build_directories(option)

# Perform tidy check.
print_progress('Tidy checking')
if not option.no_check_tidy:
    if not check_tidy(PROJECT_HOME):
        fail("Failed check_tidy")

# Perform init-submodule.
print_progress('Initialize submodules')
if not option.no_init_submodule:
    init_submodule()

# make build directory.
print_progress('Create build directory')
mkdir(build_root)

# build tuv.
print_progress('Build libtuv')
if not build_tuv(option):
    fail('Failed to build libtuv')
Esempio n. 4
0
    elif test == "rpi2":
        for buildtype in option.buildtype:
            build(buildtype, ['--target-arch=arm',
                              '--target-board=rpi2'])

    elif test == "nuttx":
        for buildtype in option.buildtype:
            nuttx_root=fs.join(path.PROJECT_ROOT, 'deps', 'nuttx')
            setup_nuttx_root(nuttx_root)
            build_nuttx(nuttx_root, buildtype)
            build(buildtype, ['--target-arch=arm',
                              '--target-os=nuttx',
                              '--nuttx-home=' + fs.join(nuttx_root, 'nuttx'),
                              '--target-board=stm32f4dis',
                              '--jerry-heaplimit=78'])
            if not build_nuttx(nuttx_root, buildtype):
                ex.fail('nuttx ' + buildtype + ' build failed')

    elif test == "misc":

        args = []
        if os.getenv('TRAVIS') != None:
            args = ['--travis']
        ex.check_run_cmd('tools/check_signed_off.sh', args)

        if not check_tidy(path.PROJECT_ROOT):
            ex.fail("Failed tidy check")

        build("debug", ['--no-snapshot', '--jerry-lto'])
        build("debug", ['--iotjs-minimal-profile'])
Esempio n. 5
0
            if buildtype == "release":
                rflag = 'R=1'
            else:
                rflag = 'R=0'
            exec_docker(
                DOCKER_NUTTX_PATH,
                ['make', 'all', 'IOTJS_ROOT_DIR=' + DOCKER_IOTJS_PATH, rflag])

    elif test == 'tizen':
        exec_docker(DOCKER_IOTJS_PATH, ['config/tizen/gbsbuild.sh', '-y'])
        # TODO: Add release build test

    elif test == "misc":
        ex.check_run_cmd('tools/check_signed_off.sh', ['--travis'])

        if not check_tidy(TRAVIS_BUILD_PATH):
            ex.fail("Failed tidy check")

    elif test == "external-modules":
        for buildtype in BUILDTYPES:
            build_iotjs(buildtype, [
                '--run-test', '--profile=test/profiles/host-linux.profile',
                '--external-modules=test/external_modules/'
                'mymodule1,test/external_modules/mymodule2',
                '--cmake-param=-DENABLE_MODULE_MYMODULE1=ON',
                '--cmake-param=-DENABLE_MODULE_MYMODULE2=ON'
            ])
            binary = fs.join('build',
                             platform.arch() + '-' + platform.os(), buildtype,
                             'bin', 'iotjs')
            ext_mod_tests = [
Esempio n. 6
0
                build(buildtype, ['--target-arch=arm',
                                '--target-os=nuttx',
                                '--nuttx-home=' + fs.join(nuttx_root, 'nuttx'),
                                '--target-board=stm32f4dis',
                                '--jerry-heaplimit=78']
                                + os_dependency_module['nuttx'] + build_args)
                build_nuttx(nuttx_root, buildtype, 'all')
                fs.chdir(current_dir)

        elif test == "misc":
            args = []
            if os.getenv('TRAVIS') != None:
                args = ['--travis']
            ex.check_run_cmd('tools/check_signed_off.sh', args)

            if not check_tidy(path.PROJECT_ROOT):
                ex.fail("Failed tidy check")

            build("debug", build_args)
            build("debug", ['--iotjs-minimal-profile'] + build_args)

        elif test == "no-snapshot":
            args = []
            if os.getenv('TRAVIS') != None:
                args = ['--travis']

            build("debug", ['--no-snapshot', '--jerry-lto']
                        + os_dependency_module['linux'] + build_args)


        elif test == "coverity":
Esempio n. 7
0
    # iot.js executable
    iotjs = join_path([opt_build_root(), 'iotjs', 'iotjs'])
    return run_cmd(CHECKTEST, [iotjs]) == 0


# parse arguments.
parse_args()

print('=======================================')
for opt_key in options:
    print ' -', opt_key, ':', options[opt_key]
print

# tidy check.
if opt_tidy():
    if not check_tidy(ROOT):
        print_error("Failed check_tidy")
        sys.exit(1)

# init submodules.
if opt_init_submodule():
    init_submodule()

# make build directory.
mkdir(opt_build_root())

# build libtuv or libuv
if opt_tuv():
    if not build_libtuv():
        print_error("Failed build_libtuv")
        sys.exit(1)
Esempio n. 8
0
                        '--target-board=stm32f4dis',
                        '--jerry-heaplimit=78',
                        '--profile=test/profiles/nuttx.profile'])
            # Build Nuttx
            if buildtype == "release":
                rflag = 'R=1'
            else:
                rflag = 'R=0'
            exec_docker(DOCKER_NUTTX_PATH, [
                        'make', 'all',
                        'IOTJS_ROOT_DIR=' + DOCKER_IOTJS_PATH, rflag])

    elif test == "misc":
        ex.check_run_cmd('tools/check_signed_off.sh', ['--travis'])

        if not check_tidy(TRAVIS_BUILD_PATH):
            ex.fail("Failed tidy check")

    elif test == "external-modules":
        for buildtype in BUILDTYPES:
            build_iotjs(buildtype, [
                        '--run-test',
                        '--profile=test/profiles/host-linux.profile',
                        '--external-modules=test/external_modules/'
                        'mymodule1,test/external_modules/mymodule2',
                        '--cmake-param=-DENABLE_MODULE_MYMODULE1=ON',
                        '--cmake-param=-DENABLE_MODULE_MYMODULE2=ON'])
            binary = fs.join('build',
                             platform.arch() + '-' + platform.os(),
                             buildtype, 'bin', 'iotjs')
            ext_mod_tests = [