Skip to content

Commit f968980

Browse files
authored
Use TestExclusionList in bringup_runtest.sh (#106201)
1 parent 418e639 commit f968980

File tree

1 file changed

+23
-6
lines changed

1 file changed

+23
-6
lines changed

src/tests/Common/scripts/bringup_runtest.sh

+23-6
Original file line numberDiff line numberDiff line change
@@ -495,10 +495,6 @@ function copy_test_native_bin_to_test_root {
495495
if [ -z "$testNativeBinDir" ]; then
496496
exit_with_error "$errorSource" "--testNativeBinDir is required."
497497
fi
498-
testNativeBinDir=$testNativeBinDir/src
499-
if [ ! -d "$testNativeBinDir" ]; then
500-
exit_with_error "$errorSource" "Directory specified by --testNativeBinDir does not exist: $testNativeBinDir"
501-
fi
502498

503499
# Copy native test components from the native test build into the respective test directory in the test root directory
504500
find "$testNativeBinDir" -type f -iname "*.$libExtension" |
@@ -511,6 +507,7 @@ function copy_test_native_bin_to_test_root {
511507
# Variables for unsupported and failing tests
512508
declare -a unsupportedTests
513509
declare -a failingTests
510+
declare -a excludedTests
514511
declare -a playlistTests
515512
((runFailingTestsOnly = 0))
516513

@@ -545,6 +542,15 @@ function load_failing_tests {
545542
failingTests+=($(read_array "$(dirname "${BASH_SOURCE[0]}")/testsFailing.$ARCH.txt"))
546543
}
547544

545+
function load_excluded_tests {
546+
# Read the exclusion file and populate the excludedTests array
547+
while IFS=, read -r dllPath reasonMessage; do
548+
# Extract the directory path from the dllPath and add it to the excludedTests array
549+
dirPath=$(dirname "$dllPath")
550+
excludedTests+=("$dirPath")
551+
done < "${CORE_ROOT}/TestExclusionList.txt"
552+
}
553+
548554
function load_playlist_tests {
549555
# Load the list of tests that are enabled as a part of this test playlist.
550556
playlistTests=($(read_array "${playlistFile}"))
@@ -568,6 +574,16 @@ function is_failing_test {
568574
return 1
569575
}
570576

577+
function is_excluded_test {
578+
for excludedTest in "${excludedTests[@]}"; do
579+
if [[ "$1" == "$excludedTest"* ]]; then
580+
return 0
581+
fi
582+
done
583+
584+
return 1
585+
}
586+
571587
function is_playlist_test {
572588
for playlistTest in "${playlistTests[@]}"; do
573589
if [[ "$1" == "$playlistTest" ]]; then
@@ -671,8 +687,6 @@ function print_info_from_core_file {
671687
fi
672688
}
673689

674-
675-
676690
function inspect_and_delete_core_files {
677691
# This function prints some basic information from core files in the current
678692
# directory and deletes them immediately.
@@ -903,6 +917,8 @@ function start_test {
903917
skip_unsupported_test "$scriptFilePath" "$outputFilePath" &
904918
elif ((runFailingTestsOnly == 0)) && is_failing_test "$scriptFilePath"; then
905919
skip_failing_test "$scriptFilePath" "$outputFilePath" &
920+
elif is_excluded_test "$scriptFilePath"; then
921+
skip_unsupported_test "$scriptFilePath" "$outputFilePath" &
906922
else
907923
run_test "$scriptFilePath" "$outputFilePath" &
908924
fi
@@ -1277,6 +1293,7 @@ then
12771293
else
12781294
load_unsupported_tests
12791295
load_failing_tests
1296+
load_excluded_tests
12801297
fi
12811298

12821299
scriptPath=$(dirname $0)

0 commit comments

Comments
 (0)