Exemplo n.º 1
0
 def test_fetch(self):
   """Tests fetch() of GM results from actual-results.json ."""
   downloader = download_actuals.Download(
       actuals_base_url=url_utils.create_filepath_url(
           os.path.join(self._input_dir, 'gm-actuals')),
       gm_actuals_root_url=url_utils.create_filepath_url(
           os.path.join(self._input_dir, 'fake-gm-imagefiles')))
   downloader.fetch(
       builder_name='Test-Android-GalaxyNexus-SGX540-Arm7-Release',
       dest_dir=self._output_dir_actual)
Exemplo n.º 2
0
 def test_fetch(self):
     """Tests fetch() of GM results from actual-results.json ."""
     downloader = download_actuals.Download(
         actuals_base_url=url_utils.create_filepath_url(
             os.path.join(self._input_dir, 'gm-actuals')),
         gm_actuals_root_url=url_utils.create_filepath_url(
             os.path.join(self._input_dir, 'fake-gm-imagefiles')))
     downloader.fetch(
         builder_name='Test-Android-GalaxyNexus-SGX540-Arm7-Release',
         dest_dir=self._output_dir_actual)
Exemplo n.º 3
0
 def __init__(self, configs, actuals_root=results.DEFAULT_ACTUALS_DIR,
              generated_images_root=results.DEFAULT_GENERATED_IMAGES_ROOT,
              diff_base_url=None, builder_regex_list=None):
   """
   Args:
     configs: (string, string) tuple; pair of configs to compare
     actuals_root: root directory containing all actual-results.json files
     generated_images_root: directory within which to create all pixel diffs;
         if this directory does not yet exist, it will be created
     diff_base_url: base URL within which the client should look for diff
         images; if not specified, defaults to a "file:///" URL representation
         of generated_images_root
     builder_regex_list: List of regular expressions specifying which builders
         we will process. If None, process all builders.
   """
   time_start = int(time.time())
   if builder_regex_list != None:
     self.set_match_builders_pattern_list(builder_regex_list)
   self._image_diff_db = imagediffdb.ImageDiffDB(generated_images_root)
   self._diff_base_url = (
       diff_base_url or
       url_utils.create_filepath_url(generated_images_root))
   self._actuals_root = actuals_root
   self._load_config_pairs(configs)
   self._timestamp = int(time.time())
   logging.info('Results complete; took %d seconds.' %
                (self._timestamp - time_start))
Exemplo n.º 4
0
 def __init__(self,
              configs,
              actuals_root=results.DEFAULT_ACTUALS_DIR,
              generated_images_root=results.DEFAULT_GENERATED_IMAGES_ROOT,
              diff_base_url=None,
              builder_regex_list=None):
     """
 Args:
   configs: (string, string) tuple; pair of configs to compare
   actuals_root: root directory containing all actual-results.json files
   generated_images_root: directory within which to create all pixel diffs;
       if this directory does not yet exist, it will be created
   diff_base_url: base URL within which the client should look for diff
       images; if not specified, defaults to a "file:///" URL representation
       of generated_images_root
   builder_regex_list: List of regular expressions specifying which builders
       we will process. If None, process all builders.
 """
     time_start = int(time.time())
     if builder_regex_list != None:
         self.set_match_builders_pattern_list(builder_regex_list)
     self._image_diff_db = imagediffdb.ImageDiffDB(generated_images_root)
     self._diff_base_url = (
         diff_base_url
         or url_utils.create_filepath_url(generated_images_root))
     self._actuals_root = actuals_root
     self._load_config_pairs(configs)
     self._timestamp = int(time.time())
     logging.info('Results complete; took %d seconds.' %
                  (self._timestamp - time_start))
Exemplo n.º 5
0
 def __init__(self, subdirs, actuals_root,
              generated_images_root=results.DEFAULT_GENERATED_IMAGES_ROOT,
              image_base_url=DEFAULT_IMAGE_BASE_URL,
              diff_base_url=None):
   """
   Args:
     actuals_root: root directory containing all render_pictures-generated
         JSON files
     subdirs: (string, string) tuple; pair of subdirectories within
         actuals_root to compare
     generated_images_root: directory within which to create all pixel diffs;
         if this directory does not yet exist, it will be created
     image_base_url: URL under which all render_pictures result images can
         be found; this will be used to read images for comparison within
         this code, and included in the ImagePairSet so its consumers know
         where to download the images from
     diff_base_url: base URL within which the client should look for diff
         images; if not specified, defaults to a "file:///" URL representation
         of generated_images_root
   """
   time_start = int(time.time())
   self._image_diff_db = imagediffdb.ImageDiffDB(generated_images_root)
   self._image_base_url = image_base_url
   self._diff_base_url = (
       diff_base_url or
       url_utils.create_filepath_url(generated_images_root))
   self._load_result_pairs(actuals_root, subdirs)
   self._timestamp = int(time.time())
   logging.info('Results complete; took %d seconds.' %
                (self._timestamp - time_start))
 def __init__(
     self,
     subdirs,
     actuals_root,
     generated_images_root=results.DEFAULT_GENERATED_IMAGES_ROOT,
     image_base_url=DEFAULT_IMAGE_BASE_URL,
     diff_base_url=None,
 ):
     """
 Args:
   actuals_root: root directory containing all render_pictures-generated
       JSON files
   subdirs: (string, string) tuple; pair of subdirectories within
       actuals_root to compare
   generated_images_root: directory within which to create all pixel diffs;
       if this directory does not yet exist, it will be created
   image_base_url: URL under which all render_pictures result images can
       be found; this will be used to read images for comparison within
       this code, and included in the ImagePairSet so its consumers know
       where to download the images from
   diff_base_url: base URL within which the client should look for diff
       images; if not specified, defaults to a "file:///" URL representation
       of generated_images_root
 """
     time_start = int(time.time())
     self._image_diff_db = imagediffdb.ImageDiffDB(generated_images_root)
     self._image_base_url = image_base_url
     self._diff_base_url = diff_base_url or url_utils.create_filepath_url(generated_images_root)
     self._load_result_pairs(actuals_root, subdirs)
     self._timestamp = int(time.time())
     logging.info("Results complete; took %d seconds." % (self._timestamp - time_start))
 def __init__(self, actuals_root=results.DEFAULT_ACTUALS_DIR,
              expected_root=DEFAULT_EXPECTATIONS_DIR,
              ignore_failures_file=DEFAULT_IGNORE_FAILURES_FILE,
              generated_images_root=results.DEFAULT_GENERATED_IMAGES_ROOT,
              diff_base_url=None, builder_regex_list=None):
   """
   Args:
     actuals_root: root directory containing all actual-results.json files
     expected_root: root directory containing all expected-results.json files
     ignore_failures_file: if a file with this name is found within
         expected_root, ignore failures for any tests listed in the file
     generated_images_root: directory within which to create all pixel diffs;
         if this directory does not yet exist, it will be created
     diff_base_url: base URL within which the client should look for diff
         images; if not specified, defaults to a "file:///" URL representation
         of generated_images_root
     builder_regex_list: List of regular expressions specifying which builders
         we will process. If None, process all builders.
   """
   time_start = int(time.time())
   if builder_regex_list != None:
     self.set_match_builders_pattern_list(builder_regex_list)
   self._image_diff_db = imagediffdb.ImageDiffDB(generated_images_root)
   self._diff_base_url = (
       diff_base_url or
       url_utils.create_filepath_url(generated_images_root))
   self._actuals_root = actuals_root
   self._expected_root = expected_root
   self._ignore_failures_on_these_tests = []
   if ignore_failures_file:
     self._ignore_failures_on_these_tests = (
         ExpectationComparisons._read_noncomment_lines(
             os.path.join(expected_root, ignore_failures_file)))
   self._load_actual_and_expected()
   self._timestamp = int(time.time())
   logging.info('Results complete; took %d seconds.' %
                (self._timestamp - time_start))