Fix loongarch64 emulated tests.

This commit is contained in:
Antonio Sánchez 2025-01-31 19:30:42 +00:00
parent 2926b2e0a9
commit 9589cc4e7f
4 changed files with 22 additions and 16 deletions

View File

@ -313,12 +313,13 @@ build:linux:cross:loongarch64:gcc-14:default:
extends: .build:linux:cross:loongarch64 extends: .build:linux:cross:loongarch64
image: ubuntu:24.04 image: ubuntu:24.04
variables: variables:
EIGEN_CI_C_COMPILER: gcc-14 EIGEN_CI_CROSS_INSTALL: g++-14-loongarch64-linux-gnu
EIGEN_CI_CXX_COMPILER: g++-14
EIGEN_CI_CROSS_INSTALL: g++-14-loongarch64-linux-gnu gcc-14-loongarch64-linux-gnu
EIGEN_CI_CROSS_C_COMPILER: loongarch64-linux-gnu-gcc-14 EIGEN_CI_CROSS_C_COMPILER: loongarch64-linux-gnu-gcc-14
EIGEN_CI_CROSS_CXX_COMPILER: loongarch64-linux-gnu-g++-14 EIGEN_CI_CROSS_CXX_COMPILER: loongarch64-linux-gnu-g++-14
EIGEN_CI_ADDITIONAL_ARGS: "-DEIGEN_TEST_LSX=on" EIGEN_CI_ADDITIONAL_ARGS: >-
-DCMAKE_SYSTEM_NAME=Linux
-DCMAKE_CROSSCOMPILING_EMULATOR=qemu-loongarch64-static;-L;/usr/loongarch64-linux-gnu
-DEIGEN_TEST_LSX=on
######## MR Smoke Tests ######################################################## ######## MR Smoke Tests ########################################################

View File

@ -17,6 +17,7 @@
# Call script in current shell - it sets up some environment variables. # Call script in current shell - it sets up some environment variables.
- . ci/scripts/common.linux.before_script.sh - . ci/scripts/common.linux.before_script.sh
artifacts: artifacts:
when: always
name: "$CI_JOB_NAME_SLUG-$CI_COMMIT_REF_SLUG" name: "$CI_JOB_NAME_SLUG-$CI_COMMIT_REF_SLUG"
paths: paths:
- ${EIGEN_CI_BUILDDIR}/ - ${EIGEN_CI_BUILDDIR}/
@ -32,6 +33,7 @@
before_script: before_script:
- . ci/scripts/common.windows.before_script.ps1 - . ci/scripts/common.windows.before_script.ps1
artifacts: artifacts:
when: always
name: "$CI_JOB_NAME_SLUG-$CI_COMMIT_REF_NAME" name: "$CI_JOB_NAME_SLUG-$CI_COMMIT_REF_NAME"
paths: paths:
- ${EIGEN_CI_BUILDDIR}/ - ${EIGEN_CI_BUILDDIR}/

View File

@ -424,8 +424,6 @@ test:linux:ppc64le:clang-12:default:unsupported:
EIGEN_CI_CROSS_TARGET_TRIPLE: loongarch64-linux-gnu EIGEN_CI_CROSS_TARGET_TRIPLE: loongarch64-linux-gnu
# Install QEMU and set up the execution environment in the image # Install QEMU and set up the execution environment in the image
EIGEN_CI_CROSS_INSTALL: g++-14-loongarch64-linux-gnu qemu-user-static EIGEN_CI_CROSS_INSTALL: g++-14-loongarch64-linux-gnu qemu-user-static
EIGEN_CI_BEFORE_SCRIPT: "ln -sf /usr/loongarch64-linux-gnu/lib64/ld-linux-loongarch-lp64d.so.1 /lib64/ld-linux-loongarch-lp64d.so.1 && \
export LD_LIBRARY_PATH=/usr/loongarch64-linux-gnu/lib:$LD_LIBRARY_PATH"
tags: tags:
- eigen-runner - eigen-runner
- linux - linux

View File

@ -107,7 +107,7 @@ macro(ei_add_test_internal testname testname_with_suffix)
endif() endif()
endif() endif()
add_test(${testname_with_suffix} "${targetname}") add_test(NAME ${testname_with_suffix} COMMAND "${targetname}")
# Specify target and test labels according to EIGEN_CURRENT_SUBPROJECT # Specify target and test labels according to EIGEN_CURRENT_SUBPROJECT
get_property(current_subproject GLOBAL PROPERTY EIGEN_CURRENT_SUBPROJECT) get_property(current_subproject GLOBAL PROPERTY EIGEN_CURRENT_SUBPROJECT)
@ -237,6 +237,11 @@ macro(ei_add_failtest testname)
add_test(NAME ${test_target_ko} add_test(NAME ${test_target_ko}
COMMAND ${CMAKE_COMMAND} --build . --target ${test_target_ko} --config $<CONFIG> COMMAND ${CMAKE_COMMAND} --build . --target ${test_target_ko} --config $<CONFIG>
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
# Disable emulator if cross-compiling.
if (CMAKE_CROSSCOMPILING)
set_property(TEST ${test_target_ok} PROPERTY CROSSCOMPILING_EMULATOR "")
set_property(TEST ${test_target_ko} PROPERTY CROSSCOMPILING_EMULATOR "")
endif()
# Expect the second test to fail # Expect the second test to fail
set_tests_properties(${test_target_ko} PROPERTIES WILL_FAIL TRUE) set_tests_properties(${test_target_ko} PROPERTIES WILL_FAIL TRUE)