def _setup(self, testitem): if config.skip_build: return command = [ 'scons', '-C', self.directory, '-j', str(config.threads), '--ignore-style', '--no-compress-debug' ] if not self.targets: log.test_log.warn('No SCons targets specified, this will' ' build the default all target.\n' 'This is likely unintended, and you' ' may wish to kill testlib and reconfigure.') else: log.test_log.message('Building the following targets.' ' This may take a while.') log.test_log.message('%s' % (', '.join(self.targets))) log.test_log.message("You may want to run with only a single ISA" "(--isa=), use --skip-build, or use 'rerun'.") command.extend(self.targets) if self.options: command.extend(self.options) log_call(log.test_log, command, time=None, stderr=sys.stderr)
def setup(self, testitem): if config.skip_build: return command = [ 'scons', '-C', self.directory, '-j', str(self.threads), '--ignore-style' ] if not self.targets: log.test_log.warn( 'No SCons targets specified, this will' ' build the default all target.\n' 'This is likely unintended, and you' ' may wish to kill testlib and reconfigure.') else: log.test_log.message( 'Building the following targets.' ' This may take a while.') log.test_log.message('%s' % (', '.join(self.targets))) log.test_log.message( "You may want to run with only a single ISA" "(--isa=), use --skip-build, or use 'rerun'.") command.extend(self.targets) if self.options: command.extend(self.options) log_call(log.test_log, command)
def test_run_gem5(params): ''' Simple \'test\' which runs gem5 and saves the result into a tempdir. NOTE: Requires fixtures: tempdir, gem5 ''' fixtures = params.fixtures if gem5_args is None: _gem5_args = tuple() elif isinstance(gem5_args, str): # If just a single str, place it in an iterable _gem5_args = (gem5_args, ) else: _gem5_args = gem5_args # FIXME/TODO: I don't like the idea of having to modify this test run # or always collect results even if not using a verifier. There should # be some configuration in here that only gathers certain results for # certain verifiers. # # I.E. Only the returncode verifier will use the gem5_returncode # fixture, but we always require it even if that verifier isn't being # ran. tempdir = fixtures[constants.tempdir_fixture_name].path gem5 = fixtures[constants.gem5_binary_fixture_name].path command = [ gem5, '-d', # Set redirect dir to tempdir. tempdir, '-re', # TODO: Change to const. Redirect stdout and stderr '--silent-redirect', ] command.extend(_gem5_args) command.append(config) # Config_args should set up the program args. command.extend(config_args) log_call(params.log, command, time=params.time, stdout=sys.stdout, stderr=sys.stderr)
def test_run_gem5(params): ''' Simple \'test\' which runs gem5 and saves the result into a tempdir. NOTE: Requires fixtures: tempdir, gem5 ''' fixtures = params.fixtures if gem5_args is None: _gem5_args = tuple() elif isinstance(gem5_args, str): # If just a single str, place it in an iterable _gem5_args = (gem5_args,) else: _gem5_args = gem5_args # FIXME/TODO: I don't like the idea of having to modify this test run # or always collect results even if not using a verifier. There should # be some configuration in here that only gathers certain results for # certain verifiers. # # I.E. Only the returncode verifier will use the gem5_returncode # fixture, but we always require it even if that verifier isn't being # ran. returncode = fixtures[constants.gem5_returncode_fixture_name] tempdir = fixtures[constants.tempdir_fixture_name].path gem5 = fixtures[constants.gem5_binary_fixture_name].path command = [ gem5, '-d', # Set redirect dir to tempdir. tempdir, '-re',# TODO: Change to const. Redirect stdout and stderr ] command.extend(_gem5_args) command.append(config) # Config_args should set up the program args. command.extend(config_args) returncode.value = log_call(params.log, command)
def setup(self): super(MakeFixture, self).setup() targets = set(self.required_by) command = ['make', '-C', self.directory] command.extend([target.target for target in targets]) log_call(log.test_log, command, time=None, stderr=sys.stderr)
def setup(self): super(MakeFixture, self).setup() targets = set(self.required_by) command = ['make', '-C', self.directory] command.extend([target.target for target in targets]) log_call(command)
def setup(self): super(MakeFixture, self).setup() targets = set(self.required_by) command = ['make', '-C', self.directory] command.extend([target.target for target in targets]) log_call(command)