diff options
author | Eric Boren <borenet@google.com> | 2017-06-28 13:50:22 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-06-28 18:46:16 +0000 |
commit | 89cd35795f7cc3042084fb14fec27102c6e67f2c (patch) | |
tree | 94c732f308d4bc2e64e9c4226cdf5fbbf53378c6 | |
parent | a4f792da37eada1dcc05c50b152e20ac36a0977c (diff) |
Fix recipes/tests for new Debian bots
Bug: skia:6612
Change-Id: I2920bb7b1aa3ebb021223ed6345f13f1f9c8bc24
Reviewed-on: https://skia-review.googlesource.com/21141
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
14 files changed, 33 insertions, 20 deletions
diff --git a/gm/textblobrandomfont.cpp b/gm/textblobrandomfont.cpp index c489bd10c8..e00b299403 100644 --- a/gm/textblobrandomfont.cpp +++ b/gm/textblobrandomfont.cpp @@ -69,7 +69,7 @@ protected: sk_sp<SkTypeface> origEmoji = sk_tool_utils::emoji_typeface(); const char* osName = sk_tool_utils::platform_os_name(); // The mac emoji string will break us - if (origEmoji && (!strcmp(osName, "Android") || !strcmp(osName, "Ubuntu"))) { + if (origEmoji && (!strcmp(osName, "Android") || !strcmp(osName, "Ubuntu") || !strcmp(osName, "Debian"))) { const char* emojiText = sk_tool_utils::emoji_sample_text(); paint.measureText(emojiText, strlen(emojiText), &bounds); offset += bounds.height(); diff --git a/infra/bots/infra_tests.py b/infra/bots/infra_tests.py index a5a26e4840..7150e0408e 100755 --- a/infra/bots/infra_tests.py +++ b/infra/bots/infra_tests.py @@ -35,9 +35,11 @@ def python_unit_tests(train): def recipe_test(train): cmd = [ - 'python', os.path.join(INFRA_BOTS_DIR, 'recipes.py'), 'test', 'run'] + 'python', os.path.join(INFRA_BOTS_DIR, 'recipes.py'), 'test'] if train: - cmd.append('--train') + cmd.append('train') + else: + cmd.append('run') return test(cmd, SKIA_DIR) diff --git a/infra/bots/recipe_modules/flavor/gn_flavor.py b/infra/bots/recipe_modules/flavor/gn_flavor.py index 0db02dc731..9e8a488297 100644 --- a/infra/bots/recipe_modules/flavor/gn_flavor.py +++ b/infra/bots/recipe_modules/flavor/gn_flavor.py @@ -41,7 +41,7 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils): extra_cflags = [] extra_ldflags = [] - if compiler == 'Clang' and os == 'Ubuntu': + if compiler == 'Clang' and self.m.vars.is_linux: cc = clang_linux + '/bin/clang' cxx = clang_linux + '/bin/clang++' extra_cflags .append('-B%s/bin' % clang_linux) @@ -101,7 +101,7 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils): args['is_component_build'] = 'true' if extra_config == 'Vulkan': args['skia_enable_vulkan_debug_layers'] = 'false' - if os == 'Ubuntu': + if self.m.vars.is_linux: args['skia_vulkan_sdk'] = '"%s"' % linux_vulkan_sdk if 'Win' in os: args['skia_vulkan_sdk'] = '"%s"' % win_vulkan_sdk @@ -154,7 +154,7 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils): if 'SAN' in extra_config: # Sanitized binaries may want to run clang_linux/bin/llvm-symbolizer. env['PATH'] = '%%(PATH)s:%s' % clang_linux + '/bin' - elif 'Ubuntu' == self.m.vars.builder_cfg.get('os', ''): + elif self.m.vars.is_linux: cmd = ['catchsegv'] + cmd if 'ASAN' == extra_config: @@ -167,7 +167,7 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils): env['LD_LIBRARY_PATH'] = clang_linux + '/msan' to_symbolize = ['dm', 'nanobench'] - if name in to_symbolize and 'Ubuntu' in self.m.vars.builder_cfg['os']: + if name in to_symbolize and self.m.vars.is_linux: # Convert path objects or placeholders into strings such that they can # be passed to symbolize_stack_trace.py args = [self.m.vars.slave_dir] + [str(x) for x in cmd] diff --git a/infra/bots/recipe_modules/vars/api.py b/infra/bots/recipe_modules/vars/api.py index 2c23f7af85..da11651802 100644 --- a/infra/bots/recipe_modules/vars/api.py +++ b/infra/bots/recipe_modules/vars/api.py @@ -143,6 +143,10 @@ class SkiaVarsApi(recipe_api.RecipeApi): self.chromeos_homedir = '/home/chronos/user/' @property + def is_linux(self): + return 'Ubuntu' in self.builder_name or 'Debian' in self.builder_name + + @property def upload_dm_results(self): # TODO(borenet): Move this into the swarm_test recipe. skip_upload_bots = [ diff --git a/infra/bots/recipe_modules/vars/examples/full.py b/infra/bots/recipe_modules/vars/examples/full.py index be15b063a8..eeddfd72f7 100644 --- a/infra/bots/recipe_modules/vars/examples/full.py +++ b/infra/bots/recipe_modules/vars/examples/full.py @@ -17,7 +17,8 @@ def RunSteps(api): api.vars.swarming_bot_id, api.vars.swarming_task_id, ] - assert len(info) == 4 # Make pylint happy. + if api.vars.is_linux: + assert len(info) == 4 # Make pylint happy. TEST_BUILDERS = [ diff --git a/infra/bots/recipes/perf.expected/Perf-Ubuntu16-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-Vulkan.json b/infra/bots/recipes/perf.expected/Perf-Ubuntu16-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-Vulkan.json index 5978c31a54..9a49084bc3 100644 --- a/infra/bots/recipes/perf.expected/Perf-Ubuntu16-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-Vulkan.json +++ b/infra/bots/recipes/perf.expected/Perf-Ubuntu16-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-Vulkan.json @@ -117,6 +117,7 @@ "-u", "RECIPE_MODULE[skia::flavor]/resources/symbolize_stack_trace.py", "[START_DIR]", + "catchsegv", "[START_DIR]/out/Debug/nanobench", "--undefok", "-i", diff --git a/infra/bots/recipes/perf.expected/Perf-Ubuntu16-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release.json b/infra/bots/recipes/perf.expected/Perf-Ubuntu16-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release.json index 909bc17ce3..86344c029b 100644 --- a/infra/bots/recipes/perf.expected/Perf-Ubuntu16-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release.json +++ b/infra/bots/recipes/perf.expected/Perf-Ubuntu16-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release.json @@ -153,6 +153,7 @@ "-u", "RECIPE_MODULE[skia::flavor]/resources/symbolize_stack_trace.py", "[START_DIR]", + "catchsegv", "[START_DIR]/out/Release/nanobench", "--undefok", "-i", diff --git a/infra/bots/recipes/perf.py b/infra/bots/recipes/perf.py index f7f6dba44a..3e8e78e11a 100644 --- a/infra/bots/recipes/perf.py +++ b/infra/bots/recipes/perf.py @@ -26,7 +26,7 @@ DEPS = [ ] -def nanobench_flags(bot): +def nanobench_flags(api, bot): args = ['--pre_log'] if 'GPU' in bot: @@ -74,7 +74,7 @@ def nanobench_flags(bot): # We want to test both the OpenGL config and the GLES config on Linux Intel: # GL is used by Chrome, GLES is used by ChromeOS. - if 'Intel' in bot and 'Ubuntu' in bot: + if 'Intel' in bot and api.vars.is_linux: configs.append('gles') # Bench instanced rendering on a limited number of platforms @@ -148,7 +148,7 @@ def nanobench_flags(bot): match.append('~text_16_LCD_BK') match.append('~text_16_LCD_FF') match.append('~text_16_LCD_WT') - if 'Intel' in bot and 'Ubuntu' in bot and not 'Vulkan' in bot: + if ('Intel' in bot and api.vars.is_linux and not 'Vulkan' in bot): # TODO(dogben): Track down what's causing bots to die. verbose = True if 'Vulkan' in bot and 'NexusPlayer' in bot: @@ -241,7 +241,7 @@ def perf_steps(api): skip_flag = '--nocpu' if skip_flag: args.append(skip_flag) - args.extend(nanobench_flags(api.vars.builder_name)) + args.extend(nanobench_flags(api, api.vars.builder_name)) if 'Chromecast' in api.vars.builder_cfg.get('os', ''): # Due to limited disk space, run a watered down perf run on Chromecast. diff --git a/infra/bots/recipes/test.expected/Test-Ubuntu16-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Debug.json b/infra/bots/recipes/test.expected/Test-Ubuntu16-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Debug.json index 7ca47b5d2b..23c85cde91 100644 --- a/infra/bots/recipes/test.expected/Test-Ubuntu16-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Debug.json +++ b/infra/bots/recipes/test.expected/Test-Ubuntu16-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Debug.json @@ -225,6 +225,7 @@ "-u", "RECIPE_MODULE[skia::flavor]/resources/symbolize_stack_trace.py", "[START_DIR]", + "catchsegv", "[START_DIR]/out/Debug/dm", "--undefok", "--resourcePath", diff --git a/infra/bots/recipes/test.expected/Test-Ubuntu16-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-Vulkan.json b/infra/bots/recipes/test.expected/Test-Ubuntu16-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-Vulkan.json index 9d718f86a6..6a3e84ce3c 100644 --- a/infra/bots/recipes/test.expected/Test-Ubuntu16-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-Vulkan.json +++ b/infra/bots/recipes/test.expected/Test-Ubuntu16-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-Vulkan.json @@ -225,6 +225,7 @@ "-u", "RECIPE_MODULE[skia::flavor]/resources/symbolize_stack_trace.py", "[START_DIR]", + "catchsegv", "[START_DIR]/out/Debug/dm", "--undefok", "--resourcePath", diff --git a/infra/bots/recipes/test.expected/Test-Ubuntu16-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release.json b/infra/bots/recipes/test.expected/Test-Ubuntu16-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release.json index b87a0e46fe..227bb7e215 100644 --- a/infra/bots/recipes/test.expected/Test-Ubuntu16-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release.json +++ b/infra/bots/recipes/test.expected/Test-Ubuntu16-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release.json @@ -225,6 +225,7 @@ "-u", "RECIPE_MODULE[skia::flavor]/resources/symbolize_stack_trace.py", "[START_DIR]", + "catchsegv", "[START_DIR]/out/Release/dm", "--undefok", "--resourcePath", diff --git a/infra/bots/recipes/test.expected/Test-Ubuntu16-Clang-NUCDE3815TYKHE-GPU-IntelBayTrail-x86_64-Debug.json b/infra/bots/recipes/test.expected/Test-Ubuntu16-Clang-NUCDE3815TYKHE-GPU-IntelBayTrail-x86_64-Debug.json index 5dac6192a4..b3f0b33414 100644 --- a/infra/bots/recipes/test.expected/Test-Ubuntu16-Clang-NUCDE3815TYKHE-GPU-IntelBayTrail-x86_64-Debug.json +++ b/infra/bots/recipes/test.expected/Test-Ubuntu16-Clang-NUCDE3815TYKHE-GPU-IntelBayTrail-x86_64-Debug.json @@ -225,6 +225,7 @@ "-u", "RECIPE_MODULE[skia::flavor]/resources/symbolize_stack_trace.py", "[START_DIR]", + "catchsegv", "[START_DIR]/out/Debug/dm", "--undefok", "--resourcePath", diff --git a/infra/bots/recipes/test.py b/infra/bots/recipes/test.py index b05ea5fa71..e2a42d98c2 100644 --- a/infra/bots/recipes/test.py +++ b/infra/bots/recipes/test.py @@ -24,7 +24,7 @@ DEPS = [ ] -def dm_flags(bot): +def dm_flags(api, bot): args = [] # This enables non-deterministic random seeding of the GPU FP optimization @@ -103,7 +103,7 @@ def dm_flags(bot): # We want to test both the OpenGL config and the GLES config on Linux Intel: # GL is used by Chrome, GLES is used by ChromeOS. - if 'Intel' in bot and 'Ubuntu' in bot: + if 'Intel' in bot and api.vars.is_linux: configs.extend(['gles', 'glesdft', 'glessrgb']) # NP is running out of RAM when we run all these modes. skia:3255 @@ -442,10 +442,10 @@ def dm_flags(bot): '~bitmapfilters', # skia:6132 '~GrContextFactory_abandon']) #skia:6209 - if 'Vulkan' in bot and 'IntelIris540' in bot and 'Ubuntu' in bot: + if 'Vulkan' in bot and 'IntelIris540' in bot and api.vars.is_linux: match.extend(['~VkHeapTests']) # skia:6245 - if 'Intel' in bot and 'Ubuntu' in bot and not 'Vulkan' in bot: + if 'Intel' in bot and api.vars.is_linux and not 'Vulkan' in bot: # TODO(dogben): Track down what's causing bots to die. verbose = True @@ -530,7 +530,7 @@ def dm_flags(bot): # skia:6141 blacklist([config, 'gm', '_', 'discard']) - if 'IntelBayTrail' in bot and 'Ubuntu' in bot: + if 'IntelBayTrail' in bot and api.vars.is_linux: match.append('~ImageStorageLoad') # skia:6358 if 'Ci20' in bot: @@ -700,7 +700,7 @@ def test_steps(api): skip_flag = '--nocpu' if skip_flag: args.append(skip_flag) - args.extend(dm_flags(api.vars.builder_name)) + args.extend(dm_flags(api, api.vars.builder_name)) env = {} if 'Ubuntu16' in api.vars.builder_name: diff --git a/tools/sk_tool_utils.cpp b/tools/sk_tool_utils.cpp index c792c48475..ba1f534cd1 100644 --- a/tools/sk_tool_utils.cpp +++ b/tools/sk_tool_utils.cpp @@ -90,7 +90,7 @@ const char* platform_font_name(const char* name) { if (platform.equals("Win")) { return gStandardFontNames[2][index]; } - if (platform.equals("Ubuntu")) { + if (platform.equals("Ubuntu") || platform.equals("Debian")) { return gStandardFontNames[3][index]; } if (platform.equals("Android")) { @@ -104,7 +104,7 @@ const char* platform_font_name(const char* name) { const char* platform_os_emoji() { const char* osName = platform_os_name(); - if (!strcmp(osName, "Android") || !strcmp(osName, "Ubuntu")) { + if (!strcmp(osName, "Android") || !strcmp(osName, "Ubuntu") || !strcmp(osName, "Debian")) { return "CBDT"; } if (!strncmp(osName, "Mac", 3) || !strncmp(osName, "iOS", 3)) { |