From e4bc5240262bbf09c8a7020c7ea74140ee602c0b Mon Sep 17 00:00:00 2001 From: Gregory Szorc Date: Wed, 18 May 2016 11:56:14 -0700 Subject: [PATCH] Bug 1272176 - Move performance artifact schema into mozharness directory; r=wlach Currently, only Talos accesses this file. An uncoming commit will add a non-Talos consumer. Enable all mozharness consumers to access the file by including it in the mozharness directory (previously it was part of the Talos test archive). MozReview-Commit-ID: ADlCj9E5BwC --HG-- rename : testing/talos/treeherder-schemas/performance-artifact.json => testing/mozharness/external_tools/performance-artifact-schema.json extra : rebase_source : ce5fcaf700941ce260c97c6daeefa07b4ef5e617 --- .../external_tools/performance-artifact-schema.json} | 0 testing/mozharness/mozharness/mozilla/testing/talos.py | 9 +++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) rename testing/{talos/treeherder-schemas/performance-artifact.json => mozharness/external_tools/performance-artifact-schema.json} (100%) diff --git a/testing/talos/treeherder-schemas/performance-artifact.json b/testing/mozharness/external_tools/performance-artifact-schema.json similarity index 100% rename from testing/talos/treeherder-schemas/performance-artifact.json rename to testing/mozharness/external_tools/performance-artifact-schema.json diff --git a/testing/mozharness/mozharness/mozilla/testing/talos.py b/testing/mozharness/mozharness/mozilla/testing/talos.py index 2dbe663d5e00..39aac8878697 100755 --- a/testing/mozharness/mozharness/mozilla/testing/talos.py +++ b/testing/mozharness/mozharness/mozilla/testing/talos.py @@ -25,6 +25,11 @@ from mozharness.mozilla.testing.errors import TinderBoxPrintRe from mozharness.mozilla.buildbot import TBPL_SUCCESS, TBPL_WORST_LEVEL_TUPLE from mozharness.mozilla.buildbot import TBPL_RETRY, TBPL_FAILURE, TBPL_WARNING +external_tools_path = os.path.join( + os.path.abspath(os.path.dirname(os.path.dirname(mozharness.__file__))), + 'external_tools', +) + TalosErrorList = PythonErrorList + [ {'regex': re.compile(r'''run-as: Package '.*' is unknown'''), 'level': DEBUG}, {'substr': r'''FAIL: Graph server unreachable''', 'level': CRITICAL}, @@ -340,8 +345,8 @@ class Talos(TestingMixin, MercurialScript, BlobUploadMixin): parser.update_worst_log_and_tbpl_levels(WARNING, TBPL_WARNING) return - schema_path = os.path.join(self.talos_path, 'treeherder-schemas', - 'performance-artifact.json') + schema_path = os.path.join(external_tools_path, + 'performance-artifact-schema.json') self.info("Validating PERFHERDER_DATA against %s" % schema_path) try: with open(schema_path) as f: