From db68a824df73c6e5ab041bc5d1e8e553c43386d9 Mon Sep 17 00:00:00 2001 From: Nicolas Benech Date: Fri, 22 Mar 2019 15:42:58 -0400 Subject: [PATCH] gpu: nvgpu: unit: fw: testlist.py to ignore empty strings Due to an earlier update to the framework, JAMA related strings can never be null, but are instead empty. This patch updates testlist.py to take this into account, and thus avoid unnecessary data in required_tests.json JIRA NVGPU-1246 Change-Id: I477d62609afe95c9e5039bae6ea84f955812ba79 Signed-off-by: Nicolas Benech Reviewed-on: https://git-master.nvidia.com/r/2079374 Reviewed-by: Adeel Raza Reviewed-by: Philip Elcan Tested-by: Philip Elcan GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman Reviewed-by: mobile promotions Tested-by: mobile promotions --- userspace/testlist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/userspace/testlist.py b/userspace/testlist.py index 688773f34..927294142 100755 --- a/userspace/testlist.py +++ b/userspace/testlist.py @@ -102,7 +102,7 @@ def regen(): for unit, tests in sorted(test_dict.items(), key=lambda kv: kv[0], reverse=False): for test in sorted(tests.items()): entry = {"unit": unit, "test": test[0]} - if test[1]['uid'] != "(null)": + if test[1]['uid'] != "": entry['uid'] = test[1]['uid'] entry['vc'] = test[1]['vc'] entry['req'] = test[1]['req'] @@ -110,7 +110,7 @@ def regen(): test_count += 1 with open(REQ_FILE, "w+") as outfile: json_text = json.dumps(output_list, indent=4).replace(" \n", "\n") - outfile.write(json_text) + outfile.write(json_text+"\n") print("Generated updated version of \"%s\" based on tests in \"%s\"." % (REQ_FILE, RESULTS_FILE)) print("Required tests: %d" % test_count)