PAL Build and Test for Epiphany

Forum for PAL Users and Developers

PAL Build and Test for Epiphany

Postby peteasa » Thu Sep 08, 2016 3:23 pm

The latest Epiphany kernel driver changes introduced with Linux 4.4 have required rework of the pal libraries. Here is a quick guide to how to build and test on Epiphany.
Code: Select all
# git clone
# cd pal
# autoreconf -i --force
# mkdir build
# cd build
# ../configure --enable-device-epiphany ; make -k > make.log 2>&1 ; make install > make-install.log 2>&1

Check that the build was ok by looking in make.log and that the install has worked ok by looking in make-install.log. If not then fix whatever problem you find and provide a patch if necessary to the pal source. Now build the test code and run the tests:
Code: Select all
# make test
# make check
# ls devices/epiphany/tests/runtest

It is likely that the tests will not run because there are a couple of bugs in the configuration scripts see discussion If the file devices/epiphany/tests/runtest does not exist then that is a good reason for the tests to fail. So re-create it
Code: Select all
# cd devices/epiphany
# make clean-local-tests
# make tests/runtest
# make check top_builddir=../..

Now the tests are likely to run when built in the devices/epiphany folder, however the test success on Epiphany may be different to the tests on Arm so be prepared to force some tests that work on Arm to be skipped (with NOTEST) when run on Epiphany. To do this edit the appropriate file.. for example if the tests run till check_p_sinh_f32 then hang.. make the next test skip in tests/math/ the tests are run in the order of "check_PROGRAMS" macro and the next one after sinh is sort so for both f32 and f64:
Code: Select all
#tests_math_check_p_sort_f32_SOURCES        = $(tests_math_check_p_sort_f32_SOURCES)
tests_math_check_p_sort_f32_SOURCES        = $(NOTEST)
#tests_math_check_p_sort_f64_SOURCES        = $(tests_math_check_p_sort_f32_SOURCES)
tests_math_check_p_sort_f64_SOURCES        = $(NOTEST)

If anyone is an autotools expert then these are the bugs to fix:
  • runtest does not get created in the devices/epiphany/tests folder, I am guessing because ax_config_dir.m4 needs some update
  • epiphany Makefile has wrong path for pal/config/test-driver

I know that getting the Epiphany pal tests to work is on the long list of things to do, but because the list is long and I am not an autotools expert I thought I would note my findings here for anyone who is interested.

User avatar
Posts: 117
Joined: Fri Nov 21, 2014 7:04 pm

Return to PAL

Who is online

Users browsing this forum: No registered users and 1 guest