Пример #1
0
def run_tests2():
    if not os.path.exists("premake4.lua"):
        return "premake4.lua doesn't exist in current directory (%s)" % os.getcwd()
    err = run_premake()
    if err != None:
        return err
    p = os.path.join("vs-premake", "all_tests.sln")
    if not os.path.exists(p):
        return "%s doesn't exist" % p
    os.chdir("vs-premake")
    try:
        util.kill_msbuild()
    except:
        return "util.kill_msbuild() failed"
    try:
        (out, err, errcode) = util.run_cmd("devenv",
                                           "all_tests.sln", "/build", "Release")
        if errcode != 0:
            return "devenv.exe failed to build all_tests.sln\n" + fmt_out_err(out, err)
    except:
        return "devenv.exe not found"
    p = os.path.join("..", "obj-rel")
    os.chdir(p)
    test_files = [f for f in os.listdir(".") if is_test_exe(f)]
    print("Running %d test executables" % len(test_files))
    for f in test_files:
        try:
            (out, err, errcode) = util.run_cmd(f)
            if errcode != 0:
                return "%s failed with:\n%s" % (f, fmt_out_err(out, err))
            print(fmt_out_err(out, err))
        except:
            return "%s failed to run" % f
    return None
Пример #2
0
def build_win():
	util.run_cmd_throw("premake4", "vs2010")
	curr_dir = os.getcwd()
	os.chdir("vs-premake")
	util.kill_msbuild()
	util.run_cmd_throw("devenv", "ag.sln", "/Build", "Release", "/Project", "ag.vcxproj")
	assert os.path.exists(ag_exe_path_win()), "%s doesn't exist" % ag_exe_path_win()
	os.chdir(curr_dir)
Пример #3
0
def build():
	util.run_cmd_throw("premake4", "vs2010")
	os.chdir("build")
	util.kill_msbuild()
	util.run_cmd_throw("devenv", "pigz.sln", "/Build", "Release", "/Project", "pigz.vcxproj")
	os.chdir(os.path.join("..", "rel"))
	assert os.path.exists("pigz.exe")
	# yes, those are the same files, the binary decides what it is based on its name
	shutil.copyfile("pigz.exe", "unpigz.exe")
Пример #4
0
def build():
    util.run_cmd_throw("premake4", "vs2010")
    os.chdir("build")
    util.kill_msbuild()
    util.run_cmd_throw("devenv", "pigz.sln", "/Build", "Release", "/Project",
                       "pigz.vcxproj")
    os.chdir(os.path.join("..", "rel"))
    assert os.path.exists("pigz.exe")
    # yes, those are the same files, the binary decides what it is based on its name
    shutil.copyfile("pigz.exe", "unpigz.exe")
Пример #5
0
def build_win():
    util.run_cmd_throw("premake4", "vs2010")
    curr_dir = os.getcwd()
    os.chdir("vs-premake")
    util.kill_msbuild()
    util.run_cmd_throw("devenv", "ag.sln", "/Build", "Release", "/Project",
                       "ag.vcxproj")
    assert os.path.exists(
        ag_exe_path_win()), "%s doesn't exist" % ag_exe_path_win()
    os.chdir(curr_dir)