<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>8938</bug_id>
          
          <creation_ts>2016-01-15 22:53:50 +0000</creation_ts>
          <short_desc>oe-selftest: refactor command line arguments so usage is simpler</short_desc>
          <delta_ts>2017-12-06 16:51:29 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>QA/Testing</classification>
          <product>Build Testing</product>
          <component>general</component>
          <version>2.0</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>OBSOLETE</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>2.4 M3</target_milestone>
          <dependson>9079</dependson>
          <blocked>9708</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Leonardo Sandoval Gonzalez">leonardo.sandoval.gonzalez</reporter>
          <assigned_to name="Aníbal Limón">anibal.limon</assigned_to>
          <cc>benjamin.esquivel</cc>
    
    <cc>bluelightning</cc>
    
    <cc>jose.perez.carranza</cc>
    
    <cc>sonia.delgado</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>57891</commentid>
    <comment_count>0</comment_count>
    <who name="Leonardo Sandoval Gonzalez">leonardo.sandoval.gonzalez</who>
    <bug_when>2016-01-15 22:53:50 +0000</bug_when>
    <thetext>Currently, there are many &apos;list&apos; related arguments, and some &apos;run&apos; which is kind of difficult to use the tool. There are two areas to improve

1. we should collect all list related arguments and create a &apos;list&apos; subcommand. 

2. in case we want to run something, one should specify one of the &apos;run&apos; arguments; in my opinion, we should run all tests without giving any parameter.

To be more precise, these are some example command line examples that would make life easier for the user

## EXECUTION

# execute all tests
    
    $ oe-selftest

# execute just some tests

    $ oe-selftest --test a b c


## LISTING

# list all tests

    $oe-selftest list

# list some modules

    $ oe-selftest list --modules a b

# or classes

    $ oe-selftest list --classes c d

# or tests

    $ oe-selftest list --tests f g

# or tags

    $ oe-selftest list --tags h i</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58316</commentid>
    <comment_count>1</comment_count>
    <who name="Leonardo Sandoval Gonzalez">leonardo.sandoval.gonzalez</who>
    <bug_when>2016-01-28 18:59:40 +0000</bug_when>
    <thetext>Ideally, this enhancement should be started after the batch of changes being proposed by the QA team and this may not happen before M3. Moving to 2.2 for this reason.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63606</commentid>
    <comment_count>2</comment_count>
    <who name="Humberto Ibarra">humberto.ibarra.lopez</who>
    <bug_when>2016-07-02 19:52:20 +0000</bug_when>
    <thetext>This is a good enhancement, but I think I prefer to keep the subcommand &apos;run&apos; for the EXECUTION part. I believe this works better to avoid confusion and collisions in the argument parsing.

The run and list subcommands have a lot in common. They can both act on &apos;tests&apos; or in &apos;modules&apos; or in &apos;all&apos;. If we explicitly require the &apos;run&apos; subcommand to be typed, then we reduce mistakes of the user running tests when he only wanted ot list them.

Also, not having an explicit &apos;run&apos; subcommand would require the &apos;--tests&apos; and &apos;--module&apos; options to be members of the command parser and not of a run subparser. If we have these options outside of a subparser, then they might be confused or even collide with &apos;--tests&apos; and &apos;--module&apos; of the list subcommand.

i.e. The following two commands might behave differently

oe-selftest --tests a b c list
oe-selftest list --tests a b c

Based on my previous comments, I would prefer that we go with the following:


## EXECUTION

# execute all tests
    
    $ oe-selftest run

# execute just some tests

    $ oe-selftest run --test a b c


## LISTING

# list all tests

    $oe-selftest list

# list some modules

    $ oe-selftest list --modules a b

# or classes

    $ oe-selftest list --classes c d

# or tests

    $ oe-selftest list --tests f g

# or tags

    $ oe-selftest list --tags h i</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63938</commentid>
    <comment_count>3</comment_count>
    <who name="Humberto Ibarra">humberto.ibarra.lopez</who>
    <bug_when>2016-07-13 17:34:28 +0000</bug_when>
    <thetext>Sent patch

http://lists.openembedded.org/pipermail/openembedded-core/2016-July/123860.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64808</commentid>
    <comment_count>4</comment_count>
    <who name="Humberto Ibarra">humberto.ibarra.lopez</who>
    <bug_when>2016-08-02 20:48:06 +0000</bug_when>
    <thetext>Sent v2

http://lists.openembedded.org/pipermail/openembedded-core/2016-August/124648.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65564</commentid>
    <comment_count>5</comment_count>
    <who name="Humberto Ibarra">humberto.ibarra.lopez</who>
    <bug_when>2016-08-26 21:16:58 +0000</bug_when>
    <thetext>Sent v3

http://lists.openembedded.org/pipermail/openembedded-core/2016-August/125784.html

https://lists.yoctoproject.org/pipermail/yocto/2016-August/031736.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65708</commentid>
    <comment_count>6</comment_count>
    <who name="Humberto Ibarra">humberto.ibarra.lopez</who>
    <bug_when>2016-09-01 18:57:10 +0000</bug_when>
    <thetext>Sent v4

http://lists.openembedded.org/pipermail/openembedded-core/2016-September/126061.html

https://lists.yoctoproject.org/pipermail/yocto/2016-September/031823.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65719</commentid>
    <comment_count>7</comment_count>
    <who name="Humberto Ibarra">humberto.ibarra.lopez</who>
    <bug_when>2016-09-01 19:38:45 +0000</bug_when>
    <thetext>Forgot to sign off one of the patches

https://lists.yoctoproject.org/pipermail/yocto/2016-September/031826.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65770</commentid>
    <comment_count>8</comment_count>
    <who name="Humberto Ibarra">humberto.ibarra.lopez</who>
    <bug_when>2016-09-02 15:17:23 +0000</bug_when>
    <thetext>Sent v4 for the autobuilder patch

https://lists.yoctoproject.org/pipermail/yocto/2016-September/031834.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65937</commentid>
    <comment_count>9</comment_count>
    <who name="Leonardo Sandoval Gonzalez">leonardo.sandoval.gonzalez</who>
    <bug_when>2016-09-08 17:05:58 +0000</bug_when>
    <thetext>According to RP, this patch is a bit risky to be merged in 2.2 M3, so moving to next relase M1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68044</commentid>
    <comment_count>10</comment_count>
    <who name="Leonardo Sandoval Gonzalez">leonardo.sandoval.gonzalez</who>
    <bug_when>2016-11-07 20:46:54 +0000</bug_when>
    <thetext>Humberto, what is the status of this bug? Are the proposed patches merged?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75813</commentid>
    <comment_count>11</comment_count>
    <who name="Aníbal Limón">anibal.limon</who>
    <bug_when>2017-08-10 19:37:27 +0000</bug_when>
    <thetext>Humberto was working on this re-design of the command line, since the patches from the new OEQA framework arrived and the command line still is the same for compatibility reasons, i don&apos;t see any need to rebase this patches.

I will close this bug, objections?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75829</commentid>
    <comment_count>12</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2017-08-13 20:14:21 +0000</bug_when>
    <thetext>No objections here - I think we can make minor tweaks, but this kind of reworking of the command line interface isn&apos;t something I think we would do at this time.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75834</commentid>
    <comment_count>13</comment_count>
    <who name="Aníbal Limón">anibal.limon</who>
    <bug_when>2017-08-14 14:25:33 +0000</bug_when>
    <thetext>(In reply to comment #12)
&gt; No objections here - I think we can make minor tweaks, but this kind of
&gt; reworking of the command line interface isn&apos;t something I think we would do
&gt; at this time.

So, closed now.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>