Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 883203

Summary: beaker-wizard: runtest.sh does not obey None in "Run for"
Product: [Retired] Beaker Reporter: Amit Saha <asaha>
Component: command lineAssignee: beaker-dev-list
Status: CLOSED WONTFIX QA Contact: tools-bugs <tools-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 0.9CC: aigao, dcallagh, ebaak, ebenes, isenfeld, jingwang, qwan, rjoost, tools-bugs
Target Milestone: ---Keywords: Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: BeakerWizard
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-10-28 06:36:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
proposed fix; removes rlAssertRpm if RunFor is 'None' none

Description Amit Saha 2012-12-04 02:18:04 UTC
Description of problem:

I am using the beakerlib skeleton. Currently if I specify that a test is not for a package by specifying "None" (without the quotes), beaker-wizard takes care of it when it generates the Makefile. However, since the runtest.sh skeleton makes it mandatory to have the PACKAGE variable and rlAssertRpm $PACKAGE, it includes it as PACKAGE="None" and the subsequent rlAssertRpm.

Perhaps, the runtest.sh skeleton could be modified to not always include PACKAGE and rlAssertRpm or simply check for None and not include it?


Version-Release number of selected component (if applicable):


How reproducible:

Always.


Steps to Reproduce:
1. Run beaker-wizard in interactive mode
2. Edit the default "Run for" to None
3. Create test
4. See the runtest.sh file and Makefile
  
Actual results:

PACKAGE="None"  and rlAssertRpm $PACKAGE

Expected results:

If "Run for" has been specified as "None", remove the assertion atleast.

Additional info:

Comment 2 Martin Žember 2014-08-12 13:47:34 UTC
Created attachment 926074 [details]
proposed fix; removes rlAssertRpm if RunFor is 'None'

Comment 3 Martin Žember 2014-08-12 13:49:56 UTC
Please check if the patch works as expected.

Also note that 'Package' will remain intact if 'Run for' is changed. Is it desired that the condition takes the value of 'Run for' into consideration?

Comment 4 Amit Saha 2014-08-14 07:37:51 UTC
Thanks for the patch, Martin! I will take a look. In the meantime, will it be possible for you to submit the patch to Gerrit, as described in https://beaker-project.org/dev/guide/writing-a-patch.html#submitting-your-patch ?

Comment 5 Martin Žember 2014-08-14 08:43:07 UTC
Thanks for the reply! I will try to submit it to Gerrit (probably next week).

Comment 6 Amit Saha 2014-09-04 02:56:51 UTC
(In reply to Martin Žember from comment #3)
> Please check if the patch works as expected.
> 
> Also note that 'Package' will remain intact if 'Run for' is changed. Is it
> desired that the condition takes the value of 'Run for' into consideration?

Yes, I would think so.

Comment 7 Martin Žember 2014-11-21 16:41:35 UTC
Patch submitted to Gerrit.

Comment 8 Nick Coghlan 2014-11-24 05:04:55 UTC
Gerrit review: http://gerrit.beaker-project.org/#/c/3500/

Comment 9 Martin Žember 2015-06-30 03:27:57 UTC
I will not be able to proceed so I am resetting the assignee. 

Amit, you might want to review and answer Dan's question in Gerrit.

Comment 11 Dan Callaghan 2015-10-28 06:36:23 UTC
Once we started digging into the patch more closely and looking at beaker-wizard's behaviour, there are lots of places where it assumes that there is *some* package under test. It doesn't seem worthwhile trying to update all of those in case there is no specific package.

So I think we will just have to say, running beaker-wizard without a specific package is not a supported use case.