Home | History | Annotate | Download | only in testcase_develop_manual
      1 # Run a VTS test directly
      2 
      3 First of all, if you have not done [VTS setup](../setup/index.md), that is required here.
      4 
      5 ## Build Binaries
      6 
      7 `$ cd test/vts/script`
      8 
      9 `$ ./create-image.sh <build target>-userdebug`
     10 
     11 or
     12 
     13 `$ ./create-image.sh aosp_salifish-userdebug`
     14 
     15 ## Copy Binaries
     16 
     17 `$ ./setup-local.sh <device name>`
     18 
     19 or
     20 
     21 `$ ./setup-local.sh sailfish`
     22 
     23 ## Run a test direclty
     24 
     25 `$ PYTHONPATH=$PYTHONPATH:.. python -m vts.testcases.<test py package path> $ANDROID_BUILD_TOP/test/vts/testcases/<path to its config file>`
     26 
     27 For example, for SampleShellTest, please run:
     28 
     29 `PYTHONPATH=$PYTHONPATH:.. python -m vts.testcases.host.shell.SampleShellTest $ANDROID_BUILD_TOP/test/vts/testcases/host/shell/SampleShellTest.config`
     30 
     31 More examples are in `test/vts/script/run-local.sh`.
     32 
     33 ## Additional Step for LTP and Linux-Kselftest
     34 
     35 Add `'data_file_path' : '<your android build top>/out/host/linux-x86/vts/android-vts/testcases'`
     36 to your config file (e.g., `VtsKernelLtpStaging.config`).
     37 
     38 ## Add a new test
     39 
     40 In order to add a new test, the following two files needed to be extended.
     41 
     42 `test/vts/create-image.sh`
     43 
     44 `test/vts/setup-local.sh`
     45 
     46 Optionally, the command used to add a new test can be also added to:
     47 
     48 `test/vts/run-local.sh`
     49