run_kfdtest.sh: Add --exclude flag to exclude additional subtests
Currently, using --gtest_filter will override any exclusions from
kfdtest.exclude. To add an additional test (or set of tests) to the
exclusion list dynamically, the --exclude (-e) flag will allow the user
to pass in a string of GTest-style exclusions to add to the list
generated by kfdtest.exclude
e.g. run_kfdtest.sh -e "*KFDLocalMemoryTest.*:KFDEventTest.*"
will use kfdtest.exclude, but will also exclude all LocalMemory and
Event tests
Change-Id: Ic23ec271ba2cd2240d2e98558c0117ff2a064ed2
[ROCm/ROCR-Runtime commit: f7978b1ff6]
This commit is contained in:
@@ -80,6 +80,7 @@ GDB=""
|
||||
NODE=""
|
||||
FORCE_HIGH=""
|
||||
RUN_IN_DOCKER=""
|
||||
ADDITIONAL_EXCLUDE=""
|
||||
|
||||
printUsage() {
|
||||
echo
|
||||
@@ -95,6 +96,7 @@ printUsage() {
|
||||
echo " -l , --list List available nodes"
|
||||
echo " --high Force clocks to high for test execution"
|
||||
echo " -d , --docker Run in docker container"
|
||||
echo " -e , --exclude Additional tests to exclude, in addition to kfdtest.exclude (colon-separated, single quoted string as an argument)"
|
||||
echo " -h , --help Prints this help"
|
||||
echo
|
||||
echo "Gtest arguments will be forwarded to the app"
|
||||
@@ -122,6 +124,9 @@ getFilter() {
|
||||
gtestFilter="--gtest_filter=${FILTER[$platform]}"
|
||||
;;
|
||||
esac
|
||||
if [ -n "$ADDITIONAL_EXCLUDE" ]; then
|
||||
gtestFilter="$gtestFilter:$ADDITIONAL_EXCLUDE"
|
||||
fi
|
||||
}
|
||||
|
||||
TOPOLOGY_SYSFS_DIR=/sys/devices/virtual/kfd/kfd/topology/nodes
|
||||
@@ -168,6 +173,11 @@ runKfdTest() {
|
||||
PKG_ROOT="$(getPackageRoot)"
|
||||
fi
|
||||
|
||||
if [ -n "$GTEST_ARGS" ] && [ -n "$ADDITIONAL_EXCLUDE" ]; then
|
||||
echo "Cannot use -e and --gtest_filter flags together"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$NODE" == "" ]; then
|
||||
hsaNodes=$(getHsaNodes)
|
||||
|
||||
@@ -242,6 +252,8 @@ while [ "$1" != "" ]; do
|
||||
FORCE_HIGH="true" ;;
|
||||
-d | --docker )
|
||||
RUN_IN_DOCKER="true" ;;
|
||||
-e | --exclude )
|
||||
ADDITIONAL_EXCLUDE="$2" ; shift ;;
|
||||
-h | --help )
|
||||
printUsage; exit 0 ;;
|
||||
*)
|
||||
|
||||
Reference in New Issue
Block a user