Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 838422b3 authored by Jack He's avatar Jack He
Browse files

Cert: Improve gd/cert/run performance

For gd/cert/run:
* Remove --reuse_venv option as it does not actually install updated
  GD cert python libraries and is causing confusion
* Add --clean option, if omitted, gd/cert/run will not try to re-install
  non-GD external libraries during test setup, it will only
  - Re-compile all binaries and libraries if needed
  - Re-zip everything into bluetooth_cert_tests.zip
  - Re-create virtualenv in the same folder without removing the old one
  - Unzip bluetooth_cert_tests.zip into the same virtual environment
  - Run gd/setup.py build with --force to overwrite any GD libraries
  - Run gd/setup.py install with --force and --reuse-acts option,
    this will fail if ACTS has never been installed in the virtualenv
  - However, all Python libraries, extensions, and binaries from GD
    directory will be re-installed regardless
* Enable quiet mode when running setup.py to reduce log spam

For gd/setup.py
* Remove "develop" command as bluetooth_cert_tests.zip is an overlay
  library using generated sources and compiled native extensions. It
  is not possible to develop and debug GD Python code without
  re-compilation and re-zipping everything
* Add "--reuse-acts" option to "install" command so that developer
  can choose to re-use existing ACTS installation in an environment.
  However, gd/setup.py will validate that "acts" module can be imported
  regardless of this option. Without this option, ACTS library will
  always be re-installed
* Exclude 'acts_framework.*' correctly

Performance improvement on my machine:
* Command:
    time gd/cert/run --host --test_filter=CerSelfTest:test_skip_a_test --clean
* Use --clean (i.e. original performance without this change):
    real: 40s
* Without --clean:
    real: 17s
* Speed up: 57%

Bug: 153189503
Bug: 151989046
Test: gd/cert/run --host
Test: gd/cert/run --host --clean
Change-Id: I739c62e9be2ad8d8b04df2a267b3dd9c93f3594d
parent 7d7adde6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment