Пример #1
0
    def __call__(self):

        # platform
        machine = self.test_machine()

        # build information
        browser_config = self.results.browser_config

        # a place to put results
        res = DatazillaResult()

        for test in self.results.results:
            suite = "%s" % test.name()
            res.add_testsuite(suite, options=self.run_options(test))

            # serialize test results
            results = {}
            if not test.using_xperf:
                for result in test.results:
                    # XXX this will not work for manifests which list
                    # the same page name twice. It also ignores cycles
                    for page, val in result.raw_values():
                        if page == 'NULL':
                            results.setdefault(test.name(), []).extend(val)
                        else:
                            results.setdefault(page, []).extend(val)
                for result, values in results.items():
                    res.add_test_results(suite, result, values)

                # counters results_aux data
                for cd in test.all_counter_results:
                    for name, vals in cd.items():
                        res.add_talos_auxiliary(suite, name, vals)
            else:
                # specific xperf_aux data
                for cd in test.all_counter_results:
                    for name, vals in cd.items():
                        res.add_xperf_results(suite, name, vals)

        # make a datazilla test result collection
        collection = DatazillaResultsCollection(
            machine_name=machine['name'],
            os=machine['os'],
            os_version=machine['osversion'],
            platform=machine['platform'],
            build_name=browser_config['browser_name'],
            version=browser_config['browser_version'],
            revision=browser_config['sourcestamp'],
            branch=browser_config['branch_name'],
            id=browser_config['buildid'],
            test_date=self.results.date)
        collection.add_datazilla_result(res)
        return collection
Пример #2
0
    def __call__(self):

        # platform
        machine = self.test_machine()

        # build information
        browser_config = self.results.browser_config

        # a place to put results
        res = DatazillaResult()

        for test in self.results.results:
            suite = "%s" % test.name()
            res.add_testsuite(suite, options=self.run_options(test))

            # serialize test results
            results = {}
            if not test.using_xperf:
                for result in test.results:
                    # XXX this will not work for manifests which list
                    # the same page name twice. It also ignores cycles
                    for page, val in result.raw_values():
                        if page == 'NULL':
                            results.setdefault(test.name(), []).extend(val)
                        else:
                            results.setdefault(page, []).extend(val)
                for result, values in results.items():
                    res.add_test_results(suite, result, values)

                # counters results_aux data
                for cd in test.all_counter_results:
                    for name, vals in cd.items():
                        res.add_talos_auxiliary(suite, name, vals)
            else:
                # specific xperf_aux data
                for cd in test.all_counter_results:
                    for name, vals in cd.items():
                        res.add_xperf_results(suite, name, vals)

        # make a datazilla test result collection
        collection = DatazillaResultsCollection(machine_name=machine['name'],
                                                os=machine['os'],
                                                os_version=machine['osversion'],
                                                platform=machine['platform'],
                                                build_name=browser_config['browser_name'],
                                                version=browser_config['browser_version'],
                                                revision=browser_config['sourcestamp'],
                                                branch=browser_config['branch_name'],
                                                id=browser_config['buildid'],
                                                test_date=self.results.date)
        collection.add_datazilla_result(res)
        return collection
 def test_add_talos_auxiliary(self):
     """Can add auxiliary results to a suite"""
     res = DatazillaResult()
     res.add_talos_auxiliary("suite", "name", [1, 2, 3])
     self.assertEqual(res.talos_aux, {"suite": {"name": [1, 2, 3]}})
Пример #4
0
 def test_add_talos_auxiliary(self):
     """Can add auxiliary results to a suite"""
     res = DatazillaResult()
     res.add_talos_auxiliary("suite", "name", [1, 2, 3])
     self.assertEqual(res.talos_aux, {"suite": {"name": [1, 2, 3]}})