From 49255caeff74de70c059a089a79a676bb24f3d6f Mon Sep 17 00:00:00 2001 From: asah Date: Thu, 7 Feb 2019 18:23:58 +0530 Subject: [PATCH] gpu: nvgpu: unit: Argument to run QNX tests Created a command line argument '-Q' for nvgpu_unit. It represents that the tests are QNX specific tests. Change-Id: I178e220de1777c7de30f489ad9f3b5352db3aa19 Signed-off-by: asah Reviewed-on: https://git-master.nvidia.com/r/2013907 Reviewed-by: svc-mobile-coverity Reviewed-by: svc-mobile-misra Reviewed-by: Alex Waterman GVS: Gerrit_Virtual_Submit Reviewed-by: Ankur Kishore Reviewed-by: mobile promotions Tested-by: mobile promotions --- userspace/include/unit/args.h | 1 + userspace/src/args.c | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/userspace/include/unit/args.h b/userspace/include/unit/args.h index 0f9741952..103ab3011 100644 --- a/userspace/include/unit/args.h +++ b/userspace/include/unit/args.h @@ -44,6 +44,7 @@ struct unit_fw_args { bool no_color; int thread_count; bool nvtest; + bool is_qnx; const char *binary_name; const char *unit_name; diff --git a/userspace/src/args.c b/userspace/src/args.c index 44f079616..c392afa84 100644 --- a/userspace/src/args.c +++ b/userspace/src/args.c @@ -35,6 +35,7 @@ static struct option core_opts[] = { { "quiet", 0, NULL, 'q' }, { "no-color", 0, NULL, 'C' }, { "nvtest", 0, NULL, 'n' }, + { "is-qnx", 0, NULL, 'Q' }, { "unit-load-path", 1, NULL, 'L' }, { "num-threads", 1, NULL, 'j' }, @@ -42,7 +43,7 @@ static struct option core_opts[] = { { NULL, 0, NULL, 0 } }; -static const char *core_opts_str = "hvqCnL:j:"; +static const char *core_opts_str = "hvqCnQL:j:"; void core_print_help(struct unit_fw *fw) { @@ -64,6 +65,7 @@ void core_print_help(struct unit_fw *fw) " output to a file the color escape sequences will\n", " corrupt that file.\n", " -n, --nvtest Enable nvtest-formatted output results\n", +" -Q, --is-qnx QNX specific tests\n", " -L, --unit-load-path \n", " Path to where the unit test libraries reside.\n", " -j, --num-threads \n", @@ -146,6 +148,9 @@ int core_parse_args(struct unit_fw *fw, int argc, char **argv) return -1; } break; + case 'Q': + args->is_qnx = true; + break; case '?': args->help = true; return -1;