From a380aef43e7b442abc38bf963035b49a2deee7f2 Mon Sep 17 00:00:00 2001 From: "morgamic%mozilla.com" Date: Thu, 13 Sep 2007 19:17:12 +0000 Subject: [PATCH] Checking in schema 3 handling and accompanying tests. r=preed, bug 368117. git-svn-id: svn://10.0.0.236/trunk@235949 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/aus/tests/Verify.py | 7 ++++++- mozilla/webtools/aus/tests/Verify.txt | 11 ++++++++++- mozilla/webtools/aus/xml/index.php | 11 +++++++++++ 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/mozilla/webtools/aus/tests/Verify.py b/mozilla/webtools/aus/tests/Verify.py index 6c012a85d85..2f8d11e5f1e 100755 --- a/mozilla/webtools/aus/tests/Verify.py +++ b/mozilla/webtools/aus/tests/Verify.py @@ -27,6 +27,8 @@ class Verify(ColumnFixture): "partial": "String", "updateType": "String", "osVersion": "String", + "dist": "String", + "distVersion": "String", "licenseUrl": "String", "lastURI": "String", "newURI": "String", @@ -49,6 +51,8 @@ class Verify(ColumnFixture): self.platform = "" self.locale = "" self.osVersion = "" + self.dist = "" + self.distVersion = "" # For storign the last retrieved AUS XML and its URI. self.lastURI = "" @@ -131,7 +135,8 @@ class Verify(ColumnFixture): if (self.osVersion != "NULL"): return '/'.join((self.host, self.updateVersion, self.product, self.version, \ self.build, self.platform, self.locale, \ - self.channel, self.osVersion, "update.xml")) + self.channel, self.osVersion, self.dist, \ + self.distVersion, "update.xml")) else: return '/'.join((self.host, self.updateVersion, self.product, self.version, \ self.build, self.platform, self.locale, \ diff --git a/mozilla/webtools/aus/tests/Verify.txt b/mozilla/webtools/aus/tests/Verify.txt index 9592a667668..e135adcdbe7 100644 --- a/mozilla/webtools/aus/tests/Verify.txt +++ b/mozilla/webtools/aus/tests/Verify.txt @@ -8,6 +8,8 @@ !define platform {platform} !define locale {locale} !define osVersion {osVersion} +!define dist {dist} +!define distVersion {distVersion} !1 Patches 1 only a complete @@ -65,7 +67,6 @@ 1 should serve update if build version in uri is newer than build version in *.txt 2 should serve update if build version in uri is newer than build version in *.txt, fallback channel 3 should serve update if build version in uri is older than build version in *.txt if using release datasource - |aus.Verify|${host}|${updateVersion}|${product}|${version}|${platform}|${locale}|${osVersion}| |build|channel|complete|partial|hasUpdate?|hasComplete?|hasPartial?|isValidXml?| |7000000001|channel|complete|partial|true|true|true|true| @@ -76,6 +77,7 @@ 2 should serve update, regardless of build ID in url or *.txt, if using the release datasource 3 should serve update if build version in uri is older than build version in *.txt if using release datasource and channel is nightly |aus.Verify|${host}|1|${product}|${version}|${platform}|${locale}|NULL| +|build|channel|complete|partial|hasUpdate?|hasComplete?|hasPartial?|isValidXml?| |7000000001|nightly|complete|partial|false|false|false|true| |7000000002|nightly|complete|partial|true|true|true|true| |7000000003|nightly|complete|partial|true|true|true|true| @@ -110,3 +112,10 @@ |1.5.0.5|1100000003|nightly|complete|partial|false|false|false|true| |6.0|1100000001|nightly|complete|partial|false|false|false|true| +!1 Dist URLs + 1 complete update works with schema 3 + 2 complete and partial update works with schema 3 +|aus.Verify|${host}|3|${product}|${version}|${platform}|${locale}|${osVersion}| +|build|channel|complete|partial|hasUpdate?|hasComplete?|hasPartial?|isValidXml?| +|1000000001|channel|complete001|partial001|true|true|false|true| +|1000000002|channel|complete002|partial002|true|true|true|true| diff --git a/mozilla/webtools/aus/xml/index.php b/mozilla/webtools/aus/xml/index.php index d0c11d43078..240adf06c24 100644 --- a/mozilla/webtools/aus/xml/index.php +++ b/mozilla/webtools/aus/xml/index.php @@ -103,6 +103,17 @@ $clean['locale'] = isset($path[5]) ? trim($path[5]) : null; */ switch ($clean['updateVersion']) { + /* + * This is for the fourth revision, adding %DISTRIBUTION% and + * %DISTRIBUTION_VERSION%. + * /update/3/%PRODUCT%/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/update.xml + */ + case 3: + // Parse out dist information. For now, though, we aren't doing + // anything with it. + $clean['dist'] = isset($path[8]) ? trim($path[8]) : null; + $clean['distVersion'] = isset($path[9]) ? trim($path[9]) : null; + /* * This is for the third revision of the URI schema, with %OS_VERSION%. * /update2/2/%PRODUCT%/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/update.xml