Versions Compared

Key

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

...

TDK Documentation and Releases

  • Contains all the TDK Documentation you need from
    • Setting up the TDK manager (note we have automated this in CMF via vagrant/puppet)
    • TDK additional framework setup (e.g. aamp, spark, xconf, RDKB-E2E frameworks etc etc)
    • TDK Video and Broadband Release Documentation 
    • Lots of other useful TDK information


CMF Test Framework Design

draw.io Diagram
bordertrue
viewerToolbartrue
fitWindowfalse
diagramNameTDK Test Frameworks
simpleViewerfalse
width
diagramWidth1768
revision3

...

All of which are kicked off with a set of input parameters to their various Jenkins jobs. Currently supporting 4 'RUNTYPE' options – 'release', 'nightly', 'nightly-full', and 'master'. Below is

There is also a dry-rinBelow is each framework's instruction to run a flow job for the various RUNTYPE options and the differences those options make in regards to each phase of each flow.

...

Code Block
# clone the test repo
git clone "https://code.rdkcentral.com/r/cmf/test"

# gittiles link (must be logged into gerrit)
https://code.rdkcentral.com/r/plugins/gitiles/cmf/test

# TDK test results repo (soon to be deprecated, used to store TDK reference results)
git clone "https://code.rdkcentral.com/r/tata/test-results"

# clone the jenkins dsl test repo where all our test jenkins jobs are maintained
git clone "https://code.rdkcentral.com/r/cmf/jenkins-dsl/jobs/test"

# setup the commit hook if you want push changes for review in CMF Gerrit
cd <repo>
gitdir=$(git rev-parse --git-dir); curl -o ${gitdir}/hooks/commit-msg https://code.rdkcentral.com/r/tools/hooks/commit-msg ; chmod +x ${gitdir}/hooks/commit-msg

# useful git commands/workflow sequence if/when working on branches rather than pushing changes directly on master
git checkout master
git pull —rebase
git checkout -b <branch name>


… make changes
git add <files>
git commit -m "CMFLAB-XXX <commit msg>"
git push origin <branch name>
  if single commit:
    git checkout master
    git cherry-pick <commit ID>
    git push origin HEAD:refs/for/master
  if multiple commits:
    git rebase -i HEAD~<# of commits from HEAD>
    … pick top commit; squash all others
    git log (**check to see that squashed commit has Change-ID)
    if no Change-ID in commit: git commit —amend; exit editor (Change-ID should now be there)
    git push origin HEAD:refs/for/master


Test AWS S3 Buckets


S3 bucketBucketPurpose
s3://rdkcmf-test-results/
  • stores nightly and release sanity and TDK test results
  • store TDK reference results
s3://rdkcmf-artifacts/jobs/test-manual-artifacts/
  • where we store our development builds, refer to section below
-test-logs/
  • stores nightly and release logs from TDK test runs
  • may be used in future for sanity testing
s3://rdkcmf-artifacts/jobs/
  • where all builds from internal jenkins are stored
  • we mainly use this to retrieve images from tdk and community build jobs
s3://rdkcmf-artifacts/jobs/test-manual-artifacts/
  • where we store our development builds, refer to next section below
s3://rdkcmf-community-artifacts/jobs/
  • where all builds are stored from contribution builds, useful if you want to run some testing on a contribution

Test Test Development Builds

The test team maintain their own build scripts which we use to build and test debug images for defect investigations. These scripts are run on personal build slaves and can be used to build on any branch we support in CMF.

...

Code Block
languagebash
# check if tftp server is running on the TDK Manager VM
vagrant@tdk-emulator-rdkb:~$ ps -ef | grep tftp
vagrant  12660 12630  0 12:17 pts/0    00:00:00 grep --color=auto tftp
root     13444 13389  0 Sep18 ?        00:00:00 sudo python /var/lib/tomcat6/webapps/rdk-test-tool/fileStore/tftp_server.py 69 /var/lib/tomcat6/webapps/rdk-test-tool/logs/logs/
root     13446 13444  0 Sep18 ?        00:00:05 python /var/lib/tomcat6/webapps/rdk-test-tool/fileStore/tftp_server.py 69 /var/lib/tomcat6/webapps/rdk-test-tool/logs/logs/

# Manually start TDK TFTP Server on a TDK VM (tftp server is used on manager to transfer agent logs from DUT)
sudo python /var/lib/tomcat6/webapps/rdk-test-tool/fileStore/tftp_server.py 69 /var/lib/tomcat6/webapps/rdk-test-tool/logs/logs/ &

# kill tftp serrver 
sudo pkill -f tftp

# to manually set the route on TDK Manager VM (this is needed if you can't connect to the webui of VM via your browser), e.g. can happen when VM was restarted abnormally
route del default
sudo route del default; sudo route add default gw 192.168.32.1 dev eth1

# to change interface or mechanism for agent log transfer (can be set to tftp/REST) edit tm.config file and restart tomcat
vi /var/lib/tomcat6/webapps/rdk-test-tool/fileStore/tm.config
sudo pkill -f tftp
sudo service tomcat6 stop 
sudo service tomcat6 start


 Accessing Device Under Test

Sometimes it's useful to access the platform/DUT directly for defect investigation etc for emulators we can ssh to the device, for RPI's we can connect to the devices either by serial (via telnet on iolan) or by ssh'ing directly to the device.

For RPI Rack Setup and IP addresses, see

Code Block
languagebash
# rdkb-emu TDK VM
get_vpc_key -i 192.168.32.74 -u <username> griffen
sudo su jenkins

ssh -o "StrictHostKeyChecking=no" root@10.5.25.100

# RPI via telnet
# telnet <iolan ip> <port>
telnet 10.5.25.5 10002

# use CTRL-] to quit
# tip if you accidently hit CTRL-C while in telnet session it will stop responding, quit and do following to recover
# echo 03 | xxd -r -p | nc <iolan ip> <port>
echo 03 | xxd -r -p | nc 10.5.25.5 10015

# RPI via ssh
# ssh -o "StrictHostKeyChecking=no" root@<IP>

# e.g. 2 RPI-B TDK 
ssh -o "StrictHostKeyChecking=no" root@10.5.25.102
ssh -o "StrictHostKeyChecking=no" root@10.5.25.108

# RDKV-EMU TDK Hybrids and Clients
# these device IP's are not static so you either get it's IP from the console output of the 
# https://jenkins.cmf.code.rdkcentral.com/view/TEST/job/test-emu-prepare-dut/ job are use vagrant to connect on heron 
get_vpc_key -i 192.168.32.76 -u <username> heron
sudo su jenkins