diff --git a/tools/build_and_test_onnxrt.sh b/tools/build_and_test_onnxrt.sh index f9178f8c1c9..6039ae75984 100755 --- a/tools/build_and_test_onnxrt.sh +++ b/tools/build_and_test_onnxrt.sh @@ -26,6 +26,8 @@ set -e ulimit -c unlimited +cp tools/pai_test_launcher.sh /onnxruntime/tools/ci_build/github/pai/pai_test_launcher.sh +cp tools/pai_provider_test_launcher.sh /onnxruntime/tools/ci_build/github/pai/pai_provider_test_launcher.sh cd /onnxruntime pip3 install -r requirements-dev.txt # Add newer cmake to the path @@ -43,3 +45,4 @@ echo 'InferenceSessionTests.CheckRunProfilerWithSessionOptions2' >> ../../../too echo 'InferenceSessionTests.Test3LayerNestedSubgraph' >> ../../../tools/ci_build/github/pai/migraphx-excluded-tests.txt echo 'InferenceSessionTests.Test2LayerNestedSubgraph' >> ../../../tools/ci_build/github/pai/migraphx-excluded-tests.txt ../../../tools/ci_build/github/pai/pai_test_launcher.sh || (gdb ./onnxruntime_test_all core -batch -ex bt && exit 1) +../../../tools/ci_build/github/pai/pai_provider_test_launcher.sh || (gdb ./onnxruntime_provider_test core -batch -ex bt && exit 1) diff --git a/tools/pai_provider_test_launcher.sh b/tools/pai_provider_test_launcher.sh new file mode 100755 index 00000000000..c16d23ec64d --- /dev/null +++ b/tools/pai_provider_test_launcher.sh @@ -0,0 +1,39 @@ +##################################################################################### +# The MIT License (MIT) +# +# Copyright (c) 2015-2025 Advanced Micro Devices, Inc. All rights reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +##################################################################################### + +#!/bin/bash + +build_dir=${1:-"."} +script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" + +echo "Warning: The following tests are EXCLUDED on PAI agent:" +gtest_filter="-" +while read line; do + gtest_filter="$gtest_filter:$line" + echo "$line" +done <$script_dir/pai-excluded-tests.txt +echo "" + +echo "Running ./onnxruntime_provider_test .." +$build_dir/onnxruntime_provider_test --gtest_filter=$gtest_filter diff --git a/tools/pai_test_launcher.sh b/tools/pai_test_launcher.sh new file mode 100755 index 00000000000..c50d6866646 --- /dev/null +++ b/tools/pai_test_launcher.sh @@ -0,0 +1,39 @@ +##################################################################################### +# The MIT License (MIT) +# +# Copyright (c) 2015-2025 Advanced Micro Devices, Inc. All rights reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +##################################################################################### + +#!/bin/bash + +build_dir=${1:-"."} +script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" + +echo "Warning: The following tests are EXCLUDED on PAI agent:" +gtest_filter="-" +while read line; do + gtest_filter="$gtest_filter:$line" + echo "$line" +done <$script_dir/pai-excluded-tests.txt +echo "" + +echo "Running ./onnxruntime_test_all .." +$build_dir/onnxruntime_test_all --gtest_filter=$gtest_filter