gpu: nvgpu: unit: required tests system

When running unit testing, we need to ensure that all expected unit
tests were actually run. This used to be done by an external Python
script, but it is not suitable for some OSes. This patch brings this
mechanism into the unit testing framework, and makes use of an INI
file to provide the list of expected tests.

JIRA NVGPU-3072

Change-Id: I9ed590de9005fe10324c594ea33ebc8fda482019
Signed-off-by: Nicolas Benech <nbenech@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2317220
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
This commit is contained in:
Nicolas Benech
2020-03-23 14:36:56 -04:00
committed by Alex Waterman
parent b7767a604f
commit fee7b81061
10 changed files with 1516 additions and 4976 deletions

View File

@@ -46,7 +46,7 @@ else
# running on host
LD_LIBRARY_PATH="build:build/units"
# On host, must run single-threaded to avoid high VAs
NVGPU_UNIT="./build/nvgpu_unit --num-threads 1"
NVGPU_UNIT="./build/nvgpu_unit --num-threads 1 -r required_tests.ini"
fi
export LD_LIBRARY_PATH
@@ -70,10 +70,6 @@ if [ $rc -eq "0" ]; then
esac
shift
done
echo $testlevelparam
echo "Checking executed tests against list of required tests:"
./testlist.py --html $testlevelparam
rc=$?
fi
popd
exit $rc