[OE-core,meta-oe,sumo] run-ptest: supplied user inputs to add_person_cpp

Submitted by Aditya Tayade on March 5, 2019, 4:08 a.m. | Patch ID: 159295

Details

Message ID 1551758877-6519-1-git-send-email-Aditya.Tayade@kpit.com
State New
Delegated to: Armin Kuster
Headers show

Commit Message

Aditya Tayade March 5, 2019, 4:08 a.m.
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>
---
 meta-oe/recipes-devtools/protobuf/protobuf/run-ptest | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.7.4

This message contains information that may be privileged or confidential and is the property of the KPIT Technologies Ltd. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. KPIT Technologies Ltd. does not accept any liability for virus infected mails.

Patch hide | download patch | download mbox

diff --git a/meta-oe/recipes-devtools/protobuf/protobuf/run-ptest b/meta-oe/recipes-devtools/protobuf/protobuf/run-ptest
index 7c3a8d1..dc6c83d 100644
--- a/meta-oe/recipes-devtools/protobuf/protobuf/run-ptest
+++ b/meta-oe/recipes-devtools/protobuf/protobuf/run-ptest
@@ -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


Comments

Armin Kuster March 6, 2019, 1:22 a.m.
On 3/4/19 8:08 PM, Aditya Tayade wrote:
> 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
Thanks for the patch.

This needs to go into Master first, then I can backport it to Thud, then
sumo.

- armin
>
> Signed-off-by: Aditya Tayade <Aditya.Tayade@kpit.com>
> ---
>  meta-oe/recipes-devtools/protobuf/protobuf/run-ptest | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta-oe/recipes-devtools/protobuf/protobuf/run-ptest b/meta-oe/recipes-devtools/protobuf/protobuf/run-ptest
> index 7c3a8d1..dc6c83d 100644
> --- a/meta-oe/recipes-devtools/protobuf/protobuf/run-ptest
> +++ b/meta-oe/recipes-devtools/protobuf/protobuf/run-ptest
> @@ -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
>
> --
> 2.7.4
>
> This message contains information that may be privileged or confidential and is the property of the KPIT Technologies Ltd. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. KPIT Technologies Ltd. does not accept any liability for virus infected mails.