When users are using 'build only flag' (switch -O) and test do not have specified peripherals (muts.json file is just empty dictionary) we can allow test building by default. This supposed to be Yotta related improvement.

pull/692/head
Przemek Wirkus 2014-11-12 18:01:44 +00:00
parent 225942364e
commit 858196ffff
2 changed files with 14 additions and 8 deletions

View File

@ -143,16 +143,16 @@ if __name__ == '__main__':
parser.print_help()
exit(-1)
# Only prints read MUTs configuration
if MUTs and opts.verbose_test_configuration_only:
if opts.verbose_test_configuration_only:
print "MUTs configuration in %s:"% opts.muts_spec_filename
print print_muts_configuration_from_json(MUTs)
if MUTs:
print print_muts_configuration_from_json(MUTs)
print
print "Test specification in %s:"% opts.test_spec_filename
print print_test_configuration_from_json(test_spec)
if test_spec:
print print_test_configuration_from_json(test_spec)
exit(0)
# Verbose test specification and MUTs configuration
if MUTs and opts.verbose:
print print_muts_configuration_from_json(MUTs)

View File

@ -370,10 +370,16 @@ class SingleTestRunner(object):
continue
if test.automated and test.is_supported(target, toolchain):
if not self.is_peripherals_available(target, test.peripherals):
if test.peripherals is None and self.opts_only_build_tests:
# When users are using 'build only flag' and test do not have
# specified peripherals we can allow test building by default
pass
elif not self.is_peripherals_available(target, test.peripherals):
if self.opts_verbose_skipped_tests:
test_peripherals = test.peripherals if test.peripherals else []
print self.logger.log_line(self.logger.LogType.INFO, 'Peripheral %s test skipped for target %s'% (",".join(test_peripherals), target))
if test.peripherals:
print self.logger.log_line(self.logger.LogType.INFO, 'Peripheral %s test skipped for target %s'% (",".join(test.peripherals), target))
else:
print self.logger.log_line(self.logger.LogType.INFO, 'Test %s skipped for target %s'% (test_id, target))
test_suite_properties['skipped'].append(test_id)
continue