gpu: nvgpu: unit: add output to make nvtest happy

This adds the correct output for the nvtest interpreter in GVS to track
the per-test pass/fails.

JIRA NVGPU-1042

Change-Id: I7f4a1a63c64988520db08029231f0db9deeaee7d
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1850293
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Philip Elcan
2018-09-26 14:40:25 -04:00
committed by Abdul Salam
parent 24a678ea81
commit 334f5869c9
4 changed files with 23 additions and 2 deletions

View File

@@ -22,12 +22,14 @@
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <pthread.h>
#include <semaphore.h>
#include <signal.h>
#include <unit/io.h>
#include <unit/core.h>
#include <unit/args.h>
#include <unit/unit.h>
#include <unit/module.h>
#include <unit/results.h>
@@ -81,8 +83,21 @@ static void *core_exec_module(void *module_param)
core_msg(module->fw, "Running %s.%s\n", module->name,
t->name);
if (args(module->fw)->nvtest) {
/* special prints for NVTEST fw in GVS */
printf("[%s: %s.%s]\n",
"start",
module->name, t->name);
}
test_status = t->fn(module, g, t->args);
if (args(module->fw)->nvtest) {
/* special prints for NVTEST fw in GVS */
printf("[%s: %s.%s]\n",
test_status == UNIT_SUCCESS ? "pass" : "fail",
module->name, t->name);
}
if (test_status != UNIT_SUCCESS)
core_msg_color(module->fw, C_RED,
" Unit error! Test %s.%s FAILED!\n",