Skip to content

Commit

Permalink
Fix the --gtest_filter option for omrporttest
Browse files Browse the repository at this point in the history
When ${porttest_filter} is an empty string, no tests from omrporttest
are run. Also, --gtest_filter input does not need to be wrapped in
quotation marks. The below changes will correctly run omrporttest
with an empty filter string:

--gtest_filter=*${porttest_filter}*
--gtest_filter=*Cuda*

Fixes: eclipse#6486

Signed-off-by: Babneet Singh <[email protected]>
  • Loading branch information
babsingh committed Apr 20, 2022
1 parent 7abfd05 commit 66d951f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fvtest/porttest/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
###############################################################################
# Copyright (c) 2017, 2021 IBM Corp. and others
# Copyright (c) 2017, 2022 IBM Corp. and others
#
# This program and the accompanying materials are made available under
# the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -165,13 +165,13 @@ endif()
if (NOT (OMR_OS_AIX OR OMR_OS_ZOS OR CMAKE_CROSSCOMPILING))
omr_add_test(
NAME porttest
COMMAND $<TARGET_FILE:omrporttest> --gtest_output=xml:${CMAKE_CURRENT_BINARY_DIR}/omrporttest-results.xml --gtest_filter=${porttest_filter}
COMMAND $<TARGET_FILE:omrporttest> --gtest_output=xml:${CMAKE_CURRENT_BINARY_DIR}/omrporttest-results.xml --gtest_filter=*${porttest_filter}*
)
endif()

if(OMR_OPT_CUDA)
omr_add_test(
NAME cuda_porttest
COMMAND $<TARGET_FILE:omrporttest> --gtest_output=xml:${CMAKE_CURRENT_BINARY_DIR}/omrporttest-results.xml --gtest_filter="Cuda*" -earlyExit
COMMAND $<TARGET_FILE:omrporttest> --gtest_output=xml:${CMAKE_CURRENT_BINARY_DIR}/omrporttest-results.xml --gtest_filter=*Cuda* -earlyExit
)
endif()

0 comments on commit 66d951f

Please sign in to comment.