示例#1
0
def _build_project(full_path_of_build_script, verbose, bldopts, config,
                   xconfig, pkgroot):
    # reconcile config options
    cfg = None
    if (config):
        cfg = os.path.join(pkgroot, config)
    elif (xconfig):
        cfg = xconfig

    # Build the project
    utils.push_dir(os.path.dirname(full_path_of_build_script))
    cmd = full_path_of_build_script + ' ' + " ".join(bldopts)
    print("BUILDING: " + cmd)
    if (config):
        cmd = utils.concatenate_commands(cfg, cmd)
    utils.run_shell2(cmd, verbose, f"ERROR: Build failure ({cmd})")
    utils.pop_dir()
示例#2
0
def execute_test(target, ppath, args, arg_string):
    utils.push_dir(os.path.split(target)[0])
    reldir = target.replace(ppath, '')[1:]
    exe = os.path.basename(target)
    cmd = ".{}{} {}".format(os.path.sep, exe, arg_string)
    for n in range(int(args['--loop'])):
        print("= EXECUTING (#{}): {} {}".format(n + 1, reldir, arg_string))
        result = utils.run_shell2(
            cmd, args['-v'], "** ERROR: Test failed (#{} {} {} )**".format(
                n + 1, reldir, arg_string))
    utils.pop_dir
示例#3
0

#------------------------------------------------------------------------------
# MAIN ENTRY POINT....
#
utils.set_verbose_mode( True )
prjdir          = os.path.dirname(os.path.abspath(__file__))
srcpath         = os.path.join( prjdir, 'src', 'Catch', 'precompiled' )
dstpath_release = os.path.join( my_globals.NQBP_PKG_ROOT(), 'libs', 'x86', 'windows', 'vc14', 'cpp11', '32bit', "release" )
dstpath_debug   = os.path.join( my_globals.NQBP_PKG_ROOT(), 'libs', 'x86', 'windows', 'vc14', 'cpp11', '32bit', "debug" )

                 
#
# Build non-debug version
#
err, msg = utils.run_shell2( "nqbp.py -t", True )
if ( err != 0 ):
    sys.exit( "ERROR: Release build failed.")
print( "Copying: {} TO\n         {}".format( srcpath, dstpath_release ) )
shutil.rmtree( dstpath_release, True );
shutil.copytree(srcpath,dstpath_release)


# 
# Build debug version
#
err, msg = utils.run_shell2( "nqbp.py -gt", True )
if ( err != 0 ):
    sys.exit( "ERROR: Release build failed.")
print( "Copying: {} TO\n         {}".format( srcpath, dstpath_debug ) )
shutil.rmtree( dstpath_debug, True );
示例#4
0
srcpath = os.path.join(prjdir, 'src', 'Catch', 'precompiled')

#
# 32 Bit versions
#
dstpath_release = os.path.join(my_globals.NQBP_PKG_ROOT(), 'src', 'Catch',
                               'libs', 'x86', 'windows', 'mingw_64', 'cpp11',
                               '32bit', "release")
dstpath_debug = os.path.join(my_globals.NQBP_PKG_ROOT(), 'src', 'Catch',
                             'libs', 'x86', 'windows', 'mingw_64', 'cpp11',
                             '32bit', "debug")

#
# Build non-debug version
#
err, msg = utils.run_shell2("nqbp.py -tb win32", True)
if (err != 0):
    sys.exit("ERROR: Release build failed.")
print("Copying: {} TO\n         {}".format(srcpath, dstpath_release))
shutil.rmtree(dstpath_release, True)
shutil.copytree(srcpath, dstpath_release)

#
# Build debug version
#
err, msg = utils.run_shell2("nqbp.py -gtb win32", True)
if (err != 0):
    sys.exit("ERROR: Release build failed.")
print("Copying: {} TO\n         {}".format(srcpath, dstpath_debug))
shutil.rmtree(dstpath_debug, True)
shutil.copytree(srcpath, dstpath_debug)
示例#5
0
srcpath = os.path.join(prjdir, 'src', 'Catch', 'precompiled')

#
# 32 Bit versions
#
dstpath_release = os.path.join(my_globals.NQBP_PKG_ROOT(), 'src', 'Catch',
                               'libs', 'x86', 'linux', 'gcc', 'cpp11', '32bit',
                               "release")
dstpath_debug = os.path.join(my_globals.NQBP_PKG_ROOT(), 'src', 'Catch',
                             'libs', 'x86', 'linux', 'gcc', 'cpp11', '32bit',
                             "debug")

#
# Build non-debug version
#
err, msg = utils.run_shell2("nqbp.py -tb posix", True)
if (err != 0):
    sys.exit("ERROR: Release build failed.")
print("Copying: {} TO\n         {}".format(srcpath, dstpath_release))
shutil.rmtree(dstpath_release, True)
shutil.copytree(srcpath, dstpath_release)

#
# Build debug version
#
err, msg = utils.run_shell2("nqbp.py -gtb posix", True)
if (err != 0):
    sys.exit("ERROR: Release build failed.")
print("Copying: {} TO\n         {}".format(srcpath, dstpath_debug))
shutil.rmtree(dstpath_debug, True)
shutil.copytree(srcpath, dstpath_debug)