aboutsummaryrefslogtreecommitdiffhomepage
path: root/infra/bots/recipe_modules/flavor
diff options
context:
space:
mode:
Diffstat (limited to 'infra/bots/recipe_modules/flavor')
-rw-r--r--infra/bots/recipe_modules/flavor/examples/full.expected/Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-UBSAN_float_cast_overflow.json215
-rw-r--r--infra/bots/recipe_modules/flavor/examples/full.py1
-rw-r--r--infra/bots/recipe_modules/flavor/gn_flavor.py12
3 files changed, 225 insertions, 3 deletions
diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-UBSAN_float_cast_overflow.json b/infra/bots/recipe_modules/flavor/examples/full.expected/Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-UBSAN_float_cast_overflow.json
new file mode 100644
index 0000000000..1821771fd1
--- /dev/null
+++ b/infra/bots/recipe_modules/flavor/examples/full.expected/Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-UBSAN_float_cast_overflow.json
@@ -0,0 +1,215 @@
+[
+ {
+ "cmd": [
+ "python",
+ "-u",
+ "[START_DIR]/skia/bin/fetch-gn"
+ ],
+ "cwd": "[START_DIR]/skia",
+ "env": {
+ "BUILDTYPE": "Release",
+ "CHROME_HEADLESS": "1",
+ "PATH": "<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/Release",
+ "--args=cc=\"[START_DIR]/clang_linux/bin/clang\" cxx=\"[START_DIR]/clang_linux/bin/clang++\" extra_cflags=[\"-B[START_DIR]/clang_linux/bin\"] extra_ldflags=[\"-B[START_DIR]/clang_linux/bin\", \"-fuse-ld=lld\"] is_debug=false sanitize=\"float-cast-overflow\" skia_enable_spirv_validation=false"
+ ],
+ "cwd": "[START_DIR]/skia",
+ "env": {
+ "BUILDTYPE": "Release",
+ "CHROME_HEADLESS": "1",
+ "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
+ "SKIA_OUT": "[START_DIR]/out"
+ },
+ "name": "gn gen"
+ },
+ {
+ "cmd": [
+ "ninja",
+ "-C",
+ "[START_DIR]/out/Release"
+ ],
+ "cwd": "[START_DIR]/skia",
+ "env": {
+ "BUILDTYPE": "Release",
+ "CHROME_HEADLESS": "1",
+ "PATH": "<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 downloaded 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 downloaded 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 downloaded 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": [
+ "python",
+ "-u",
+ "RECIPE_MODULE[skia::flavor]/resources/symbolize_stack_trace.py",
+ "[START_DIR]",
+ "[START_DIR]/out/Release/dm",
+ "--some-flag"
+ ],
+ "cwd": "[START_DIR]/skia",
+ "env": {
+ "ASAN_OPTIONS": "symbolize=1 detect_leaks=1",
+ "BUILDTYPE": "Release",
+ "CHROME_HEADLESS": "1",
+ "LSAN_OPTIONS": "symbolize=1 print_suppressions=1",
+ "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]:[START_DIR]/clang_linux/bin",
+ "SKIA_OUT": "[START_DIR]/out",
+ "UBSAN_OPTIONS": "symbolize=1 print_stacktrace=1"
+ },
+ "name": "symbolized 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 f845dbcd39..abe7478fd2 100644
--- a/infra/bots/recipe_modules/flavor/examples/full.py
+++ b/infra/bots/recipe_modules/flavor/examples/full.py
@@ -81,6 +81,7 @@ TEST_BUILDERS = [
'Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Release',
'Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-ASAN',
'Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-MSAN',
+ 'Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-UBSAN_float_cast_overflow',
'Perf-Ubuntu14-GCC-GCE-CPU-AVX2-x86_64-Release-CT_BENCH_1k_SKPs',
'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release',
('Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-'
diff --git a/infra/bots/recipe_modules/flavor/gn_flavor.py b/infra/bots/recipe_modules/flavor/gn_flavor.py
index 08a12be3fe..a6591b92c5 100644
--- a/infra/bots/recipe_modules/flavor/gn_flavor.py
+++ b/infra/bots/recipe_modules/flavor/gn_flavor.py
@@ -80,7 +80,7 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils):
if extra_config == 'MSAN':
args['skia_enable_gpu'] = 'false'
args['skia_use_fontconfig'] = 'false'
- if extra_config == 'ASAN':
+ if 'ASAN' in extra_config or 'UBSAN' in extra_config:
args['skia_enable_spirv_validation'] = 'false'
if extra_config == 'Mesa':
args['skia_use_mesa'] = 'true'
@@ -114,10 +114,16 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils):
if compiler == 'Clang' and 'Win' in os:
args['clang_win'] = '"%s"' % self.m.vars.slave_dir.join('clang_win')
+ sanitize = ''
+ if extra_config == 'UBSAN_float_cast_overflow':
+ sanitize = 'float-cast-overflow'
+ elif 'SAN' in extra_config:
+ sanitize = extra_config
+
for (k,v) in {
'cc': cc,
'cxx': cxx,
- 'sanitize': extra_config if 'SAN' in extra_config else '',
+ 'sanitize': sanitize,
'target_cpu': target_arch,
'target_os': 'ios' if 'iOS' in extra_config else '',
'windk': win_toolchain if 'Win' in os else '',
@@ -173,7 +179,7 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils):
elif self.m.vars.is_linux:
cmd = ['catchsegv'] + cmd
- if 'ASAN' == extra_config:
+ if 'ASAN' == extra_config or 'UBSAN' in extra_config:
env[ 'ASAN_OPTIONS'] = 'symbolize=1 detect_leaks=1'
env[ 'LSAN_OPTIONS'] = 'symbolize=1 print_suppressions=1'
env['UBSAN_OPTIONS'] = 'symbolize=1 print_stacktrace=1'