source code for LTIB unit tests

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

source code for LTIB unit tests

4,039 Views
jfsimon
Contributor III

Hi

On the LTIB root file system there is a /unit_tests directory. Some tests are written in shell scripts. But other are just available as binary. Is it possible to get the source of all tests?

thx a lot

10 Replies

1,928 Views
bryanthomas
NXP Employee
NXP Employee

The source code for these packages can be extracted using the prep command in LTIB

<your ltib dir> $ ./ltib -m prep -p imx-test

and will be located in rpm/BUILD/imx-test

0 Kudos

1,928 Views
LeonardoSandova
Specialist I

Correct. Your instruction Bryan is in fact better because the -m prep command does also the patching. For Yocto, you can get the source code with

bitbake -c imx-test

and the code untar and patched on tmp/work/<machine>-poky-linux-gnueabi/imx-test/

1,928 Views
jfsimon
Contributor III

Hi Leonardo

Thanks to your answer and also Bryan's answer, I can get at the tests source code now.

Rgds

-jfs

1,928 Views
bryanthomas
NXP Employee
NXP Employee

As Leonardo stated, the prep command also patches the source with patches required to build under LTIB or with bug fixes. If you want to see what patches are being applied you can look at the spec file.

The spec file for imx-test is located at dist/lfs-5.1/mxc-misc/imx-test.spec

and contains one patch file:

imx-test-3.0.35-mxc_uart_fix_lb_read.patch

1,928 Views
jrtigerlee
Contributor III

Hi Bryan :

where is imx-test-3.0.35-mxc_uart_fix_lb_read.patch ?

I can't find it

0 Kudos

1,928 Views
bryanthomas
NXP Employee
NXP Employee

The patch is located in /opt/fresscale/pkgs/ and is installed there when you install LTIB for the first time on your machine.

0 Kudos

1,928 Views
jrtigerlee
Contributor III

Hi Bryan :

My LTIB BSP version is L3.0.35_4.1.0_130816_source.tar.gz

But there is no imx-test-3.0.35-mxc_uart_fix_lb_read.patch in /opt/fresscale/pkgs

Only two file about imx-text in /opt/freescale/pkgs

$ ls /opt/freescale/pkgs/*imx-test*

/opt/freescale/pkgs/imx-test-3.0.35-4.1.0.tar.gz

/opt/freescale/pkgs/imx-test-3.0.35-4.1.0.tar.gz.md5

And my version's imx-test.spec also haven't this patch's description

Can you tell me which version you use ?

0 Kudos

1,928 Views
bryanthomas
NXP Employee
NXP Employee

You should use the version that you have already. The patch was needed in an older version of the package (12.09).

0 Kudos

1,928 Views
jfsimon
Contributor III

Hi Bryan

Thanks a lot for your answer!

I can get at the tests now.

BEst regards

-jfs

0 Kudos

1,928 Views
LeonardoSandova
Specialist I

You can get the source code from LTIB or Yocto. Both are delivered as tarballs, there is no public repo yet. Look at /opt/freescale/pkgs/imx-test-* on your LTIB machine.

Leo

0 Kudos