[OE-core] [PATCH] oeqa/buildperf: Add 'bitbake -m' on sync function to ensure bitbake is unloaded

Joshua Lock joshua.g.lock at linux.intel.com
Wed Jul 26 08:29:21 UTC 2017


On 25/07/2017 20:42, jose.perez.carranza at linux.intel.com wrote:
> From: Jose Perez Carranza <jose.perez.carranza at linux.intel.com>
> 
> Add 'bitbake -m' to the sync method and ensure all process related to
> bitbake are correctly unloaded before doing the different measurements.
> Also add a call to sync funtion on Test4 before final measurment of
> eSDK deploy dir disk usage.
> 
> Signed-off-by: Jose Perez Carranza <jose.perez.carranza at linux.intel.com>
> ---
>   meta/lib/oeqa/buildperf/base.py       | 1 +
>   meta/lib/oeqa/buildperf/test_basic.py | 2 ++
>   2 files changed, 3 insertions(+)
> 
> diff --git a/meta/lib/oeqa/buildperf/base.py b/meta/lib/oeqa/buildperf/base.py
> index 6e62b279c1..7b2b4aa2a4 100644
> --- a/meta/lib/oeqa/buildperf/base.py
> +++ b/meta/lib/oeqa/buildperf/base.py
> @@ -485,6 +485,7 @@ class BuildPerfTestCase(unittest.TestCase):
>       @staticmethod
>       def sync():
>           """Sync and drop kernel caches"""
> +        runCmd2('bitbake -m', ignore_status=True)

Looks like the indentation is out here?

>           log.debug("Syncing and dropping kernel caches""")
>           KernelDropCaches.drop()
>           os.sync()
> diff --git a/meta/lib/oeqa/buildperf/test_basic.py b/meta/lib/oeqa/buildperf/test_basic.py
> index a9e4a5b731..0033ee4815 100644
> --- a/meta/lib/oeqa/buildperf/test_basic.py
> +++ b/meta/lib/oeqa/buildperf/test_basic.py
> @@ -121,5 +121,7 @@ class Test4(BuildPerfTestCase):
>           self.sync()
>           self.measure_cmd_resources([installer, '-y', '-d', deploy_dir],
>                                      'deploy', 'eSDK deploy')
> +        #make sure bitbake is unloaded
> +        #self.sync()

Is this sync() call supposed to be commented out?

Thanks,

Joshua

>           self.measure_disk_usage(deploy_dir, 'deploy_dir', 'deploy dir',
>                                   apparent_size=True)
> 



More information about the Openembedded-core mailing list