diff --git a/infra/bots/jobs.json b/infra/bots/jobs.json index 268b90e410..5cf84d6fce 100644 --- a/infra/bots/jobs.json +++ b/infra/bots/jobs.json @@ -68,6 +68,7 @@ "Build-Mac-Clang-arm64-Release-iOS", "Build-Mac-Clang-x64-Release-iOS", "Build-Mac-Clang-x86_64-Debug", + "Build-Mac-Clang-x86_64-Debug-ASAN", "Build-Mac-Clang-x86_64-Debug-CommandBuffer", "Build-Mac-Clang-x86_64-Debug-Metal", "Build-Mac-Clang-x86_64-Release", @@ -196,6 +197,7 @@ "Perf-Mac-Clang-MacBookAir7.2-GPU-IntelHD6000-x86_64-Release-All", "Perf-Mac-Clang-MacBookAir7.2-GPU-IntelHD6000-x86_64-Release-All-CommandBuffer", "Perf-Mac-Clang-MacMini7.1-CPU-AVX-x86_64-Debug-All", + "Perf-Mac-Clang-MacMini7.1-CPU-AVX-x86_64-Debug-All-ASAN", "Perf-Mac-Clang-MacMini7.1-CPU-AVX-x86_64-Release-All", "Perf-Mac-Clang-MacMini7.1-GPU-IntelIris5100-x86_64-Debug-All", "Perf-Mac-Clang-MacMini7.1-GPU-IntelIris5100-x86_64-Release-All", @@ -411,6 +413,7 @@ "Test-Mac-Clang-MacBookAir7.2-GPU-IntelHD6000-x86_64-Debug-All-CommandBuffer", "Test-Mac-Clang-MacBookAir7.2-GPU-IntelHD6000-x86_64-Release-All", "Test-Mac-Clang-MacMini7.1-CPU-AVX-x86_64-Debug-All", + "Test-Mac-Clang-MacMini7.1-CPU-AVX-x86_64-Debug-All-ASAN", "Test-Mac-Clang-MacMini7.1-CPU-AVX-x86_64-Debug-All-NativeFonts", "Test-Mac-Clang-MacMini7.1-CPU-AVX-x86_64-Release-All", "Test-Mac-Clang-MacMini7.1-CPU-AVX-x86_64-Release-All-TSAN", diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/Test-Mac-Clang-MacMini7.1-CPU-AVX-x86_64-Debug-All-ASAN.json b/infra/bots/recipe_modules/flavor/examples/full.expected/Test-Mac-Clang-MacMini7.1-CPU-AVX-x86_64-Debug-All-ASAN.json new file mode 100644 index 0000000000..a7c3bd390d --- /dev/null +++ b/infra/bots/recipe_modules/flavor/examples/full.expected/Test-Mac-Clang-MacMini7.1-CPU-AVX-x86_64-Debug-All-ASAN.json @@ -0,0 +1,213 @@ +[ + { + "cmd": [ + "python", + "-u", + "[START_DIR]/skia/bin/fetch-gn" + ], + "cwd": "[START_DIR]/skia", + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[START_DIR]/out" + }, + "infra_step": true, + "name": "fetch-gn" + }, + { + "cmd": [ + "[START_DIR]/skia/bin/gn", + "gen", + "[START_DIR]/out/Debug", + "--args=cc=\"clang\" cxx=\"clang++\" extra_cflags=[\"-O1\"] sanitize=\"ASAN\" skia_enable_spirv_validation=false" + ], + "cwd": "[START_DIR]/skia", + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[START_DIR]/out" + }, + "name": "gn gen" + }, + { + "cmd": [ + "ninja", + "-k", + "0", + "-C", + "[START_DIR]/out/Debug" + ], + "cwd": "[START_DIR]/skia", + "env": { + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]", + "SKIA_OUT": "[START_DIR]/out" + }, + "name": "ninja" + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", + "--json-output", + "/path/to/tmp/json", + "rmtree", + "results_dir" + ], + "infra_step": true, + "name": "rmtree results_dir" + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", + "--json-output", + "/path/to/tmp/json", + "ensure-directory", + "--mode", + "0777", + "results_dir" + ], + "infra_step": true, + "name": "makedirs results_dir" + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", + "--json-output", + "/path/to/tmp/json", + "rmtree", + "device_results_dir" + ], + "infra_step": true, + "name": "rmtree device_results_dir" + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", + "--json-output", + "/path/to/tmp/json", + "ensure-directory", + "--mode", + "0777", + "device_results_dir" + ], + "infra_step": true, + "name": "makedirs device_results_dir" + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", + "--json-output", + "/path/to/tmp/json", + "copy", + "[START_DIR]/skia/infra/bots/assets/skp/VERSION", + "/path/to/tmp/" + ], + "infra_step": true, + "name": "Get skp VERSION" + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", + "--json-output", + "/path/to/tmp/json", + "copy", + "42", + "[START_DIR]/tmp/SKP_VERSION" + ], + "infra_step": true, + "name": "write SKP_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", + "--json-output", + "/path/to/tmp/json", + "copy", + "[START_DIR]/skia/infra/bots/assets/skimage/VERSION", + "/path/to/tmp/" + ], + "infra_step": true, + "name": "Get skimage VERSION" + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", + "--json-output", + "/path/to/tmp/json", + "copy", + "42", + "[START_DIR]/tmp/SK_IMAGE_VERSION" + ], + "infra_step": true, + "name": "write SK_IMAGE_VERSION" + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", + "--json-output", + "/path/to/tmp/json", + "copy", + "[START_DIR]/skia/infra/bots/assets/svg/VERSION", + "/path/to/tmp/" + ], + "infra_step": true, + "name": "Get svg VERSION" + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", + "--json-output", + "/path/to/tmp/json", + "copy", + "42", + "[START_DIR]/tmp/SVG_VERSION" + ], + "infra_step": true, + "name": "write SVG_VERSION" + }, + { + "cmd": [ + "[START_DIR]/out/Debug/dm", + "--some-flag" + ], + "env": { + "ASAN_OPTIONS": "symbolize=1", + "BUILDTYPE": "Debug", + "CHROME_HEADLESS": "1", + "LD_LIBRARY_PATH": "[START_DIR]/clang_linux/lib", + "LSAN_OPTIONS": "symbolize=1 print_suppressions=1", + "PATH": ":RECIPE_PACKAGE_REPO[depot_tools]:[START_DIR]/clang_linux/bin", + "SKIA_OUT": "[START_DIR]/out", + "UBSAN_OPTIONS": "symbolize=1 print_stacktrace=1" + }, + "name": "dm" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +] \ No newline at end of file diff --git a/infra/bots/recipe_modules/flavor/examples/full.py b/infra/bots/recipe_modules/flavor/examples/full.py index 7a30fa0907..9030e2c43d 100644 --- a/infra/bots/recipe_modules/flavor/examples/full.py +++ b/infra/bots/recipe_modules/flavor/examples/full.py @@ -107,6 +107,7 @@ TEST_BUILDERS = [ 'Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-All-Coverage', 'Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Release-All-TSAN', 'Test-Debian9-GCC-GCE-CPU-AVX2-x86_64-Release-All', + 'Test-Mac-Clang-MacMini7.1-CPU-AVX-x86_64-Debug-All-ASAN', 'Test-Ubuntu16-Clang-NUC7i5BNK-GPU-IntelIris640-x86_64-Debug-All-Vulkan', ('Test-Ubuntu17-GCC-Golo-GPU-QuadroP400-x86_64-Release-All' '-Valgrind_AbandonGpuContext_SK_CPU_LIMIT_SSE41'), diff --git a/infra/bots/recipe_modules/flavor/gn_flavor.py b/infra/bots/recipe_modules/flavor/gn_flavor.py index 86b8b7968d..cc137ea8ad 100644 --- a/infra/bots/recipe_modules/flavor/gn_flavor.py +++ b/infra/bots/recipe_modules/flavor/gn_flavor.py @@ -268,7 +268,10 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils): '-x', self.m.vars.dumps_dir] + cmd if 'ASAN' in extra_tokens or 'UBSAN' in extra_tokens: - env[ 'ASAN_OPTIONS'] = 'symbolize=1 detect_leaks=1' + if 'Mac' in self.m.vars.builder_cfg.get('os', ''): + env['ASAN_OPTIONS'] = 'symbolize=1' # Mac doesn't support detect_leaks. + else: + env['ASAN_OPTIONS'] = 'symbolize=1 detect_leaks=1' env[ 'LSAN_OPTIONS'] = 'symbolize=1 print_suppressions=1' env['UBSAN_OPTIONS'] = 'symbolize=1 print_stacktrace=1' diff --git a/infra/bots/tasks.json b/infra/bots/tasks.json index 171e7470ea..a47532d7dd 100644 --- a/infra/bots/tasks.json +++ b/infra/bots/tasks.json @@ -417,6 +417,12 @@ "Build-Mac-Clang-x86_64-Debug" ] }, + "Build-Mac-Clang-x86_64-Debug-ASAN": { + "priority": 0.8, + "tasks": [ + "Build-Mac-Clang-x86_64-Debug-ASAN" + ] + }, "Build-Mac-Clang-x86_64-Debug-CommandBuffer": { "priority": 0.8, "tasks": [ @@ -1193,6 +1199,12 @@ "Perf-Mac-Clang-MacMini7.1-CPU-AVX-x86_64-Debug-All" ] }, + "Perf-Mac-Clang-MacMini7.1-CPU-AVX-x86_64-Debug-All-ASAN": { + "priority": 0.8, + "tasks": [ + "Perf-Mac-Clang-MacMini7.1-CPU-AVX-x86_64-Debug-All-ASAN" + ] + }, "Perf-Mac-Clang-MacMini7.1-CPU-AVX-x86_64-Release-All": { "priority": 0.8, "tasks": [ @@ -2486,6 +2498,12 @@ "Upload-Test-Mac-Clang-MacMini7.1-CPU-AVX-x86_64-Debug-All" ] }, + "Test-Mac-Clang-MacMini7.1-CPU-AVX-x86_64-Debug-All-ASAN": { + "priority": 0.8, + "tasks": [ + "Test-Mac-Clang-MacMini7.1-CPU-AVX-x86_64-Debug-All-ASAN" + ] + }, "Test-Mac-Clang-MacMini7.1-CPU-AVX-x86_64-Debug-All-NativeFonts": { "priority": 0.8, "tasks": [ @@ -5224,6 +5242,29 @@ "isolate": "compile_skia.isolate", "priority": 0.8 }, + "Build-Mac-Clang-x86_64-Debug-ASAN": { + "dimensions": [ + "cpu:x86-64-E5-2697_v2", + "gpu:none", + "os:Mac-10.13.3", + "pool:Skia" + ], + "extra_args": [ + "--workdir", + "../../..", + "compile", + "repository=<(REPO)", + "buildername=Build-Mac-Clang-x86_64-Debug-ASAN", + "swarm_out_dir=${ISOLATED_OUTDIR}", + "revision=<(REVISION)", + "patch_repo=<(PATCH_REPO)", + "patch_storage=<(PATCH_STORAGE)", + "patch_issue=<(ISSUE)", + "patch_set=<(PATCHSET)" + ], + "isolate": "compile_skia.isolate", + "priority": 0.8 + }, "Build-Mac-Clang-x86_64-Debug-CommandBuffer": { "dimensions": [ "cpu:x86-64-E5-2697_v2", @@ -9729,6 +9770,53 @@ "max_attempts": 1, "priority": 0.8 }, + "Perf-Mac-Clang-MacMini7.1-CPU-AVX-x86_64-Debug-All-ASAN": { + "cipd_packages": [ + { + "name": "skia/bots/skimage", + "path": "skimage", + "version": "version:34" + }, + { + "name": "skia/bots/skp", + "path": "skp", + "version": "version:118" + }, + { + "name": "skia/bots/svg", + "path": "svg", + "version": "version:9" + } + ], + "dependencies": [ + "Build-Mac-Clang-x86_64-Debug-ASAN", + "Housekeeper-PerCommit-BundleRecipes" + ], + "dimensions": [ + "cpu:x86-64-E5-2697_v2", + "os:Mac-10.13.3", + "pool:Skia" + ], + "execution_timeout_ns": 14400000000000, + "expiration_ns": 72000000000000, + "extra_args": [ + "--workdir", + "../../..", + "perf", + "repository=<(REPO)", + "buildername=Perf-Mac-Clang-MacMini7.1-CPU-AVX-x86_64-Debug-All-ASAN", + "swarm_out_dir=${ISOLATED_OUTDIR}", + "revision=<(REVISION)", + "patch_repo=<(PATCH_REPO)", + "patch_storage=<(PATCH_STORAGE)", + "patch_issue=<(ISSUE)", + "patch_set=<(PATCHSET)" + ], + "io_timeout_ns": 2400000000000, + "isolate": "perf_skia_bundled_unix.isolate", + "max_attempts": 1, + "priority": 0.8 + }, "Perf-Mac-Clang-MacMini7.1-CPU-AVX-x86_64-Release-All": { "cipd_packages": [ { @@ -19424,6 +19512,54 @@ "max_attempts": 1, "priority": 0.8 }, + "Test-Mac-Clang-MacMini7.1-CPU-AVX-x86_64-Debug-All-ASAN": { + "cipd_packages": [ + { + "name": "skia/bots/skimage", + "path": "skimage", + "version": "version:34" + }, + { + "name": "skia/bots/skp", + "path": "skp", + "version": "version:118" + }, + { + "name": "skia/bots/svg", + "path": "svg", + "version": "version:9" + } + ], + "dependencies": [ + "Build-Mac-Clang-x86_64-Debug-ASAN", + "Housekeeper-PerCommit-BundleRecipes" + ], + "dimensions": [ + "cpu:x86-64-E5-2697_v2", + "os:Mac-10.13.3", + "pool:Skia" + ], + "execution_timeout_ns": 14400000000000, + "expiration_ns": 72000000000000, + "extra_args": [ + "--workdir", + "../../..", + "test", + "repository=<(REPO)", + "buildbucket_build_id=<(BUILDBUCKET_BUILD_ID)", + "buildername=Test-Mac-Clang-MacMini7.1-CPU-AVX-x86_64-Debug-All-ASAN", + "swarm_out_dir=${ISOLATED_OUTDIR}", + "revision=<(REVISION)", + "patch_repo=<(PATCH_REPO)", + "patch_storage=<(PATCH_STORAGE)", + "patch_issue=<(ISSUE)", + "patch_set=<(PATCHSET)" + ], + "io_timeout_ns": 2400000000000, + "isolate": "test_skia_bundled_unix.isolate", + "max_attempts": 1, + "priority": 0.8 + }, "Test-Mac-Clang-MacMini7.1-CPU-AVX-x86_64-Debug-All-NativeFonts": { "cipd_packages": [ {