run-ptest: supplied user inputs to add_person_cpp

During protobuf-ptest execution, add_person_cpp waits for user
inputs to write data into test.data file. Fixed this by supplying
dummy data through standard input.

Upstream-Status: Pending

Signed-off-by: Aditya Tayade <Aditya.Tayade@kpit.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Aditya Tayade 2019-03-05 04:08:06 +00:00 committed by Khem Raj
parent 22d16b120b
commit 44cca74e90

View File

@ -8,7 +8,7 @@ for write_exe_full_path in ${DIR}/add_person_*; do
if [ -x "${write_exe_full_path}" ]; then
write_exe=`basename ${write_exe_full_path}`
echo "Generating new test file using ${write_exe}..."
${write_exe_full_path} "${TEST_FILE}"
printf "1234\nname\nname@example.com\n" | ${write_exe_full_path} "${TEST_FILE}"
RETVAL=$?
[ $RETVAL -eq 0 ] || exit $RETVAL