diff --git a/src/intel/compiler/elk/tests/run-test.py b/src/intel/compiler/elk/tests/run-test.py index f90356138cd..1b85726e0d5 100755 --- a/src/intel/compiler/elk/tests/run-test.py +++ b/src/intel/compiler/elk/tests/run-test.py @@ -48,10 +48,8 @@ for asm_file in args.gen_folder.glob('*.asm'): '--gen', args.gen_name, asm_file ] - with subprocess.Popen(command, - stdout=subprocess.PIPE, - stderr=subprocess.DEVNULL) as cmd: - lines_after = [line.decode('ascii') for line in cmd.stdout.readlines()] + stdout = subprocess.check_output(command, timeout=1).decode() + lines_after = stdout.splitlines(keepends=True) except OSError as e: if e.errno == errno.ENOEXEC: print('Skipping due to inability to run host binaries.', diff --git a/src/intel/compiler/tests/run-test.py b/src/intel/compiler/tests/run-test.py index 6178a120496..5cf0d1506b6 100755 --- a/src/intel/compiler/tests/run-test.py +++ b/src/intel/compiler/tests/run-test.py @@ -48,10 +48,8 @@ for asm_file in args.gen_folder.glob('*.asm'): '--gen', args.gen_name, asm_file ] - with subprocess.Popen(command, - stdout=subprocess.PIPE, - stderr=subprocess.DEVNULL) as cmd: - lines_after = [line.decode('ascii') for line in cmd.stdout.readlines()] + stdout = subprocess.check_output(command, timeout=1).decode() + lines_after = stdout.splitlines(keepends=True) except OSError as e: if e.errno == errno.ENOEXEC: print('Skipping due to inability to run host binaries.',