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

Marcos Pividori via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 7 13:05:22 PST 2017


mpividori created this revision.

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,34 @@
                            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
+                ))
+
+    clang_path = os.path.join("..", build_dir, config, "bin", "clang-cl")
+    f.addStep(ShellCommand(name='cmake',
+                           command=[cmake, "-G", "Ninja", "../llvm",
+                                    "-DCMAKE_BUILD_TYPE="+config,
+                                    "-DLLVM_ENABLE_ASSERTIONS=ON",
+                                    "-DCMAKE_C_COMPILER="+clang_path,
+                                    "-DCMAKE_CXX_COMPILER="+clang_path,
+                                    "-DLLVM_USE_SANITIZER=Address",
+                                    "-DLLVM_USE_SANITIZE_COVERAGE=YES"]
+                                   + extra_cmake_args,
+                           haltOnFailure=True,
+                           workdir=build_fuzzer_dir,
+                           env=Property('slave_env')))
+
+    # Run fuzzer tests.
+    f.addStep(NinjaCommand(name='run fuzzer tests',
+                           targets=['check-fuzzer'],
+                           haltOnFailure=True,
+                           description='ninja test',
+                           workdir=build_fuzzer_dir,
+                           env=Property('slave_env')))
+
     return f


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29677.87505.patch
Type: text/x-patch
Size: 2041 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170207/16fbfbda/attachment.bin>


More information about the llvm-commits mailing list