test-gdb: ok, it actually works now and exits a failure, OMG I hate threads

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-01-22 00:00:00 +00:00
parent 76b5744fee
commit 780e9ceeb4
2 changed files with 4 additions and 17 deletions

View File

@@ -152,8 +152,7 @@ See: https://github.com/cirosantilli/linux-kernel-module-cheat#gdb-builtin-cpu-s
allowed_toolchains = ['buildroot', 'crosstool-ng', 'host']
cmd = (
[self.get_toolchain_tool('gdb', allowed_toolchains=allowed_toolchains), LF] +
before +
['-q', LF]
before
)
if linux_full_system:
cmd.extend(['-ex', 'add-auto-load-safe-path {}'.format(self.env['linux_build_dir']), LF])

View File

@@ -6,16 +6,6 @@ import os
import common
def output_reader(proc, file):
while True:
byte = proc.stdout.read(1)
if byte:
sys.stdout.buffer.write(byte)
sys.stdout.flush()
file.buffer.write(byte)
else:
break
class Main(common.LkmcCliFunction):
def timed_main(self):
run = self.import_path('run').Main()
@@ -43,13 +33,11 @@ class Main(common.LkmcCliFunction):
emulator=emulator,
wait_gdb=True
))
gdb_thread = threading.Thread(target=lambda: run_gdb(
arch=arch, baremetal=test_script_noext, print_time=False, emulator=emulator, test=True
))
run_thread.start()
gdb_thread.start()
run_gdb(
arch=arch, baremetal=test_script_noext, print_time=False, emulator=emulator, test=True
)
run_thread.join()
gdb_thread.join()
if __name__ == '__main__':
Main().cli()