mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-27 21:26:36 +00:00
support/testing: allow to set BR2_JLEVEL
Let the user to override the default BR2_JLEVEL used for each testcase. Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
parent
abe64676d5
commit
1df8042ead
@ -34,6 +34,7 @@ class BRTest(unittest.TestCase):
|
|||||||
outputdir = None
|
outputdir = None
|
||||||
logtofile = True
|
logtofile = True
|
||||||
keepbuilds = False
|
keepbuilds = False
|
||||||
|
jlevel = None
|
||||||
|
|
||||||
def show_msg(self, msg):
|
def show_msg(self, msg):
|
||||||
print "{} {:40s} {}".format(datetime.datetime.now().strftime("%H:%M:%S"),
|
print "{} {:40s} {}".format(datetime.datetime.now().strftime("%H:%M:%S"),
|
||||||
@ -43,7 +44,10 @@ class BRTest(unittest.TestCase):
|
|||||||
self.builddir = os.path.join(self.__class__.outputdir, self.testname)
|
self.builddir = os.path.join(self.__class__.outputdir, self.testname)
|
||||||
self.emulator = None
|
self.emulator = None
|
||||||
self.show_msg("Starting")
|
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:
|
if not self.keepbuilds:
|
||||||
self.b.delete()
|
self.b.delete()
|
||||||
|
@ -23,6 +23,8 @@ def main():
|
|||||||
parser.add_argument('-k', '--keep',
|
parser.add_argument('-k', '--keep',
|
||||||
help='keep build directories',
|
help='keep build directories',
|
||||||
action='store_true')
|
action='store_true')
|
||||||
|
parser.add_argument('-j', '--jlevel', type=int,
|
||||||
|
help='BR2_JLEVEL to use for each testcase')
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
@ -70,6 +72,14 @@ def main():
|
|||||||
|
|
||||||
BRTest.keepbuilds = args.keep
|
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",
|
nose2_args = ["-v",
|
||||||
"-s", "support/testing",
|
"-s", "support/testing",
|
||||||
"-c", "support/testing/conf/unittest.cfg"]
|
"-c", "support/testing/conf/unittest.cfg"]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user