Bug 490861

Summary: [RFE] Provide rlFakeTerm (simulating terminal for tty-dependent apps)
Product: [Fedora] Fedora Reporter: Petr Šplíchal <psplicha>
Component: beakerlibAssignee: Petr Muller <pmuller>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: azelinka, dapospis, jmarko, ohudlick, pmuller, psplicha, qa-errata-list
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: Project: Easy
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-24 15:45:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Petr Šplíchal 2009-03-18 11:24:16 UTC
Let's provide a function rlFakeTerm which simulates a terminal to
the application being tested, so that we could run RHTS tests
conveniently for such tty-dependent applications as well.

Suggested syntax:

    rlFakeTerm command [terminal]

Options:

    * command - a command to run in fake terminal
    * terminal - optional terminal type (default VT100)

Return value: Exit status of the command, no asserts.

Ideas, opinions, hints?

Comment 1 Juraj Marko 2010-10-07 08:39:02 UTC
What about this syntax?

rlFakeTerm command [input] [sleep] [terminal]

Options:
  command - command to run in terminal
  input - simulate input from keyboard, space separated
  sleep - sleep between 2 inputs
  terminal - optional terminal (default VT100)

Please write your suggestions.

Comment 2 Ales Zelinka 2010-10-08 13:09:33 UTC
(In reply to comment #1)
>   input - simulate input from keyboard, space separated
How do I send 'space' then? :)

Comment 3 Juraj Marko 2010-10-11 15:33:38 UTC
$ x="a b c \x20 "
$ for f in $x; do echo -e _"$f"_; done
_a_
_b_
_c_
_ _

Comment 4 Petr Šplíchal 2010-10-20 10:07:38 UTC
(In reply to comment #1)
> What about this syntax?
> 
> rlFakeTerm command [input] [sleep] [terminal]

Sounds fine to me, including the "\x20" space hack.
What will be the default sleep? What about 3 seconds?
Looking forward to having this in production! :-)

Comment 5 Petr Muller 2010-10-20 15:46:25 UTC
If anyone starts implementing this, please assign this bug to yourself and flip to ASSIGNED.

Comment 7 Fedora Admin XMLRPC Client 2014-09-02 12:13:10 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 8 Dalibor Pospíšil 2015-03-24 15:45:17 UTC
It seems there are no consumers. Can be done using expect/unbuffered. If needed create beaker library.