mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 09:57:08 +03:00
gpu: nvgpu: unit: Argument to run single unit
Specify a unit to run from the command line, especially useful as the number of units is increasing. The argument behaves as a wildcard. All units that contain the argument in the name will be executed. JIRA NVGPU-1246 Change-Id: Ia650929751a0acd83fc034fbeb0fd7df8d39e48d Signed-off-by: Nicolas Benech <nbenech@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1967082 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Philip Elcan <pelcan@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
9d92695e97
commit
48648cfc58
@@ -70,15 +70,25 @@ int main(int argc, char **argv)
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
|
||||
if (fw->results == NULL) {
|
||||
core_msg(fw, "No tests were run!\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
core_print_test_status(fw);
|
||||
|
||||
if (fw->results->nr_tests == 0) {
|
||||
/* No tests were run */
|
||||
return -1;
|
||||
} else if ((fw->results->nr_tests - fw->results->nr_passing) != 0) {
|
||||
if ((fw->results->nr_tests - fw->results->nr_passing) != 0) {
|
||||
/* Some tests failed */
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (fw->args->unit_to_run != NULL) {
|
||||
/*
|
||||
* Just in case (especially when running in automation), return
|
||||
* a failure if only executed a subset of the units
|
||||
*/
|
||||
return -2;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user