# linuxptp-testsuite

The directory linuxptp-testsuite contains a snapshot of the test suite source 
code from https://github.com/mlichvar/linuxptp-testsuite.git at commit hash 
bf8eadc.

The version of linuxptp-testsuite needs to be compatible with the version of 
linuxptp in this package. A summary of known compatible versions are listed 
below in the compatibility matrix.

When the version of linuxptp is updated, these tests need to be updated too.


## Copying test suite

A tar archive of linuxptp-testsuite can be downloaded from Github and extracted
to the linuxptp-testsuite directory with these commands:

$ COMMIT_ID=bf8eadc
$ wget https://github.com/mlichvar/linuxptp-testsuite/archive/$COMMIT_ID/linuxptp-testsuite-$COMMIT_ID.tar.gz
$ mkdir linuxptp-testsuite
$ tar -xvzf linuxptp-testsuite-$COMMIT_ID.tar.gz -C linuxptp-testsuite --strip-components=1
$ rm linuxptp-testsuite-$COMMIT_ID.tar.gz


git-ubuntu does not want .gitignore files in the archive package. Therefore remove it:

$ rm linuxptp-testsuite/.gitignore


## Automotive test

The test script 36-automotive is taken from commit d27dbdb of the test-suite and 
added manually here. This is for extra coverage of the automotive related 
configurations of linuxptp. These are not properly covered by commit b4763bb of
linuxptp-testsuite which is compatible with v4.0 of linuxptp. This will also be 
required for linuxptp v4.0, v4.1 and v4.2. After that the upstream issue is 
solved. See https://github.com/mlichvar/linuxptp-testsuite/issues/13

$ wget https://raw.githubusercontent.com/mlichvar/linuxptp-testsuite/master/36-automotive -O linuxptp-testsuite/36-automotive
$ chmod 775 linuxptp-testsuite/36-automotive


## Version compatibility matrix

linuxptp version  |  linuxptp-testsuite commit id
------------------|------------------------------
v4.0              |  b4763bb
v4.1              |  248073c
v4.2              |  bf8eadc
v4.3              |  d27dbdb (includes 36-automotive)
