Bug 13033

Summary: [2.4.4RC1] [Bitbake] [Case 142] PR number is not getting increased with remote server/local client mode
Product: [Build System, Metadata & Runtime] BitBake Reporter: pankaj yadav <pankaj-y>
Component: bitbakeAssignee: pankaj yadav <pankaj-y>
Status: RESOLVED NOTABUG QA Contact:
Severity: normal    
Priority: Medium CC: poky.bs.watcher, poky.watcher
Version: 2.4.5   
Target Milestone: 2.4.5   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
PR_Number_2.4.4RC1 none

Description pankaj yadav 2018-11-21 03:00:01 UTC
Created attachment 4394 [details]
PR_Number_2.4.4RC1

Steps to reproduce :
1. prepare 2 poky source tree (different location) 
2. prepare 2 build environments from 2 different poky source tree. 
3. in one of the poky source, run "bitbake-prserv --start" 
4. in the second poky source, set PRSERV_HOST = "127.0.0.1:8585" in conf/local.conf 
5. run "bitbake xcursor-transparent-theme" and then add following lines into xcursor-transparent-theme_$

{PV}
.bb (/meta/recipes-graphics/xcursor-transparent-theme/xcursor-transparent-theme_git.bb)
do_package_append()

{ bb.build.exec_func('do_test_prserv', d) }
do_test_prserv()

{ echo "Test if PR service could work" }

6. Check the version of "xcursor-transparent-theme" under tmp/deploy/rpm/noarch is r0.0

example " xcursor-transparent-theme*-r0.0.all.rpm"
7. re-run "bitbake xcursor-transparent-theme", task do_packge for recipe xcursor-transparent-theme should be re-run 
8. check the xcursor-transparent-theme package built out under deploy folder, the PR number should bump up automatically

Expected output :
PR version should be increased.

Actual output : 
Getting same xcursor-transparent-theme*-r0.noarch.rpm before and after doing changes in /meta/recipes-graphics/xcursor-transparent-theme/xcursor-transparent-theme_git.bb as mentioned in attached screenshot.

Regression with 2.4.3RC2:
Issue is not reproducible with 2.4.3RC2.
Comment 1 Richard Purdie 2018-11-23 11:48:42 UTC
Isn't this test automated:

http://git.yoctoproject.org/cgit.cgi/poky/tree/meta/lib/oeqa/selftest/cases/prservice.py?h=rocko#n52

?

Did the automated test fail?
Comment 2 Stephen K Jolley 2018-11-29 15:40:57 UTC
Please answer Richard's question
Comment 3 pankaj yadav 2018-12-05 02:23:52 UTC
All automated tests are getting passed as mentioned below:

pankajsx@andromeda02:/data/pankajsx/2.4.4_rc1/poky/build$ oe-selftest -r prservice
2018-12-04 15:49:21,759 - oe-selftest - WARNING - meta-selftest layer not found in BBLAYERS, adding it
2018-12-04 15:49:27,046 - oe-selftest - INFO - Adding layer libraries:
2018-12-04 15:49:27,046 - oe-selftest - INFO -  /data/pankajsx/2.4.4_rc1/poky/meta/lib
2018-12-04 15:49:27,046 - oe-selftest - INFO -  /data/pankajsx/2.4.4_rc1/poky/meta-yocto-bsp/lib
2018-12-04 15:49:27,046 - oe-selftest - INFO -  /data/pankajsx/2.4.4_rc1/poky/meta-selftest/lib
2018-12-04 15:49:27,048 - oe-selftest - INFO - Running bitbake -p
2018-12-04 15:49:29,129 - oe-selftest - INFO - Adding: "include selftest.inc" in /data/pankajsx/2.4.4_rc1/poky/build/conf/local.conf
2018-12-04 15:49:29,130 - oe-selftest - INFO - Adding: "include bblayers.inc" in bblayers.conf
2018-12-04 15:49:30,574 - oe-selftest - INFO - test_import_export_override_db (prservice.BitbakePrTests)
2018-12-04 15:50:05,876 - oe-selftest - INFO -  ... ok
2018-12-04 15:50:05,877 - oe-selftest - INFO - test_import_export_replace_db (prservice.BitbakePrTests)
2018-12-04 15:50:42,702 - oe-selftest - INFO -  ... ok
2018-12-04 15:50:42,702 - oe-selftest - INFO - test_pr_service_deb_arch_dep (prservice.BitbakePrTests)
2018-12-04 15:51:09,616 - oe-selftest - INFO -  ... ok
2018-12-04 15:51:09,617 - oe-selftest - INFO - test_pr_service_deb_arch_indep (prservice.BitbakePrTests)
2018-12-04 15:51:29,955 - oe-selftest - INFO -  ... ok
2018-12-04 15:51:29,955 - oe-selftest - INFO - test_pr_service_ipk_arch_dep (prservice.BitbakePrTests)
2018-12-04 15:51:54,663 - oe-selftest - INFO -  ... ok
2018-12-04 15:51:54,663 - oe-selftest - INFO - test_pr_service_ipk_arch_indep (prservice.BitbakePrTests)
2018-12-04 15:52:15,336 - oe-selftest - INFO -  ... ok
2018-12-04 15:52:15,337 - oe-selftest - INFO - test_pr_service_rpm_arch_dep (prservice.BitbakePrTests)
2018-12-04 15:52:40,322 - oe-selftest - INFO -  ... ok
2018-12-04 15:52:40,322 - oe-selftest - INFO - test_pr_service_rpm_arch_indep (prservice.BitbakePrTests)
2018-12-04 15:53:01,410 - oe-selftest - INFO -  ... ok
2018-12-04 15:53:01,411 - oe-selftest - INFO - test_stopping_prservice_message (prservice.BitbakePrTests)
2018-12-04 15:53:02,303 - oe-selftest - INFO -  ... ok
2018-12-04 15:53:02,304 - oe-selftest - INFO - ----------------------------------------------------------------------
2018-12-04 15:53:02,304 - oe-selftest - INFO - Ran 9 tests in 213.175s
2018-12-04 15:53:02,304 - oe-selftest - INFO - OK
2018-12-04 15:53:02,304 - oe-selftest - INFO - RESULTS:
2018-12-04 15:53:02,304 - oe-selftest - INFO - RESULTS - prservice.BitbakePrTests.test_import_export_override_db - Testcase 931: PASSED
2018-12-04 15:53:02,305 - oe-selftest - INFO - RESULTS - prservice.BitbakePrTests.test_import_export_replace_db - Testcase 930: PASSED
2018-12-04 15:53:02,305 - oe-selftest - INFO - RESULTS - prservice.BitbakePrTests.test_pr_service_deb_arch_dep - Testcase 934: PASSED
2018-12-04 15:53:02,305 - oe-selftest - INFO - RESULTS - prservice.BitbakePrTests.test_pr_service_deb_arch_indep - Testcase 937: PASSED
2018-12-04 15:53:02,305 - oe-selftest - INFO - RESULTS - prservice.BitbakePrTests.test_pr_service_ipk_arch_dep - Testcase 933: PASSED
2018-12-04 15:53:02,305 - oe-selftest - INFO - RESULTS - prservice.BitbakePrTests.test_pr_service_ipk_arch_indep - Testcase 936: PASSED
2018-12-04 15:53:02,305 - oe-selftest - INFO - RESULTS - prservice.BitbakePrTests.test_pr_service_rpm_arch_dep - Testcase 932: PASSED
2018-12-04 15:53:02,306 - oe-selftest - INFO - RESULTS - prservice.BitbakePrTests.test_pr_service_rpm_arch_indep - Testcase 935: PASSED
2018-12-04 15:53:02,306 - oe-selftest - INFO - RESULTS - prservice.BitbakePrTests.test_stopping_prservice_message - Testcase 1419: PASSED
2018-12-04 15:53:02,306 - oe-selftest - INFO - SUMMARY:
2018-12-04 15:53:02,306 - oe-selftest - INFO - oe-selftest () - Ran 9 tests in 213.176s
2018-12-04 15:53:02,306 - oe-selftest - INFO - oe-selftest - OK - All required tests passed
pankajsx@andromeda02:/data/pankajsx/2.4.4_rc1/poky/build$
Comment 4 pankaj yadav 2018-12-13 09:34:15 UTC
Issue is not reproducible manually with 2.4.4RC1 release. 
Hence, we can close this ticket.
Comment 5 pankaj yadav 2018-12-13 11:26:30 UTC
This test case has been automated and script available at below mentioned path :
poky/meta/lib/oeqa/selftest/cases/prservice.py

Calling module :
 @OETestID(935)
    def test_pr_service_rpm_arch_indep(self):
        self.run_test_pr_service('xcursor-transparent-theme', 'rpm', 'do_package')

Below function in prservice.py is called and it is checking current package version and incremented package version :
def run_test_pr_service(self, package_name, package_type='rpm', track_task='do_package', pr_socket='localhost:0'):
        self.config_pr_tests(package_name, package_type, pr_socket)
        self.increment_package_pr(package_name)
        pr_1 = self.get_pr_version(package_name)
        stamp_1 = self.get_task_stamp(package_name, track_task)
        self.increment_package_pr(package_name)
        pr_2 = self.get_pr_version(package_name)
        stamp_2 = self.get_task_stamp(package_name, track_task)

        self.assertTrue(pr_2 - pr_1 == 1, "Step between same pkg. revision is greater than 1")
        self.assertTrue(stamp_1 != stamp_2, "Different pkg rev. but same stamp: %s" % stamp_1)


Hence, This test case has been covered in automation script.
Comment 6 pankaj yadav 2018-12-13 11:28:23 UTC
My apologies as this issue is not reproducible through manually as well as automation script.
Hence closing this ticket.