tree: 445bef211da25883551871c20b0b07318e540892 [path history] [tgz]
  1. .vpython
  2. __init__.py
  3. container_prep.py
  4. container_prep_caller.sh
  5. README.md
  6. run_docker.py
test/container/utils/README.md

How to build & run a test in the container (All of these steps are outside chroot)

Setup the artifacts for build:

1.) cd to

/dev/test/container/utils

2.) Run the following command:

export chroot_path=path/to/your/chroot/base && export sysroot_path=build/<a board that you have built> && export output_path=<where in the sysroot you want the artifacts to go> && sh container_prep_caller.sh`

Example:

export chroot_path=/usr/local/google/home/ldap/drive2/chromiumos/chroot && export sysroot_path=build/hana && export output_path=tmp/dockerout && sh container_prep_caller.sh

Build the container

3.) cd to the output. Example:

cd ../chroot/build/hana/tmp/dockerout/

4.) Run:

docker build -t testcontainer -f Dockerfile .

Run the test via testexecservice

5.) cd to src/platform/dev/test/container/utils

6.) Run docker_run.py with your required args:

IMPORTANT NOTE 1: You must create a request.json with a valid test/DUT. See tauto example and tast example

Example of foreground cmd only (pastes the command, you can copy/paste to start it)

python3.6 run_docker.py --build=autotest_jul19 --input_json=../../../src/chromiumos/test/execution/data/tauto.json --results=/usr/local/google/home/dbeckett/drive2/cros_2021/chroot/tmp/dockertest --foreground --cmd_only

Example of self running (It launches docker, runs, exits, all in background, provides results dir):

python3.6 run_docker.py --build=autotest_jul19 --input_json=../../../src/chromiumos/test/execution/data/tauto.json --results=/usr/local/google/home/dbeckett/drive2/cros_2021/chroot/tmp/dockertest --cmd_only