Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(214)

Unified Diff: tools/tests/bench_pictures_cfg_test.py

Issue 796813004: Remove tools/tests. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/tests/bench_pictures_cfg_test.py
diff --git a/tools/tests/bench_pictures_cfg_test.py b/tools/tests/bench_pictures_cfg_test.py
deleted file mode 100644
index 9b0e0ac89feada152c9012d7c1a5cbea0f8aca65..0000000000000000000000000000000000000000
--- a/tools/tests/bench_pictures_cfg_test.py
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright (c) 2012 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-
-"""
-Verify that the bench_pictures.cfg file is sane.
-"""
-
-
-import os
-import sys
-
-
-def ThrowIfNotAString(obj):
- """ Raise a TypeError if obj is not a string. """
- if str(obj) != obj:
- raise TypeError('%s is not a string!' % str(obj))
-
-
-def Main(argv):
- """ Verify that the bench_pictures.cfg file is sane.
-
- - Exec the file to ensure that it uses correct Python syntax.
- - Make sure that every element is a string, because the buildbot scripts will
- fail to execute if this is not the case.
-
- This test does not verify that the well-formed configs are actually valid.
- """
- vars = {'import_path': 'tools'}
- execfile(os.path.join('tools', 'bench_pictures.cfg'), vars)
- bench_pictures_cfg = vars['bench_pictures_cfg']
-
- for config_name, config_list in bench_pictures_cfg.iteritems():
- ThrowIfNotAString(config_name)
- for config in config_list:
- for key, value in config.iteritems():
- ThrowIfNotAString(key)
- if type(value).__name__ == 'list':
- for item in value:
- ThrowIfNotAString(item)
- elif not value is True:
- ThrowIfNotAString(value)
-
-if __name__ == '__main__':
- sys.exit(Main(sys.argv))
« no previous file with comments | « tools/tests/base_unittest.py ('k') | tools/tests/benchalerts/Perf-Android-Nexus7-Tegra3-Arm7-Release/expectations.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698