Bug 883203 - beaker-wizard: runtest.sh does not obey None in "Run for"
Summary: beaker-wizard: runtest.sh does not obey None in "Run for"
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Beaker
Classification: Retired
Component: command line
Version: 0.9
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: beaker-dev-list
QA Contact: tools-bugs
URL:
Whiteboard: BeakerWizard
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-12-04 02:18 UTC by Amit Saha
Modified: 2018-02-06 00:41 UTC (History)
9 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-10-28 06:36:23 UTC
Embargoed:


Attachments (Terms of Use)
proposed fix; removes rlAssertRpm if RunFor is 'None' (1.33 KB, patch)
2014-08-12 13:47 UTC, Martin Žember
no flags Details | Diff

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.


Note You need to log in before you can comment on or make changes to this bug.