tree: a432b68663ca44b0e7daffbae57c5d52a9d2d84b [search]
  1. common/
  2. common_hw/
  3. e2e_tests/
  4. example_tests/
  5. fw_baseline_tests/
  6. hardware/
  7. long_running_tests/
  8. manual_scripts/
  9. performance_tests/
  10. sample_tests/
  11. user_build_tests/
  12. Android.bp
  13. OWNERS
  14. README.md
tests/sdv/README.md

SDV Testing

This folder contains SDV System tests implemented using the SDV Test Framework.

See Android partner documentation for general information about SDV.

Tests execution

Setup

Ensure you are sync and have built most recent version.

  1. Set environment and lunch SDV target
. build/envsetup.sh
lunch sdv_core_cf-trunk_staging-userdebug
  1. Start up to three CF virtual devices with the default configuration for SDV:
// on sdv_core_cf
cvd create --config=sdv_core_instance1
cvd create --config=sdv_core_instance2
cvd create --config=sdv_core_instance3
// on sdv_ivi_cf
cvd create --config=sdv_ivi_instance1
cvd create --config=sdv_ivi_instance2
cvd create --config=sdv_ivi_instance3
// on sdv_media_cf
cvd create --config=sdv_media_instance1
cvd create --config=sdv_media_instance2
cvd create --config=sdv_media_instance3

Mobly tests

  1. Execute test
atest <testName>

CATBox tests

  1. Build catbox: m catbox

  2. The following commands assume you are at the root of the repo

  3. Check available test plans for SDV

    ./out/host/linux-x86/catbox/android-catbox/tools/catbox-tradefed l p | grep sdv
    
  4. Execute test

    • One device:
    NOTIFY_AS_NATIVE=0.0.0.0:6520 ./out/host/linux-x86/catbox/android-catbox/tools/catbox-tradefed run commandAndExit <test_name> --{device1}serial 0.0.0.0:6520 --mobly-config-file-name sdv_one_device_config_local.yaml
    
    • Two devices:
    NOTIFY_AS_NATIVE=0.0.0.0:6520,0.0.0.0:6521 ./out/host/linux-x86/catbox/android-catbox/tools/catbox-tradefed run commandAndExit <test_name> --{device1}serial 0.0.0.0:6520 --{device2}serial 0.0.0.0:6521 --mobly-config-file-name sdv_two_devices_config_local.yaml
    
    • Three devices:
    NOTIFY_AS_NATIVE=0.0.0.0:6520,0.0.0.0:6521,0.0.0.0:6522 ./out/host/linux-x86/catbox/android-catbox/tools/catbox-tradefed run commandAndExit <test_name> --{device1}serial 0.0.0.0:6520 --{device2}serial 0.0.0.0:6521 --{device3}serial 0.0.0.0:6522 --mobly-config-file-name sdv_three_devices_config_local.yaml
    

User-build tests

User-build tests are designed to run on devices without root access.

Running locally with atest

To run user-build tests locally using atest, you need to disable the root access requirement by passing force-root:false as a module argument.

atest <moduleName> -- --module-arg <moduleName>:force-root:false

CI/CD Configuration

To configure user-build tests for CI/CD, you must create a Tradefed configuration XML file under platform_testing/libraries/sdv/sdv_catbox/res/config/ and use the appropriate noroot device configuration template under /sdv-device-config/userbuild/.