diff options
| author | Chi Xu <chi.xu@windriver.com> | 2023-08-07 15:37:42 +0800 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2023-08-07 09:01:00 -0700 |
| commit | b160fcf8822b9f1e60a6a420e43ee47ddae4f982 (patch) | |
| tree | bd69d9a357b28d643b0caa8e770389605d665ebb | |
| parent | ca67bf7dfded5f7f13a929f126642161b7a5de4e (diff) | |
| download | meta-openembedded-b160fcf8822b9f1e60a6a420e43ee47ddae4f982.tar.gz | |
lapack: Add ptest support
103 test cases in all.
Test results on qemu with kvm:
root@qemux86-64:~# ptest-runner lapack
START: ptest-runner
2023-08-07T07:10
BEGIN: /usr/lib64/lapack/ptest
PASS: BLAS-xblat1s
PASS: BLAS-xblat2s
...
PASS: LAPACK-xeigtstz_lse_in
PASS: LAPACK-xlintstds_dstest_in
PASS: LAPACK-xlintstzc_zctest_in
DURATION: 55
END: /usr/lib64/lapack/ptest
2023-08-07T07:11
STOP: ptest-runner
TOTAL: 1 FAIL: 0
If build lapack with lapacke, following test cases will be
included in ptest.
PASS: example_DGESV_rowmajor
PASS: example_DGESV_colmajor
PASS: example_DGELS_rowmajor
PASS: example_DGELS_colmajor
Signed-off-by: Chi Xu <chi.xu@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rwxr-xr-x | meta-oe/recipes-devtools/lapack/lapack/run-ptest | 3 | ||||
| -rw-r--r-- | meta-oe/recipes-devtools/lapack/lapack_3.10.1.bb | 40 |
2 files changed, 39 insertions, 4 deletions
diff --git a/meta-oe/recipes-devtools/lapack/lapack/run-ptest b/meta-oe/recipes-devtools/lapack/lapack/run-ptest new file mode 100755 index 0000000000..8bd5fd1efb --- /dev/null +++ b/meta-oe/recipes-devtools/lapack/lapack/run-ptest | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | ctest --force-new-ctest-process | sed -u 's/\*\*\*/ /g' | awk '/Test +#/{gsub(/Passed/,"PASS"); gsub(/Failed/,"FAIL"); gsub(/Skipped/,"SKIP"); print $6": "$4; fflush();}' | ||
diff --git a/meta-oe/recipes-devtools/lapack/lapack_3.10.1.bb b/meta-oe/recipes-devtools/lapack/lapack_3.10.1.bb index 15f394e13e..787ace440c 100644 --- a/meta-oe/recipes-devtools/lapack/lapack_3.10.1.bb +++ b/meta-oe/recipes-devtools/lapack/lapack_3.10.1.bb | |||
| @@ -11,17 +11,49 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=a32c99f24d097c72d1857e533b55642b" | |||
| 11 | #FORTRAN:forcevariable = ",fortran" | 11 | #FORTRAN:forcevariable = ",fortran" |
| 12 | #RUNTIMETARGET:append:pn-gcc-runtime = " libquadmath" | 12 | #RUNTIMETARGET:append:pn-gcc-runtime = " libquadmath" |
| 13 | 13 | ||
| 14 | DEPENDS = "libgfortran" | 14 | DEPENDS = "libgfortran \ |
| 15 | ${@bb.utils.contains('PTEST_ENABLED', '1', 'rsync-native', '', d)} \ | ||
| 16 | " | ||
| 17 | RDEPENDS:${PN}-ptest += "cmake" | ||
| 15 | 18 | ||
| 16 | SRCREV = "32b062a33352e05771dcc01b981ebe961bf2e42f" | 19 | SRCREV = "32b062a33352e05771dcc01b981ebe961bf2e42f" |
| 17 | SRC_URI = "git://github.com/Reference-LAPACK/lapack.git;protocol=https;branch=master" | 20 | SRC_URI = "git://github.com/Reference-LAPACK/lapack.git;protocol=https;branch=master \ |
| 21 | ${@bb.utils.contains('PTEST_ENABLED', '1', 'file://run-ptest', '', d)} \ | ||
| 22 | " | ||
| 18 | S = "${WORKDIR}/git" | 23 | S = "${WORKDIR}/git" |
| 19 | 24 | ||
| 20 | PACKAGECONFIG ?= "" | 25 | PACKAGECONFIG ?= "" |
| 21 | PACKAGECONFIG[lapacke] = "-DLAPACKE=ON,-DLAPACKE=OFF" | 26 | PACKAGECONFIG[lapacke] = "-DLAPACKE=ON,-DLAPACKE=OFF" |
| 22 | 27 | ||
| 23 | EXTRA_OECMAKE = " -DBUILD_SHARED_LIBS=ON " | 28 | EXTRA_OECMAKE = " -DBUILD_SHARED_LIBS=ON \ |
| 29 | ${@bb.utils.contains('PTEST_ENABLED', '1', ' -DBUILD_TESTING=ON', '', d)} \ | ||
| 30 | " | ||
| 24 | OECMAKE_GENERATOR = "Unix Makefiles" | 31 | OECMAKE_GENERATOR = "Unix Makefiles" |
| 25 | 32 | ||
| 26 | inherit cmake pkgconfig | 33 | inherit cmake pkgconfig ptest |
| 27 | EXCLUDE_FROM_WORLD = "1" | 34 | EXCLUDE_FROM_WORLD = "1" |
| 35 | |||
| 36 | do_install_ptest () { | ||
| 37 | rsync -a ${B}/TESTING ${D}${PTEST_PATH} \ | ||
| 38 | --exclude CMakeFiles \ | ||
| 39 | --exclude cmake_install.cmake \ | ||
| 40 | --exclude Makefile | ||
| 41 | rsync -a ${B}/BLAS ${D}${PTEST_PATH} \ | ||
| 42 | --exclude CMakeFiles \ | ||
| 43 | --exclude cmake_install.cmake \ | ||
| 44 | --exclude Makefile | ||
| 45 | rsync -a ${B}/LAPACKE ${D}${PTEST_PATH} \ | ||
| 46 | --exclude CMakeFiles \ | ||
| 47 | --exclude cmake_install.cmake \ | ||
| 48 | --exclude Makefile | ||
| 49 | cp -r ${B}/bin ${D}${PTEST_PATH} | ||
| 50 | cp -r ${B}/lapack_testing.py ${D}${PTEST_PATH} | ||
| 51 | cp ${B}/CTestTestfile.cmake ${D}${PTEST_PATH} | ||
| 52 | cp ${S}/TESTING/*.in ${S}/TESTING/runtest.cmake ${D}${PTEST_PATH}/TESTING | ||
| 53 | cp ${S}/BLAS/TESTING/*.in ${D}${PTEST_PATH}/BLAS/TESTING | ||
| 54 | sed -i -e 's#${B}#${PTEST_PATH}#g' `find ${D}${PTEST_PATH} -name CTestTestfile.cmake` | ||
| 55 | sed -i -e 's#${S}#${PTEST_PATH}#g' `find ${D}${PTEST_PATH} -name CTestTestfile.cmake` | ||
| 56 | sed -i -e 's#${RECIPE_SYSROOT_NATIVE}##g' `find ${D}${PTEST_PATH} -name CTestTestfile.cmake` | ||
| 57 | sed -i -e 's#${PYTHON}#/usr/bin/python3#g' `find ${D}${PTEST_PATH} -name CTestTestfile.cmake` | ||
| 58 | sed -i -e 's#${WORKDIR}##g' `find ${D}${PTEST_PATH} -name CTestTestfile.cmake` | ||
| 59 | } | ||
