[PATCH] D29677: [buildbot] Add check-fuzzer to Asan buildbot on Windows.

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 7 19:08:15 PST 2017


os.path.join will run on the master, which is probably Linux, so it will
join with / instead of \. Since this slave is Windows only we can assume \
separator, so i guess just hardcode the path concatenations to use \
instead of os.path.join
On Tue, Feb 7, 2017 at 6:24 PM Marcos Pividori via Phabricator <
reviews at reviews.llvm.org> wrote:

> mpividori updated this revision to Diff 87578.
> mpividori added a comment.
>
> Ok. Now it should work fine. Would you agree?
>
>
> https://reviews.llvm.org/D29677
>
> Files:
>   zorg/buildbot/builders/SanitizerBuilderWindows.py
>
>
> Index: zorg/buildbot/builders/SanitizerBuilderWindows.py
> ===================================================================
> --- zorg/buildbot/builders/SanitizerBuilderWindows.py
> +++ zorg/buildbot/builders/SanitizerBuilderWindows.py
> @@ -64,6 +64,7 @@
>
>      # Global configurations
>      build_dir='build'
> +    build_fuzzer_dir='build-fuzzer'
>
>      ############# CLEANING
>      cleanBuildRequested = lambda step: step.build.getProperty("clean") or
> clean
> @@ -112,4 +113,68 @@
>                             workdir=build_dir,
>                             env=Property('slave_env')))
>
> +    # Clean fuzzer build dir.
> +    f.addStep(RemoveDirectory(name='clean '+build_fuzzer_dir,
> +                dir=build_fuzzer_dir,
> +                haltOnFailure=False,
> +                flunkOnFailure=False,
> +                doStepIf=cleanBuildRequested
> +                ))
> +
> +    # Get absolute path to build dir.
> +    f.addStep(SetProperty(name="get_builddir",
> +                          command=["pwd"],
> +                          property="builddir",
> +                          description="set build dir",
> +                          workdir=build_dir))
> +
> +    # Get clang version.
> +    lib_clang_dir = os.path.join(Property("builddir"), config, "lib",
> "clang")
> +    f.addStep(SetProperty(name="get clang version",
> +                          command=["dir", "/b", lib_clang_dir],
> +                          property="clang_version",
> +                          description="get clang version",
> +                          workdir=build_dir))
> +
> +    # Get binary dir.
> +    bin_path = os.path.join(Property("builddir"), config, "bin")
> +    # Get compiler-rt's libraries dir.
> +    dll_path = os.path.join(lib_clang_dir, Property("clang_version"),
> "lib",
> +        "windows")
> +    # Get absolute path to clang-cl.
> +    clang_cl = os.path.join(bin_path, "clang-cl")
> +
> +    # Add fresh clang, tools and compiler-rt dlls to path.
> +    Property('slave_env')['Path'] = ";".join([bin_path, dll_path,
> +        Property('slave_env')['Path']])
> +
> +    f.addStep(ShellCommand(name='cmake',
> +                           command=[cmake, "-G", "Ninja", "../llvm",
> +                                    "-DCMAKE_BUILD_TYPE="+config,
> +                                    "-DLLVM_ENABLE_ASSERTIONS=ON",
> +                                    "-DCMAKE_C_COMPILER="+clang_cl,
> +                                    "-DCMAKE_CXX_COMPILER="+clang_cl,
> +                                    "-DLLVM_USE_SANITIZER=Address",
> +                                    "-DLLVM_USE_SANITIZE_COVERAGE=YES"]
> +                                   + extra_cmake_args,
> +                           haltOnFailure=True,
> +                           workdir=build_fuzzer_dir,
> +                           env=Property('slave_env')))
> +
> +    # Build libFuzzer.
> +    f.addStep(NinjaCommand(name='build LLVMFuzzer',
> +                           targets=['LLVMFuzzer'],
> +                           haltOnFailure=True,
> +                           description='ninja LLVMFuzzer',
> +                           workdir=build_dir,
> +                           env=Property('slave_env')))
> +
> +    # Run libFuzzer's tests.
> +    f.addStep(NinjaCommand(name='run fuzzer tests',
> +                           targets=['check-fuzzer'],
> +                           haltOnFailure=True,
> +                           description='ninja check-fuzzer',
> +                           workdir=build_fuzzer_dir,
> +                           env=Property('slave_env')))
> +
>      return f
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170208/dd1f5f97/attachment.html>


More information about the llvm-commits mailing list