mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-28 12:34:26 +01:00
test-gdb: improve integration with arch list
This commit is contained in:
@@ -11884,7 +11884,7 @@ We have some link:https://github.com/pexpect/pexpect[pexpect] automated tests fo
|
|||||||
|
|
||||||
....
|
....
|
||||||
./build-test-gdb && \
|
./build-test-gdb && \
|
||||||
./test-gdb
|
./test-gdb --all-archs
|
||||||
....
|
....
|
||||||
|
|
||||||
Sources:
|
Sources:
|
||||||
|
|||||||
2
release
2
release
@@ -16,7 +16,7 @@ release_upload = imp.load_source('release_upload', os.path.join(kwargs['root_dir
|
|||||||
start_time = time.time()
|
start_time = time.time()
|
||||||
# TODO factor those out so we don't redo the same thing multiple times.
|
# TODO factor those out so we don't redo the same thing multiple times.
|
||||||
# subprocess.check_call([os.path.join(kwargs['root_dir'], 'test')])
|
# subprocess.check_call([os.path.join(kwargs['root_dir'], 'test')])
|
||||||
# subprocess.check_call([os.path.join(kwargs['root_dir'], ''bench-all', '-A', '-u'])
|
# subprocess.check_call([os.path.join(kwargs['root_dir'], 'bench-all', '-A', '-u'])
|
||||||
|
|
||||||
# A clean release requires a full rebuild unless we hack it :-(
|
# A clean release requires a full rebuild unless we hack it :-(
|
||||||
# We can't just use our current build as it contains packages we've
|
# We can't just use our current build as it contains packages we've
|
||||||
|
|||||||
2
run-gdb
2
run-gdb
@@ -77,7 +77,7 @@ class Main(common.LkmcCliFunction):
|
|||||||
Connect with GDB to an emulator to debug Linux itself
|
Connect with GDB to an emulator to debug Linux itself
|
||||||
''')
|
''')
|
||||||
self.add_argument(
|
self.add_argument(
|
||||||
'-A', '--after', default='',
|
'--after', default='',
|
||||||
help='Pass extra arguments to GDB, to be appended after all other arguments'
|
help='Pass extra arguments to GDB, to be appended after all other arguments'
|
||||||
)
|
)
|
||||||
self.add_argument(
|
self.add_argument(
|
||||||
|
|||||||
10
test-gdb
10
test-gdb
@@ -10,13 +10,13 @@ class Main(common.LkmcCliFunction):
|
|||||||
run = self.import_path('run').Main()
|
run = self.import_path('run').Main()
|
||||||
run_gdb = self.import_path('run-gdb').Main()
|
run_gdb = self.import_path('run-gdb').Main()
|
||||||
for emulator in self.env['emulators']:
|
for emulator in self.env['emulators']:
|
||||||
for arch in self.env['crosstool_ng_supported_archs']:
|
if self.env['arch'] in self.env['crosstool_ng_supported_archs']:
|
||||||
test_scripts_noext = []
|
test_scripts_noext = []
|
||||||
for f in os.listdir(self.env['baremetal_src_dir']):
|
for f in os.listdir(self.env['baremetal_src_dir']):
|
||||||
base, ext = os.path.splitext(f)
|
base, ext = os.path.splitext(f)
|
||||||
if ext == '.py':
|
if ext == '.py':
|
||||||
test_scripts_noext.append(base)
|
test_scripts_noext.append(base)
|
||||||
for root, dirs, files in os.walk(os.path.join(self.env['baremetal_src_dir'], 'arch', arch)):
|
for root, dirs, files in os.walk(os.path.join(self.env['baremetal_src_dir'], 'arch', self.env['arch'])):
|
||||||
for f in files:
|
for f in files:
|
||||||
base, ext = os.path.splitext(f)
|
base, ext = os.path.splitext(f)
|
||||||
if ext == '.py':
|
if ext == '.py':
|
||||||
@@ -25,16 +25,18 @@ class Main(common.LkmcCliFunction):
|
|||||||
test_scripts_noext.append(relpath)
|
test_scripts_noext.append(relpath)
|
||||||
for test_script_noext in test_scripts_noext:
|
for test_script_noext in test_scripts_noext:
|
||||||
run_thread = threading.Thread(target=lambda: run(
|
run_thread = threading.Thread(target=lambda: run(
|
||||||
archs=[arch],
|
archs=[self.env['arch']],
|
||||||
background=True,
|
background=True,
|
||||||
baremetal=test_script_noext,
|
baremetal=test_script_noext,
|
||||||
|
dry_run=self.env['dry_run'],
|
||||||
emulator=emulator,
|
emulator=emulator,
|
||||||
wait_gdb=True
|
wait_gdb=True
|
||||||
))
|
))
|
||||||
run_thread.start()
|
run_thread.start()
|
||||||
run_gdb(
|
run_gdb(
|
||||||
archs=[arch],
|
archs=[self.env['arch']],
|
||||||
baremetal=test_script_noext,
|
baremetal=test_script_noext,
|
||||||
|
dry_run=self.env['dry_run'],
|
||||||
emulator=emulator,
|
emulator=emulator,
|
||||||
test=True,
|
test=True,
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user