mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: unit: add test levels
Add -t/--test-level option for the unit test framework. This correlates with the test plan levels in GVS. L0 tests are a subset of the L1 tests. Currently, only test levels 0 and 1 are supported. The test output has been updated to display skipped tests. Skipped tests are not included in the test dump. JIRA NVGPU-2251 Change-Id: Icc2ff19a81529be8526e89f70983e96040390e00 Signed-off-by: Philip Elcan <pelcan@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2085280 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
f7860833f1
commit
c0d5a715bd
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2018-2019, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@@ -39,11 +39,12 @@ static struct option core_opts[] = {
|
||||
|
||||
{ "unit-load-path", 1, NULL, 'L' },
|
||||
{ "num-threads", 1, NULL, 'j' },
|
||||
{ "test-level", 1, NULL, 't' },
|
||||
|
||||
{ NULL, 0, NULL, 0 }
|
||||
};
|
||||
|
||||
static const char *core_opts_str = "hvqCnQL:j:";
|
||||
static const char *core_opts_str = "hvqCnQL:j:t:";
|
||||
|
||||
void core_print_help(struct unit_fw *fw)
|
||||
{
|
||||
@@ -70,6 +71,8 @@ void core_print_help(struct unit_fw *fw)
|
||||
" Path to where the unit test libraries reside.\n",
|
||||
" -j, --num-threads <COUNT>\n",
|
||||
" Number of threads to use while running all tests.\n",
|
||||
" -t, --test-level <LEVEL>\n",
|
||||
" Test plan level. 0=L0, 1=L1. default: 1\n",
|
||||
"\n",
|
||||
"Note: mandatory arguments to long arguments are mandatory for short\n",
|
||||
"arguments as well.\n",
|
||||
@@ -87,6 +90,7 @@ static void set_arg_defaults(struct unit_fw_args *args)
|
||||
{
|
||||
args->unit_load_path = DEFAULT_ARG_UNIT_LOAD_PATH;
|
||||
args->thread_count = 1;
|
||||
args->test_lvl = TEST_PLAN_MAX;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -151,6 +155,13 @@ int core_parse_args(struct unit_fw *fw, int argc, char **argv)
|
||||
case 'Q':
|
||||
args->is_qnx = true;
|
||||
break;
|
||||
case 't':
|
||||
args->test_lvl = strtol(optarg, NULL, 10);
|
||||
if (args->test_lvl > TEST_PLAN_MAX) {
|
||||
core_err(fw, "Invalid test plan level\n");
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
case '?':
|
||||
args->help = true;
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user