<?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>8479</bug_id>
          
          <creation_ts>2015-10-11 13:35:20 +0000</creation_ts>
          <short_desc>Single Test case can be self-executed without test runner</short_desc>
          <delta_ts>2016-02-19 09:04:54 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>QA/Testing</classification>
          <product>Runtime Testing</product>
          <component>general</component>
          <version>2.1</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</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.1 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Cathy Shen">cathy.shen</reporter>
          <assigned_to name="Cathy Shen">cathy.shen</assigned_to>
          <cc>alexandru.c.georgescu</cc>
    
    <cc>bogdanx.a.voiculescu</cc>
    
    <cc>costin.c.constantin</cc>
          
          <qa_contact name="Bogdan Alexandru Voiculescu">bogdanx.a.voiculescu</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>55145</commentid>
    <comment_count>0</comment_count>
    <who name="Cathy Shen">cathy.shen</who>
    <bug_when>2015-10-11 13:35:20 +0000</bug_when>
    <thetext>When we try to run a single case, we&apos;d like to execute it easily without test runner. This is very useful for developer to analyze and debug a fail case. It&apos;s not user friendly to create the manifest file for one case and trigger the test with runner.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55178</commentid>
    <comment_count>1</comment_count>
    <who name="Costin">costin.c.constantin</who>
    <bug_when>2015-10-12 13:05:45 +0000</bug_when>
    <thetext>Hy Cathy,

I&apos;m not sure if something created to inherit oeRuntimeTest class functionality can be completely extracted and behave as a stand alone thing. 
However, for consistency, i think a good approach is to make runexported.py consider one test only like e.g: ./runexported.py --run_test mytest.test_something

I think this is the best and safest approach and also dev. friendly.

Please share your thoughts on  this

Thank you,

Costin</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55207</commentid>
    <comment_count>2</comment_count>
    <who name="Cathy Shen">cathy.shen</who>
    <bug_when>2015-10-13 05:33:23 +0000</bug_when>
    <thetext>Hi Costin,
For python test cases, we&apos;d like to run like this: 
$python ./mytest.test_something.py

That means runner and controller are separated, single python test case can run directly by above command, of course, controller should be invoked by test cases.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56349</commentid>
    <comment_count>3</comment_count>
    <who name="Lucian Musat">georgex.l.musat</who>
    <bug_when>2015-11-10 11:59:50 +0000</bug_when>
    <thetext>Hi Cathy,

There might be a way to do this. I am thinking of gathering the reusable code from the test runner into a class, and adding a __main__ part into the test suites&apos; code, so it will become runnable by itself, that will call the class from the runner when executed directly. Of course all the data that is available for bitbake should be available for the tests so we&apos;ll still need the testdata.json to be exported and present in the runtime folder. 
I have made a proof of concept with one of our suites and it works fine without having to modify the existing tests, just append some lines at the beginning.

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=lucian/selfexecution&amp;id=7028e451e92a5ddd8f45178d4736548a20ab88ff</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57850</commentid>
    <comment_count>4</comment_count>
    <who name="Alexandru Georgescu">alexandru.c.georgescu</who>
    <bug_when>2016-01-15 09:01:58 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; Hi Cathy,
&gt; 
&gt; There might be a way to do this. I am thinking of gathering the reusable
&gt; code from the test runner into a class, and adding a __main__ part into the
&gt; test suites&apos; code, so it will become runnable by itself, that will call the
&gt; class from the runner when executed directly. Of course all the data that is
&gt; available for bitbake should be available for the tests so we&apos;ll still need
&gt; the testdata.json to be exported and present in the runtime folder. 
&gt; I have made a proof of concept with one of our suites and it works fine
&gt; without having to modify the existing tests, just append some lines at the
&gt; beginning.
&gt; 
&gt; http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=lucian/
&gt; selfexecution&amp;id=7028e451e92a5ddd8f45178d4736548a20ab88ff

Hi Cathy,
Please let us know if the solution proposed by Lucian suffices your needs.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58984</commentid>
    <comment_count>5</comment_count>
    <who name="Cathy Shen">cathy.shen</who>
    <bug_when>2016-02-14 05:20:46 +0000</bug_when>
    <thetext>(In reply to comment #4)
&gt; (In reply to comment #3)
&gt; &gt; Hi Cathy,
&gt; &gt; 
&gt; &gt; There might be a way to do this. I am thinking of gathering the reusable
&gt; &gt; code from the test runner into a class, and adding a __main__ part into the
&gt; &gt; test suites&apos; code, so it will become runnable by itself, that will call the
&gt; &gt; class from the runner when executed directly. Of course all the data that is
&gt; &gt; available for bitbake should be available for the tests so we&apos;ll still need
&gt; &gt; the testdata.json to be exported and present in the runtime folder. 
&gt; &gt; I have made a proof of concept with one of our suites and it works fine
&gt; &gt; without having to modify the existing tests, just append some lines at the
&gt; &gt; beginning.
&gt; &gt; 
&gt; &gt; http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=lucian/
&gt; &gt; selfexecution&amp;id=7028e451e92a5ddd8f45178d4736548a20ab88ff
&gt; 
&gt; Hi Cathy,
&gt; Please let us know if the solution proposed by Lucian suffices your needs.

Sorry for late response. Jing is working with Richard on the redesign of oeRuntime runner. The general concept is to split it to base runner and project specific parts. We can provide this feature based on the new design. I&apos;d like to close this requirement.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59259</commentid>
    <comment_count>6</comment_count>
    <who name="Bogdan Alexandru Voiculescu">bogdanx.a.voiculescu</who>
    <bug_when>2016-02-19 09:04:54 +0000</bug_when>
    <thetext>Verified; obsolete: design change in progress.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>