Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

blucon container mounts directories as mentioned in volumes.yaml and runs  a container to validate each layer.  Entire docker command including mount points is printed on the screen.  As part of your development process you can modify this docker statement a little and start the container manually and play with it.  Couple of modifications needed for every developer are -it to start the container in the interactive mode and -v /home/ubuntu/validation/:/opt/akraino/validation/  to mount your local code to container.  In this way you can modify code in your favorite IDE and just run it in the container. If you are happy with the changes you can commit them to http://gerrit.akraino.org/r/validation

Here is the example to develop/debug OS layer container.

Code Block
... On your host eg. for OS layer
ubuntu@jumpserver:~$ docker run --rm -it \ 
  -v /home/ubuntu/validation/:/opt/akraino/validation/ \
  -v /home/ubuntu/results:/opt/akraino/results \
  -v /home/ubuntu/.ssh:/root/.ssh \
  akraino/validation:os-latest /bin/sh

... Within in the container
# cd /opt/akraino/validation && python bluval/bluval.py -l os -o rec

... Its running all the testcases mentioned in bluval-<bluprint_name>.yaml OS layer, and prints commands on screen. One example is here.
Invoking ['robot', '-V', '/opt/akraino/validation/tests/variables_updated.yaml', '-d', '/opt/akraino/results/os/lynis', '-b', 'debug.log', '/opt/akraino/validation/tests/os/lynis']

... You can convert above example as below and run specific test suites
# robot -V /opt/akraino/validation/tests/variables_updated.yaml -d /opt/akraino/results/os/lynis -b debug.log /opt/akraino/validation/tests/os/lynis

... You can add -t "Your testcase name" and run specific testcase, here is the example.
# robot -t "RunLTP syscalls madvise only" -V /opt/akraino/validation/tests/variables_updated.yaml -d /opt/akraino/results/os/ltp -b debug.log /opt/akraino/validation/tests/os/ltp

Tests can be invoked directly using the bluval.py script located at /opt/akraino/validation/bluval/

...