Files
qemu-reims-vgpu/tests/tcg/scripts/run_with_input.sh
T
Pierrick Bouvier 91188bf2a4 tests/tcg/meson.build: add wrapper run_with_input
Semihosting console tests require console interaction, and were flagged
as manual because of this. This wrapper automates interaction, by
sending a specific string on stdin.

Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Tested-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: Aniket Sahu <asahu1x@linux.ibm.com>
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Message-ID: <20260827221506.91574-19-pierrick.bouvier@oss.qualcomm.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2026-09-04 15:06:02 +01:00

13 lines
224 B
Bash
Executable File

#!/usr/bin/env bash
# SPDX-License-Identifier: GPL-2.0-or-later
set -euo pipefail
if [ $# -lt 2 ]; then
echo "run_with_input: input_string cmd [args]..." 1>&2
exit 1
fi
input="$1";shift
set -x
echo "$input" | "$@"