Enabling mac tests (#6716)

* Adds mac test job

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* Points to sysctl properly to handle zsh

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* Fixes some macos differences with Linux when reading the CTEST_RUN_FLAGS parameters

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* adding the test job to the profile pipe

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* Disables some tests in Mac that are not passing

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* passes config to cli_test_driver and sets the right trait for the test (pytest instead of lytesttools)

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* Set proper traits for AtomRHI

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* Corrected AZ_TRAIT_UNIT_TEST_PERLINE_GRADIANT_GOLDEN_VALUES_7878 values for Mac

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* Disables EMotionFX tests in Mac

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* Removes debugging prints

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* Removes filters that were meant just for Linux

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* quotes are re-quoted in the test_mac.sh script

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2022-01-06 16:16:48 -08:00
committed by GitHub
parent a365e15729
commit 54e0b8b7b5
8 changed files with 52 additions and 28 deletions
+20 -3
View File
@@ -14,7 +14,8 @@
],
"steps": [
"profile",
"asset_profile"
"asset_profile",
"test_profile"
]
},
"metrics": {
@@ -89,6 +90,22 @@
"ASSET_PROCESSOR_PLATFORMS": "mac"
}
},
"test_profile": {
"TAGS": [
"daily-pipeline-metrics",
"weekly-build-metrics"
],
"COMMAND": "build_test_mac.sh",
"PARAMETERS": {
"CONFIGURATION": "profile",
"OUTPUT_DIRECTORY": "build/mac",
"CMAKE_OPTIONS": "-G Xcode",
"CMAKE_LY_PROJECTS": "AutomatedTesting",
"CMAKE_TARGET": "ALL_BUILD",
"CTEST_OPTIONS": "-L (SUITE_smoke|SUITE_main) -LE (REQUIRES_gpu) --no-tests=error",
"TEST_RESULTS": "False"
}
},
"periodic_test_profile": {
"TAGS": [
"nightly-incremental",
@@ -102,7 +119,7 @@
"CMAKE_OPTIONS": "-G Xcode",
"CMAKE_LY_PROJECTS": "AutomatedTesting",
"CMAKE_TARGET": "TEST_SUITE_periodic",
"CTEST_OPTIONS": "-L \"(SUITE_periodic)\"",
"CTEST_OPTIONS": "-L (SUITE_periodic)",
"TEST_RESULTS": "False"
}
},
@@ -119,7 +136,7 @@
"CMAKE_OPTIONS": "-G Xcode",
"CMAKE_LY_PROJECTS": "AutomatedTesting",
"CMAKE_TARGET": "TEST_SUITE_benchmark",
"CTEST_OPTIONS": "-L \"(SUITE_benchmark)\"",
"CTEST_OPTIONS": "-L (SUITE_benchmark)",
"TEST_RESULTS": "False"
}
},
+2 -2
View File
@@ -48,7 +48,7 @@ if [[ ! -z "$RUN_CONFIGURE" ]]; then
echo "${CONFIGURE_CMD}" > ${LAST_CONFIGURE_CMD_FILE}
fi
echo [ci_build] cmake --build . --target ${CMAKE_TARGET} --config ${CONFIGURATION} -j $(sysctl -n hw.ncpu) -- ${CMAKE_NATIVE_BUILD_ARGS}
cmake --build . --target ${CMAKE_TARGET} --config ${CONFIGURATION} -j $(sysctl -n hw.ncpu) -- ${CMAKE_NATIVE_BUILD_ARGS}
echo [ci_build] cmake --build . --target ${CMAKE_TARGET} --config ${CONFIGURATION} -j $(/usr/sbin/sysctl -n hw.ncpu) -- ${CMAKE_NATIVE_BUILD_ARGS}
cmake --build . --target ${CMAKE_TARGET} --config ${CONFIGURATION} -j $(/usr/sbin/sysctl -n hw.ncpu) -- ${CMAKE_NATIVE_BUILD_ARGS}
popd
+3 -2
View File
@@ -19,8 +19,9 @@ fi
pushd $OUTPUT_DIRECTORY
# Find the CTEST_RUN_FLAGS from the CMakeCache.txt file, then replace the $<CONFIG> with the current configuration
IFS='=' read -ra CTEST_RUN_FLAGS <<< $(cmake -N -LA . | grep "CTEST_RUN_FLAGS:STRING")
CTEST_RUN_FLAGS=${CTEST_RUN_FLAGS[1]/$<CONFIG>/${CONFIGURATION}}
CTEST_RUN_FLAGS=$(cmake -N -LA . | grep "CTEST_RUN_FLAGS:STRING")
CTEST_RUN_FLAGS=${CTEST_RUN_FLAGS/CTEST_RUN_FLAGS:STRING=/}
CTEST_RUN_FLAGS=${CTEST_RUN_FLAGS/$<CONFIG>/${CONFIGURATION}}
# Run ctest
echo [ci_build] ctest ${CTEST_RUN_FLAGS} ${CTEST_OPTIONS}
+12 -12
View File
@@ -17,7 +17,7 @@ endif()
# Tests
################################################################################
if(PAL_TRAIT_TEST_LYTESTTOOLS_SUPPORTED)
if(PAL_TRAIT_TEST_PYTEST_SUPPORTED)
foreach(suite_name ${LY_TEST_GLOBAL_KNOWN_SUITE_NAMES})
ly_add_pytest(
NAME pytest_sanity_${suite_name}_no_gpu
@@ -32,16 +32,16 @@ if(PAL_TRAIT_TEST_LYTESTTOOLS_SUPPORTED)
TEST_REQUIRES gpu
)
endforeach()
endif()
# add a custom test which makes sure that the test filtering works!
ly_add_test(
NAME cli_test_driver
EXCLUDE_TEST_RUN_TARGET_FROM_IDE
TEST_COMMAND ${LY_PYTHON_CMD} ${CMAKE_CURRENT_LIST_DIR}/ctest_driver_test.py
-x ${CMAKE_CTEST_COMMAND}
--build-path ${CMAKE_BINARY_DIR}
TEST_LIBRARY pytest
)
# add a custom test which makes sure that the test filtering works!
ly_add_test(
NAME cli_test_driver
EXCLUDE_TEST_RUN_TARGET_FROM_IDE
TEST_COMMAND ${LY_PYTHON_CMD} ${CMAKE_CURRENT_LIST_DIR}/ctest_driver_test.py
-x ${CMAKE_CTEST_COMMAND}
--build-path ${CMAKE_BINARY_DIR}
--config $<CONFIG>
TEST_LIBRARY pytest
)
endif()
+6 -3
View File
@@ -15,10 +15,10 @@ import sys
import argparse
from ctest_driver import SUITES_AND_DESCRIPTIONS
def main(build_path, ctest_executable):
def main(build_path, ctest_executable, config):
script_folder = os.path.dirname(__file__)
# -N prevents tests from running, just lists them:
base_args = [sys.executable, os.path.join(script_folder,'ctest_driver.py'), "--build-path", build_path, '-N']
base_args = [sys.executable, os.path.join(script_folder,'ctest_driver.py'), "--build-path", build_path, "--config", config, '-N']
if ctest_executable:
base_args.append("--ctest-executable")
base_args.append(ctest_executable)
@@ -77,7 +77,10 @@ if __name__ == '__main__':
parser.add_argument('-b', '--build-path',
required=True,
help="Path to a CMake build folder (generated by running cmake)")
parser.add_argument('-c', '--config',
required=True,
help="Configuration to run")
args = parser.parse_args()
sys.exit(main(args.build_path, args.ctest_executable))
sys.exit(main(args.build_path, args.ctest_executable, args.config))