]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
selftest: eSDK rename to esdk
authorMartin Jansa <Martin.Jansa@gmail.com>
Mon, 13 Mar 2023 14:20:32 +0000 (15:20 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 30 Mar 2023 22:24:47 +0000 (23:24 +0100)
commit173ef4397b5be19f72385b1a0d892a1fa8979d53
treed4b8892abae0cc6e674c234902aee90f5a95e60d
parentc3fe173d5196506d89aa464ba56aabcf581a60db
selftest: eSDK rename to esdk

* I was hit by oe-selftest -r eSDK.oeSDKExtSelfTest.test_install_libraries_headers
  running all tests except only this selected one:

  poky $ oe-selftest -v -r eSDK.oeSDKExtSelfTest.test_install_libraries_headers -K -B /OE/build/poky/build-eSDK
  2023-03-13 14:00:52,955 - oe-selftest - DEBUG - Selected tests with -r: ['eSDK.oeSDKExtSelfTest.test_install_libraries_headers']
  2023-03-13 14:00:55,531 - oe-selftest - INFO - Changing cwd to /OE/build/poky/build
  ..
  2023-03-13 14:00:58,128 - oe-selftest - INFO - test_archiver_allows_to_filter_on_recipe_name (archiver.Archiver.test_archiver_allows_to_filter_on_recipe_name)

  this is caused by _built_modules_dict(modules) function
  which filters out eSDK.oeSDKExtSelfTest.test_install_libraries_headers
  based on the regexp and then it runs all loaded tests, because
  modules are empty

  the initial regexp and comment from 2017:
     https://git.openembedded.org/openembedded-core/commit/?id=80db3d999ae26d298d9d5418a32b11a4f27af9d5

     # Assumption: package and module names do not contain upper case
     # characters, whereas class names do
     m = re.match(r'^([^A-Z]+)(?:\.([A-Z][^.]*)(?:\.([^.]+))?)?$', module)

  might still be valid, but it was loosened in 2018 to accept upper case in module:

     https://git.openembedded.org/openembedded-core/commit/?id=1ecf48fd286a77078451b67879a44f9c9dc7a894
     Some test cases (eSDK.oeSDK*, runtime_test/*) does not match with current regex, fix it accept all.

  Then skipping the not matching modules was added later in 2018:

     https://git.openembedded.org/openembedded-core/commit/?id=f2042bf3638ed4edfb167e7f7d4be6da60997ead

  and regexp was updated again in 2020 not to accept upper case in modules:

     https://git.openembedded.org/openembedded-core/commit/?id=ad81ea90a815389e45ff302a85151724c71f71c3
     oeqa/core/loader: refine regex to find module
     test case in format <module name>.<class name>.<test case name>
     this is clear when test cases is only 3 item deep.

     but confused when it is 4 item deep, eg,
     oelib.types.TestList.test_list_nosep

  I'm afraid that changing this regexp again to accept eSDK will break
  someone's favorite test case, renaming eSDK looks much safer option

  There is only 1 such case in poky:
  $ oe-selftest --list-modules | grep INFO.- | sed 's/^.*INFO - //g' | grep -v '^[a-z_\.]*$'
  Listing all available test modules:
  eSDK

  Most modules are just a-z (52x), then oelib.<foo> (6x) and 7 modules with underscore '_'.

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
meta/lib/oeqa/selftest/cases/esdk.py [moved from meta/lib/oeqa/selftest/cases/eSDK.py with 100% similarity]