how to write custom shell executable VTS test using the binary test template

348 Views Asked by At

I am trying to create custom testcases using the VTS binary test template. But the codelab android pages do not describe how to incorporate shell executable tests into VTS framework using Binary test template. Is this even possible?

I have successfully created custom C/C++ tests using the same binary test template given as example in codelab

1

There are 1 best solutions below

0
On

I assume you created

  1. an Android.bp with a cc_test type binary called MyVtsTestBinary,
  2. a corresponding AndroidTest.xml test configuration,
  3. and an Android.mk test module configuration like so:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := MyVtsTestName
include test/vts/tools/build/Android.host_config.mk

vts-tradefed will expect your test binary and all required libraries to be located in $ANDROID_HOST_OUT/vts/android-vts/testcases. Your binaries will be copied there if you add them to the target_native_modules in test/vts/tools/build/tasks/vts_package.mk.

target_native_modules := \
    [...]\
    MyVtsTestBinary

You can check whether you test is known to VTS with:

vts-tradefed list modules