from __future__ import absolute_import import datetime import re from abc import ABCMeta, abstractmethod import six from mozregression import branches, errors from mozregression.class_registry import ClassRegistry from mozregression.config import ARCHIVE_BASE_URL from mozregression.dates import to_utc_timestamp # switch from fennec api-11 to api-15 on taskcluster # appeared on this date for m-c. TIMESTAMP_FENNEC_API_15 = to_utc_timestamp( datetime.datetime(2016, 1, 29, 0, 30, 13)) # switch from fennec api-15 to api-16 on taskcluster # appeared on this date for m-c. TIMESTAMP_FENNEC_API_16 = to_utc_timestamp( datetime.datetime(2017, 8, 29, 18, 28, 36)) def get_build_regex(name, os, bits, processor, psuffix="", with_ext=True): """ Returns a string regexp that can match a build filename. :param name: must be the beginning of the filename to match :param os: the os, as returned by mozinfo.os :param bits: the bits information of the build. Either 32 or 64. :param processor: the architecture of the build. Only one that alters
print REGISTRY.names() """ import re import datetime from mozregression.class_registry import ClassRegistry from mozregression import errors, branches from mozregression.dates import to_utc_timestamp from mozregression.config import ARCHIVE_BASE_URL from abc import ABCMeta, abstractmethod # after this date, the gecko v2 routes are safe # TODO: Once we are far away of this date (one year), we should # make gecko v2 routes used everywhere, and remove any other case. TIMESTAMP_GECKO_V2 = to_utc_timestamp(datetime.datetime(2015, 10, 1, 1, 1, 1)) # switch from fennec api-11 to api-15 on taskcluster # appeared on this date for m-c. TIMESTAMP_FENNEC_API_15 = to_utc_timestamp( datetime.datetime(2016, 1, 29, 0, 30, 13)) def get_build_regex(name, os, bits, psuffix='', with_ext=True): """ Returns a string regexp that can match a build filename. :param name: must be the beginning of the filename to match :param os: the os, as returned by mozinfo.os :param bits: the bits information of the build. Either 32 or 64. :param psuffix: optional suffix before the extension
import pytest from mozregression.dates import to_utc_timestamp from mozregression.fetch_configs import ( ARCHIVE_BASE_URL, TIMESTAMP_FENNEC_API_15, TIMESTAMP_FENNEC_API_16, FirefoxConfig, FirefoxL10nConfig, create_config, errors, get_build_regex, ) from mozregression.json_pushes import Push TIMESTAMP_TEST = to_utc_timestamp(datetime.datetime(2017, 11, 14, 0, 0, 0)) def create_push(chset, timestamp): return Push(1, {"changesets": [chset], "date": timestamp}) class TestFirefoxConfigLinux64(unittest.TestCase): app_name = "firefox" os = "linux" bits = 64 processor = "x86_64" build_examples = ["firefox-38.0a1.en-US.linux-x86_64.tar.bz2"] build_info_examples = ["firefox-38.0a1.en-US.linux-x86_64.txt"]
print REGISTRY.names() """ import re import datetime from mozregression.class_registry import ClassRegistry from mozregression import errors, branches from mozregression.dates import to_utc_timestamp from mozregression.config import ARCHIVE_BASE_URL from abc import ABCMeta, abstractmethod # after this date, the gecko v2 routes are safe # TODO: Once we are far away of this date (one year), we should # make gecko v2 routes used everywhere, and remove any other case. TIMESTAMP_GECKO_V2 = to_utc_timestamp(datetime.datetime(2015, 10, 1, 1, 1, 1)) # switch from fennec api-11 to api-15 on taskcluster # appeared on this date for m-c. TIMESTAMP_FENNEC_API_15 = to_utc_timestamp( datetime.datetime(2016, 1, 29, 0, 30, 13) ) def get_build_regex(name, os, bits, psuffix='', with_ext=True): """ Returns a string regexp that can match a build filename. :param name: must be the beginning of the filename to match :param os: the os, as returned by mozinfo.os :param bits: the bits information of the build. Either 32 or 64.
print REGISTRY.names() """ import re import datetime from mozregression.class_registry import ClassRegistry from mozregression import errors, branches from mozregression.dates import to_utc_timestamp NIGHTLY_BASE_URL = "https://archive.mozilla.org/pub" # after this date, the gecko v2 routes are safe # TODO: Once we are far away of this date (one year), we should # make gecko v2 routes used everywhere, and remove any other case. TIMESTAMP_GECKO_V2 = to_utc_timestamp(datetime.datetime(2015, 10, 1, 1, 1, 1)) def get_build_regex(name, os, bits, psuffix='', with_ext=True): """ Returns a string regexp that can match a build filename. :param name: must be the beginning of the filename to match :param os: the os, as returned by mozinfo.os :param bits: the bits information of the build. Either 32 or 64. :param psuffix: optional suffix before the extension :param with_ext: if True, the build extension will be appended (either .zip, .tar.bz2 or .dmg depending on the os). """ if os == "win": if bits == 64:
import unittest import datetime import re import pytest from mock import Mock from mozregression.dates import to_utc_timestamp from mozregression.json_pushes import Push from mozregression.fetch_configs import (FirefoxConfig, create_config, errors, get_build_regex, ARCHIVE_BASE_URL, TIMESTAMP_FENNEC_API_15, TIMESTAMP_FENNEC_API_16) TIMESTAMP_TEST = to_utc_timestamp( datetime.datetime(2017, 11, 14, 0, 0, 0) ) def create_push(chset, timestamp): return Mock(changeset=chset, timestamp=timestamp, spec=Push) class TestFirefoxConfigLinux64(unittest.TestCase): app_name = 'firefox' os = 'linux' bits = 64 processor = 'x86_64' build_examples = ['firefox-38.0a1.en-US.linux-x86_64.tar.bz2'] build_info_examples = ['firefox-38.0a1.en-US.linux-x86_64.txt']
print REGISTRY.names() """ import re import datetime from mozregression.class_registry import ClassRegistry from mozregression import errors, branches from mozregression.dates import to_utc_timestamp from mozregression.config import ARCHIVE_BASE_URL from abc import ABCMeta, abstractmethod # switch from fennec api-11 to api-15 on taskcluster # appeared on this date for m-c. TIMESTAMP_FENNEC_API_15 = to_utc_timestamp( datetime.datetime(2016, 1, 29, 0, 30, 13) ) # switch from fennec api-15 to api-16 on taskcluster # appeared on this date for m-c. TIMESTAMP_FENNEC_API_16 = to_utc_timestamp( datetime.datetime(2017, 8, 29, 18, 28, 36) ) def get_build_regex(name, os, bits, processor, psuffix='', with_ext=True): """ Returns a string regexp that can match a build filename. :param name: must be the beginning of the filename to match :param os: the os, as returned by mozinfo.os