outputdir = None
logtofile = True
keepbuilds = False
+ jlevel = None
def show_msg(self, msg):
print "{} {:40s} {}".format(datetime.datetime.now().strftime("%H:%M:%S"),
self.builddir = os.path.join(self.__class__.outputdir, self.testname)
self.emulator = None
self.show_msg("Starting")
- self.b = Builder(self.__class__.config, self.builddir, self.logtofile)
+ config = self.__class__.config
+ if self.jlevel:
+ config += "BR2_JLEVEL={}\n".format(self.jlevel)
+ self.b = Builder(config, self.builddir, self.logtofile)
if not self.keepbuilds:
self.b.delete()
parser.add_argument('-k', '--keep',
help='keep build directories',
action='store_true')
+ parser.add_argument('-j', '--jlevel', type=int,
+ help='BR2_JLEVEL to use for each testcase')
args = parser.parse_args()
BRTest.keepbuilds = args.keep
+ if args.jlevel:
+ if args.jlevel < 0:
+ print "Invalid BR2_JLEVEL to use for each testcase"
+ print ""
+ parser.print_help()
+ return 1
+ BRTest.jlevel = args.jlevel
+
nose2_args = ["-v",
"-s", "support/testing",
"-c", "support/testing/conf/unittest.cfg"]