def build(self): options = ["--enable-glx-tls", "--enable-gles1", "--enable-gles2", "--with-dri-drivers=i965,i915", # disable video drivers: # bbe6f7f865cd4316b5f885507ee0b128a20686eb # caused build failure unrelated to intel mesa # team. "--disable-xvmc", "--disable-vdpau", # gallium tested with mesa-buildtest "--without-gallium-drivers"] save_dir = os.getcwd() bd = self._build_dir + "/skl" if not os.path.exists(bd): os.makedirs(bd) os.chdir(bd) flags = " ".join(self._flags) flags = ["CFLAGS=-O2 " + flags, "CXXFLAGS=-O2 " + flags, "CC=ccache gcc", "CXX=ccache g++"] cmd = [self._src_dir + "/autogen.sh"] + flags + options bs.run_batch_command(cmd) bs.run_batch_command(["make", "-j", str(bs.cpu_count()), "install"], env={"DESTDIR" : "/tmp/build_root/" + self.opts.arch + "/skl"} ) os.chdir(save_dir) bs.Export().export_perf()
def main(): global_opts = bs.Options() options = [] if global_opts.arch == "m32": # m32 build not supported return options = options + ["--enable-gbm", "--enable-llvm", "--with-egl-platforms=x11,drm", "--enable-glx-tls", "--enable-gles1", "--enable-gles2", "--with-gallium-drivers=svga,swrast,r300,r600,radeonsi,nouveau", "--with-vulkan-drivers=intel,radeon"] if global_opts.config == 'debug': options.append('--enable-debug') # builder = bs.AutoBuilder(configure_options=options, export=False) builder = NoTest(configure_options=options) save_dir = os.getcwd() try: bs.build(builder) except subprocess.CalledProcessError as e: # build may have taken us to a place where ProjectMap doesn't work os.chdir(save_dir) bs.Export().create_failing_test("mesa-buildtest", str(e))
def build(self): has_vulkan = os.path.exists(self._src_dir + "/external/spirv-tools") if has_vulkan: spirvtools = self._src_dir + "/external/spirv-tools/src" if not os.path.islink(spirvtools): bs.rmtree(spirvtools) if not os.path.exists(spirvtools): os.symlink("../../../spirvtools", spirvtools) glslang = self._src_dir + "/external/glslang/src" if not os.path.islink(glslang): bs.rmtree(glslang) if not os.path.exists(glslang): os.symlink("../../../glslang", glslang) spirvheaders_dir = self._src_dir + "/external/spirv-headers" if not os.path.exists(spirvheaders_dir): os.makedirs(spirvheaders_dir) spirvheaders = spirvheaders_dir + "/src" if not os.path.islink(spirvheaders): bs.rmtree(spirvheaders) if not os.path.exists(spirvheaders): os.symlink("../../../spirvheaders", spirvheaders) # change spirv-tools and glslang to use the commits specified # in the vulkancts sources sys.path = [os.path.abspath(os.path.normpath(s)) for s in sys.path] sys.path = [ gooddir for gooddir in sys.path if "deqp" not in gooddir ] sys.path.append(self._src_dir + "/external/") fetch_sources = importlib.import_module("fetch_sources", ".") for package in fetch_sources.PACKAGES: try: if not isinstance(package, fetch_sources.GitRepo): continue except: continue repo_path = self._src_dir + "/external/" + package.baseDir + "/src/" print "Cleaning: " + repo_path + " : " + package.revision savedir = os.getcwd() os.chdir(repo_path) bs.run_batch_command(["git", "clean", "-xfd"]) bs.run_batch_command(["git", "reset", "--hard", "HEAD"]) os.chdir(savedir) print "Checking out: " + repo_path + " : " + package.revision repo = git.Repo(repo_path) repo.git.checkout(package.revision, force=True) bs.CMakeBuilder.build(self) dest = self._pm.build_root() + "/opt/deqp/" if not os.path.exists(dest): os.makedirs(dest) bs.run_batch_command([ "rsync", "-rlptD", self._pm.project_source_dir() + "/build_" + self._o.arch + "/modules", dest ]) bs.Export().export()
def main(): b = SconsBuilder() save_dir = os.getcwd() try: bs.build(b) except subprocess.CalledProcessError as e: # build may have taken us to a place where ProjectMap doesn't work os.chdir(save_dir) bs.Export().create_failing_test("mesa-scons-buildtest", str(e))
def build(self): bs.AutoBuilder.build(self) bin_dir = self._build_root + "/bin/" if not os.path.exists(bin_dir): os.makedirs(bin_dir) bs.run_batch_command( ["cp", "-a", "-n", self._build_dir + "/bin/crucible", bin_dir]) bs.run_batch_command( ["cp", "-a", "-n", self._build_dir + "/data/", self._build_root]) bs.Export().export()
def build(self): glslang = self._src_dir + "/third_party/glslang" if not os.path.exists(glslang): os.symlink("../../glslang", glslang) gmock = self._src_dir + "/third_party/gmock-1.7.0" if not os.path.exists(gmock): os.symlink("../../gmock", gmock) gtest = self._src_dir + "/third_party/gtest" if not os.path.exists(gtest): os.symlink("../../gtest", gtest) spirv = self._src_dir + "/third_party/spirv-tools" if not os.path.exists(spirv): os.symlink("../../spirvtools", spirv) spirvheaders = self._src_dir + "/third_party/spirv-tools/external/spirv-headers" if not os.path.exists(spirvheaders): os.symlink("../../spirvheaders", spirvheaders) if not os.path.exists(self._build_dir): os.makedirs(self._build_dir) os.chdir(self._build_dir) btype = "Release" if self._options.type == "debug": btype = "RelDeb" flags = "-m64" if self._options.arch == "m32": flags = "-m32" cmd = [ "cmake", "-GNinja", "-DCMAKE_BUILD_TYPE=" + btype, "-DSHADERC_SKIP_TESTS=1", "-DCMAKE_C_FLAGS=" + flags, "-DCMAKE_CXX_FLAGS=" + flags, "-DCMAKE_INSTALL_PREFIX:PATH=" + self._build_root, ".." ] bs.run_batch_command(cmd) bs.run_batch_command(["ninja"]) bin_dir = self._build_root + "/bin/" if not os.path.exists(bin_dir): os.makedirs(bin_dir) bs.run_batch_command( ["cp", "-a", "-n", self._build_dir + "/glslc/glslc", bin_dir]) bs.Export().export()
def build(self): save_dir = os.getcwd() os.chdir(self._src_dir) try: bs.run_batch_command([ "patch", "-p1", "CMakeLists.txt", self._pm.project_build_dir("vulkancts") + "/0001-Fix-PNG.patch" ]) except: print "WARN: failed to apply PNG patch" try: bs.run_batch_command([ "patch", "-p1", "external/vulkancts/modules/vulkan/vktTestPackage.cpp", self._pm.project_build_dir("vulkancts") + "/0002-Attempt-to-load-prebuilt-spirv-from-cache.patch" ]) except: print "WARN: failed to apply prebuilt patch" os.chdir(save_dir) spirvtools = self._src_dir + "/external/spirv-tools/src" if not os.path.islink(spirvtools): bs.rmtree(spirvtools) if not os.path.exists(spirvtools): os.symlink("../../../spirvtools", spirvtools) spirvheaders_dir = self._src_dir + "/external/spirv-headers" if not os.path.exists(spirvheaders_dir): os.makedirs(spirvheaders_dir) spirvheaders = spirvheaders_dir + "/src" if not os.path.islink(spirvheaders): bs.rmtree(spirvheaders) if not os.path.exists(spirvheaders): os.symlink("../../../spirvheaders", spirvheaders) glslang = self._src_dir + "/external/glslang/src" if not os.path.islink(glslang): bs.rmtree(glslang) if not os.path.exists(glslang): os.symlink("../../../glslang", glslang) # change spirv-tools and glslang to use the commits specified # in the vulkancts sources sys.path = [os.path.abspath(os.path.normpath(s)) for s in sys.path] sys.path = [ gooddir for gooddir in sys.path if "vulkancts" not in gooddir ] sys.path.append(self._src_dir + "/external/") fetch_sources = importlib.import_module("fetch_sources", ".") for package in fetch_sources.PACKAGES: if not isinstance(package, fetch_sources.GitRepo): continue repo_path = self._src_dir + "/external/" + package.baseDir + "/src/" print "Cleaning: " + repo_path + " : " + package.revision savedir = os.getcwd() os.chdir(repo_path) bs.run_batch_command(["git", "clean", "-xfd"]) bs.run_batch_command(["git", "reset", "--hard", "HEAD"]) os.chdir(savedir) print "Checking out: " + repo_path + " : " + package.revision repo = git.Repo(repo_path) repo.git.checkout(package.revision, force=True) btype = "Release" # Vulkan cts is twice as slow for RelDeb builds, which impacts # the CI throughput. For this reason, we unconditionally # optimize the build. # if self._options.config == "debug": # btype = "RelDeb" flags = "-m64" if self._options.arch == "m32": flags = "-m32" cmd = [ "cmake", "-GNinja", "-DCMAKE_BUILD_TYPE=" + btype, "-DCMAKE_C_COMPILER_LAUNCHER=ccache", "-DCMAKE_CXX_COMPILER_LAUNCHER=ccache", "-DCMAKE_C_FLAGS=" + flags, "-DCMAKE_CXX_FLAGS=" + flags, "-DCMAKE_C_COMPILER=clang", "-DCMAKE_CXX_COMPILER=clang++", "-DCMAKE_INSTALL_PREFIX:PATH=" + self._build_root, ".." ] if not os.path.exists(self._build_dir): os.makedirs(self._build_dir) os.chdir(self._build_dir) bs.run_batch_command(cmd) bs.run_batch_command(["ninja", "vk-build-programs"]) save_dir = os.getcwd() os.chdir("external/vulkancts/modules/vulkan") out_dir = os.path.join(self._src_dir, "external", "vulkancts", "data", "vulkan", "prebuilt") print "Pre-building spir-v binaries: vk-build-programs -d " + out_dir bs.run_batch_command(["./vk-build-programs", "-d", out_dir], quiet=True, streamedOutput=False) os.chdir(save_dir) bs.run_batch_command(["ninja"]) bin_dir = self._build_root + "/opt/deqp/" if not os.path.exists(bin_dir): os.makedirs(bin_dir) bs.run_batch_command([ "rsync", "-rlptD", self._build_dir + "/external/vulkancts/modules", bin_dir ]) bs.Export().export()
def test(self): pm = bs.ProjectMap() build_root = pm.build_root() global_opts = bs.Options() if global_opts.arch == "m64": icd_name = "intel_icd.x86_64.json" elif global_opts.arch == "m32": icd_name = "intel_icd.i686.json" env = { "LD_LIBRARY_PATH": build_root + "/lib", "VK_ICD_FILENAMES": build_root + "/share/vulkan/icd.d/" + icd_name, "ANV_ABORT_ON_DEVICE_LOSS": "true" } o = bs.Options() o.update_env(env) br = bs.ProjectMap().build_root() out_dir = br + "/../test" if not path.exists(out_dir): os.makedirs(out_dir) out_xml = out_dir + "/piglit-crucible_" + o.hardware + "_" + o.arch + ".xml" include_tests = [] if o.retest_path: include_tests = bs.TestLister( o.retest_path + "/test/").RetestIncludes("crucible-test") # flaky excludes = ["!func.query.timestamp", "!func.ssbo.interleve"] parallelism = [] if "hsw" in o.hardware: # issue 4 excludes += [ "!func.copy.copy-buffer.large", "!func.interleaved-cmd-buffers.end1*", "!func.miptree.d32-sfloat.aspect-depth.view*", "!func.miptree.r8g8b8a8-unorm.aspect-color.view*", "!func.miptree.s8-uint.aspect-stencil*", "!func.renderpass.clear.color08", "!func.ssbo.interleve" ] if "ivb" in o.hardware: # issue 5 excludes += [ "!func.depthstencil*", "!func.miptree.r8g8b8a8-unorm.aspect-color.view*", "!func.miptree.s8-uint.aspect-stencil*", "!func.miptree.d32-sfloat.aspect-depth.view*", "!stress.lots-of-surface-state.fs.static" ] parallelism = ['-j', '1'] if "byt" in o.hardware: # issue 6 excludes += [ "!func.miptree.d32-sfloat.aspect-depth.view-3d.levels0*", "!func.depthstencil*", "!func.miptree.s8-uint.aspect-stencil*", "!stress.lots-of-surface-state.fs.static" ] parallelism = ['-j', '1'] if "bsw" in o.hardware: excludes += ["!func.event.cmd_buffer"] # intermittent fail/crash if "bxt" in o.hardware: excludes += [ "!func.miptree.s8-uint.aspect-stencil*", "!stress.lots-of-surface-state.fs.static" ] bs.run_batch_command([ br + "/bin/crucible", "run", "--fork", "--log-pids", "--junit-xml=" + out_xml ] + parallelism + include_tests + excludes, env=env, expected_return_code=None) post_process_results(out_xml) bs.run_batch_command(["cp", "-a", "-n", out_dir, pm.source_root()]) bs.check_gpu_hang() bs.Export().export_tests()
def main(): pm = bs.ProjectMap() sd = pm.project_source_dir(pm.current_project()) if not os.path.exists( os.path.join(sd, 'src/mesa/drivers/osmesa/meson.build')): return 0 save_dir = os.getcwd() global_opts = bs.Options() options = [ '-Dbuild-tests=true', '-Dgallium-drivers=r300,r600,radeonsi,nouveau,swrast,swr,freedreno,vc4,pl111,etnaviv,imx,svga,virgl', '-Dgallium-vdpau=true', '-Dgallium-xvmc=true', '-Dgallium-xa=true', '-Dgallium-va=true', '-Dgallium-nine=true', '-Dgallium-opencl=standalone', ] # the knob for omx changed durring the 18.1 cycle, if tizonia support is # present we need to use bellagio, otherwise we need true. with open(os.path.join(sd, 'meson_options.txt')) as f: for l in f: if 'tizonia' in l: options.append('-Dgallium-omx=bellagio') break else: options.append('-Dgallium-omx=true') if global_opts.config != 'debug': options.extend(['-Dbuildtype=release', '-Db_ndebug=true']) b = bs.builders.MesonBuilder(extra_definitions=options, install=False) b.tests += [ # TODO: These need runtime discovery, probably using `find` or to point # at the DSOs in the install directory # #'es1-ABI-check', #'es2-ABI-check', #'gbm-symbols-check', #'wayland-egl-symbols-check', #'wayland-egl-abi-check', #'egl-symbols-check', #'egl-entrypoint-check', 'anv_block_pool_no_free', 'anv_state_pool', 'anv_state_pool_free_list_only', 'anv_state_pool_no_free', 'blob_test', 'cache_test', 'clear', 'collision', 'delete_and_lookup', 'delete_management', 'destroy_callback', 'eu_compact', 'glx-dispatch-index-check', 'insert_and_lookup', 'insert_many', 'isl_surf_get_image_offset', 'lp_test_arit', 'lp_test_blend', 'lp_test_conv', 'lp_test_format', 'lp_test_printf', 'mesa-sha1', 'null_destroy', 'random_entry', 'remove_null', 'replacement', 'roundeven', 'u_atomic', ] b.gtests += [ 'eu_validate', 'fs_cmod_propagation', 'fs_copy_propagation', 'fs_saturate_propagation', 'general_ir_test', 'glx-test', 'main-test', 'nir_control_flow', 'sampler_types_test', 'shared-glapi-test', 'string_buffer', 'uniform_initializer_test', 'vec4_cmod_propagation', 'vec4_copy_propagation', 'vec4_register_coalesce', 'vf_float_conversions', ] try: bs.build(b) except subprocess.CalledProcessError as e: # build may have taken us to a place where ProjectMap doesn't work os.chdir(save_dir) bs.Export().create_failing_test("mesa-meson-buildtest", str(e))
def test(self): o = bs.Options() pm = bs.ProjectMap() if not self.version: self.version = bs.mesa_version() conf_file = bs.get_conf_file(o.hardware, o.arch, "cts-test") # invoke piglit self.env["PIGLIT_CTS_GL_BIN"] = self.build_root + "/bin/gl/cts/glcts" out_dir = self.build_root + "/test/" + o.hardware include_tests = [] if o.retest_path: testlist = bs.TestLister(o.retest_path + "/test/") include_tests = testlist.RetestIncludes(project="cts-test") if not include_tests: # we were supposed to retest failures, but there were none return # this test is flaky in glcts. It passes enough for # submission, but as per Ken, no developer will want to look # at it to figure out why the test is flaky. extra_excludes = [ "packed_depth_stencil.packed_depth_stencil_copyteximage" ] suite_names = [] # disable gl cts on stable versions of mesa, which do not # support the feature set. if "13.0" in self.version: return if "17.0" in self.version and "glk" in o.hardware: # glk not supported by stable mesa return suite_names.append("cts_gl") # as per Ian, only run gl45 extra_excludes += [ "gl30-cts", "gl31-cts", "gl32-cts", "gl33-cts", "gl40-cts", "gl41-cts", "gl42-cts", "gl43-cts", "gl44-cts" ] if "hsw" in o.hardware: # flaky cts_gl tests extra_excludes += [ "shader_image_load_store.multiple-uniforms", "shader_image_size.basic-nonms-fs", "shader_image_size.advanced-nonms-fs", "texture_gather.gather-tesselation-shader", "vertex_attrib_binding.basic-inputl-case1", "gpu_shader_fp64.named_uniform_blocks", # gpu hang "gl45-cts.tessellation_shader.vertex_spacing", "gl45-cts.tessellation_shader.vertex_ordering", "gl45-cts.tessellation_shader.tessellation_control_to_tessellation_evaluation.gl_maxpatchvertices_position_pointsize" ] exclude_tests = [] for a in extra_excludes: exclude_tests += ["--exclude-tests", a] if not suite_names: # for master, on old hardware, this component will not # test anything. The gles tests are instead targeted with # the gles32 cts, in the glescts-test component return cmd = [self.build_root + "/bin/piglit", "run", #"-p", "gbm", "-b", "junit", "--config", conf_file, "-c", "--exclude-tests", "esext-cts", "--junit_suffix", "." + o.hardware + o.arch] + \ exclude_tests + \ include_tests + suite_names + [out_dir] bs.run_batch_command(cmd, env=self.env, expected_return_code=None, streamedOutput=True) single_out_dir = self.build_root + "/../test" if not os.path.exists(single_out_dir): os.makedirs(single_out_dir) if os.path.exists(out_dir + "/results.xml"): # Uniquely name all test files in one directory, for # jenkins filename_components = ["/piglit-cts", o.hardware, o.arch] if o.shard != "0": # only put the shard suffix on for non-zero shards. # Having _0 suffix interferes with bisection. filename_components.append(o.shard) revisions = bs.RepoSet().branch_missing_revisions() print "INFO: filtering tests from " + out_dir + "/results.xml" self.filter_tests( revisions, out_dir + "/results.xml", single_out_dir + "_".join(filename_components) + ".xml") # create a copy of the test xml in the source root, where # jenkins can access it. cmd = [ "cp", "-a", "-n", self.build_root + "/../test", pm.source_root() ] bs.run_batch_command(cmd) else: print "ERROR: no results at " + out_dir + "/results.xml" bs.check_gpu_hang() bs.Export().export_tests()