コード例 #1
0
ファイル: __init__.py プロジェクト: ElessarWebb/dummy
	def load_results( self, commit=git.describe(), targets=[ config.DEFAULT_TARGET ], tests=[] ):
		""" Load results based on the passed commit, targets and tests
		"""
		# append new targets to the target list
		self.targets += [ t for t in targets if t not in self.targets ]

		for target in targets:
			config.set_target( target )

			for test in tests:
				try:
					self.add_result( JsonStorageProvider.load( commit, target, test ))
					logger.debug( "Found result: %s, %s, %s" % ( commit, target, test ))
				except ValueError as e:
					logger.error( "No test results exists yet for test `%s`" % test.name )
コード例 #2
0
def run( args ):
	# discover the tests and targets we need to run
	targets = argparser.discover_targets( args )
	tests = argparser.discover_tests( args )

	# run every target
	# this way we make sure the configuration is set correctly
	# during the whole execution of the program
	for i, t in enumerate( targets, 1 ):
		config.set_target( t )

		# create the runner
		runner = Runner()
		for test in tests:
			runner.add_test( test )

		logger.info( "Running tests for target `%s` [%d/%d]" % ( t, i, len( targets )))
		logger.info( 80*"=" )

		runner.run( store=(not args.dryrun), target=t, commit=args.commit )
コード例 #3
0
    def load_results(self,
                     commit=git.describe(),
                     targets=[config.DEFAULT_TARGET],
                     tests=[]):
        """ Load results based on the passed commit, targets and tests
		"""
        # append new targets to the target list
        self.targets += [t for t in targets if t not in self.targets]

        for target in targets:
            config.set_target(target)

            for test in tests:
                try:
                    self.add_result(
                        JsonStorageProvider.load(commit, target, test))
                    logger.debug("Found result: %s, %s, %s" %
                                 (commit, target, test))
                except ValueError as e:
                    logger.error("No test results exists yet for test `%s`" %
                                 test.name)