<?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>5055</bug_id>
          
          <creation_ts>2013-08-27 16:59:38 +0000</creation_ts>
          <short_desc>Smart and RPM tests are not skipped correctly when no package manager exists.</short_desc>
          <delta_ts>2013-08-29 15:06:14 +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>1.5</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Low</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.5</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Saul Wold">sgw</reporter>
          <assigned_to name="Stefan Stanacar">sstncr</assigned_to>
          <cc>sstncr</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>35951</commentid>
    <comment_count>0</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2013-08-27 16:59:38 +0000</bug_when>
    <thetext>Should this be an error or skipped?


| ERROR
| ERROR
| test_dmesg (oeqa.runtime.dmesg.DmesgTest) ... ok
| 
| ======================================================================
| ERROR: setUpModule (oeqa.runtime.rpm)
| ----------------------------------------------------------------------
| Traceback (most recent call last):
|   File &quot;/srv/ssd/sgw/poky/meta/lib/oeqa/runtime/rpm.py&quot;, line 11, in setUpModule
|     skipModule(&quot;rpm module skipped: target doesn&apos;t have rpm as primary package manager&quot;)
|   File &quot;/srv/ssd/sgw/poky/meta/lib/oeqa/oetest.py&quot;, line 108, in skipModule
|     &quot;\nor the image really doesn&apos;t have the requred feature/package when it should.&quot; % (modname, reason))
| Exception:
| Test rpm wants to be skipped.
| Reason is: rpm module skipped: target doesn&apos;t have rpm as primary package manager
| Test was required in TEST_SUITES, so either the condition for skipping is wrong
| or the image really doesn&apos;t have the requred feature/package when it should.
| 
| ======================================================================
| ERROR: setUpModule (oeqa.runtime.smart)
| ----------------------------------------------------------------------
| Traceback (most recent call last):
|   File &quot;/srv/ssd/sgw/poky/meta/lib/oeqa/runtime/smart.py&quot;, line 11, in setUpModule
|     skipModule(&quot;Image doesn&apos;t have smart installed&quot;)
|   File &quot;/srv/ssd/sgw/poky/meta/lib/oeqa/oetest.py&quot;, line 108, in skipModule
|     &quot;\nor the image really doesn&apos;t have the requred feature/package when it should.&quot; % (modname, reason))
| Exception:
| Test smart wants to be skipped.
| Reason is: Image doesn&apos;t have smart installed
| Test was required in TEST_SUITES, so either the condition for skipping is wrong
| or the image really doesn&apos;t have the requred feature/package when it should.
| 
| ----------------------------------------------------------------------
| Ran 17 tests in 60.221s
| 
| FAILED (errors=2)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>35952</commentid>
    <comment_count>1</comment_count>
    <who name="Stefan Stanacar">sstncr</who>
    <bug_when>2013-08-27 17:12:57 +0000</bug_when>
    <thetext>Well, it depends. There was a recent patch that changed the behaviour for skipping tests. (a required test was run regardless of conditions, and failed in execution not error out at load time)
So, I need to see your local.conf. In short, if a test
is added in TEST_SUITES it will now error out, so if you have a sato image
with TEST_SUITES = &quot;ping ssh rpm smart&quot; those are considered required tests and none of them are skipped (as a module, individual classes can be skipped as a dependency). 
It works that way because a test usually does some kind of a check: e.g packagement-manament is in IMAGE_FEATURES but we also know for sure that a certain image (e.g core-image-sato) _must_ have packagement-management in features so we error out assuming that something went wrong and 
that&apos;s not the right image.
Oh, btw, rpm and smart are in the defaults for sato (so if this is an ipk/deb build, then you need to overwrite TEST_SUITES completely).
Alternatively you could use TEST_SUITES = &quot;ping ssh auto&quot;, that will indeed skip non-applicable tests.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>35953</commentid>
    <comment_count>2</comment_count>
    <who name="Stefan Stanacar">sstncr</who>
    <bug_when>2013-08-27 17:24:24 +0000</bug_when>
    <thetext>One more thing, here it is how it used to work before http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=2dfc0e1cc72491d24536792d4bc1d5f978634671

core-image-sato, TEST_SUITES = &quot;ping ssh gcc&quot; 

NOTE: Test modules  [&apos;oeqa.runtime.ping&apos;, &apos;oeqa.runtime.ssh&apos;, &apos;oeqa.runtime.gcc&apos;]
NOTE: Found 5 tests
test_ping (oeqa.runtime.ping.PingTest) ... ok
test_ssh (oeqa.runtime.ssh.SshTest) ... ok
WARNING: Test gcc is required, not skipping
test_gcc_compile (oeqa.runtime.gcc.GccCompileTest) ... FAIL
test_gpp_compile (oeqa.runtime.gcc.GccCompileTest) ... FAIL
test_make (oeqa.runtime.gcc.GccCompileTest) ... FAIL

======================================================================
FAIL: test_gcc_compile (oeqa.runtime.gcc.GccCompileTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File &quot;/home/stefans/yocto/poky-work/meta/lib/oeqa/runtime/gcc.py&quot;, line 20, in test_gcc_compile
    self.assertEqual(status, 0, msg=&quot;gcc compile failed, output: %s&quot; % output)
AssertionError: gcc compile failed, output: sh: gcc: command not found

======================================================================
FAIL: test_gpp_compile (oeqa.runtime.gcc.GccCompileTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File &quot;/home/stefans/yocto/poky-work/meta/lib/oeqa/runtime/gcc.py&quot;, line 26, in test_gpp_compile
    self.assertEqual(status, 0, msg=&quot;g++ compile failed, output: %s&quot; % output)
AssertionError: g++ compile failed, output: sh: g++: command not found

======================================================================
FAIL: test_make (oeqa.runtime.gcc.GccCompileTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File &quot;/home/stefans/yocto/poky-work/meta/lib/oeqa/runtime/gcc.py&quot;, line 32, in test_make
    self.assertEqual(status, 0, msg=&quot;running make failed, output %s&quot; % output)
AssertionError: running make failed, output sh: make: command not found

----------------------------------------------------------------------
Ran 5 tests in 11.167s

FAILED (failures=3)

--

This is how it works now:
--
NOTE: Test modules  [&apos;oeqa.runtime.ping&apos;, &apos;oeqa.runtime.ssh&apos;, &apos;oeqa.runtime.gcc&apos;]
NOTE: Found 5 tests
test_ping (oeqa.runtime.ping.PingTest) ... ok
test_ssh (oeqa.runtime.ssh.SshTest) ... ok
ERROR

======================================================================
ERROR: setUpModule (oeqa.runtime.gcc)
----------------------------------------------------------------------
Traceback (most recent call last):
  File &quot;/home/stefans/z/poky/meta/lib/oeqa/runtime/gcc.py&quot;, line 8, in setUpModule
    skipModule(&quot;Image doesn&apos;t have tools-sdk in IMAGE_FEATURES&quot;)
  File &quot;/home/stefans/z/poky/meta/lib/oeqa/oetest.py&quot;, line 108, in skipModule
    &quot;\nor the image really doesn&apos;t have the requred feature/package when it should.&quot; % (modname, reason))
Exception: 
Test gcc wants to be skipped.
Reason is: Image doesn&apos;t have tools-sdk in IMAGE_FEATURES
Test was required in TEST_SUITES, so either the condition for skipping is wrong
or the image really doesn&apos;t have the requred feature/package when it should.

----------------------------------------------------------------------
Ran 2 tests in 6.255s

FAILED (errors=1)
--


Regardless of the change, here it how it looks with TEST_SUITES = &quot;ping ssh auto&quot;:
skipped &quot;gcc: Image doesn&apos;t have tools-sdk in IMAGE_FEATURES&quot;
The disadvantage of auto is that we don&apos;t control the order tests run.
So in the particular case of rpm/smart most likely it has to do with the fact that those are in the default suite:
- from meta/classes/testimage.bbclass:

DEFAULT_TEST_SUITES = &quot;ping auto&quot;
DEFAULT_TEST_SUITES_pn-core-image-minimal = &quot;ping&quot;
DEFAULT_TEST_SUITES_pn-core-image-sato = &quot;ping ssh df connman syslog xorg scp vnc date rpm smart dmesg&quot;
DEFAULT_TEST_SUITES_pn-core-image-sato-sdk = &quot;ping ssh df connman syslog xorg scp vnc date perl ldd gcc rpm smart dmesg&quot;

TEST_SUITES ?= &quot;${DEFAULT_TEST_SUITES}&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36051</commentid>
    <comment_count>3</comment_count>
    <who name="Stefan Stanacar">sstncr</who>
    <bug_when>2013-08-29 15:06:14 +0000</bug_when>
    <thetext>So bottom line: &quot;rpm smart&quot; shouldn&apos;t be added in TEST_SUITES for ipk/deb images as they are considered mandatory tests and don&apos;t get skipped.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>