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 <nbenech@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2079374
Reviewed-by: Adeel Raza <araza@nvidia.com>
Reviewed-by: Philip Elcan <pelcan@nvidia.com>
Tested-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:
Nicolas Benech
2019-03-22 15:42:58 -04:00
committed by mobile promotions
parent d59df79863
commit db68a824df

View File

@@ -102,7 +102,7 @@ def regen():
for unit, tests in sorted(test_dict.items(), key=lambda kv: kv[0], reverse=False): for unit, tests in sorted(test_dict.items(), key=lambda kv: kv[0], reverse=False):
for test in sorted(tests.items()): for test in sorted(tests.items()):
entry = {"unit": unit, "test": test[0]} entry = {"unit": unit, "test": test[0]}
if test[1]['uid'] != "(null)": if test[1]['uid'] != "":
entry['uid'] = test[1]['uid'] entry['uid'] = test[1]['uid']
entry['vc'] = test[1]['vc'] entry['vc'] = test[1]['vc']
entry['req'] = test[1]['req'] entry['req'] = test[1]['req']
@@ -110,7 +110,7 @@ def regen():
test_count += 1 test_count += 1
with open(REQ_FILE, "w+") as outfile: with open(REQ_FILE, "w+") as outfile:
json_text = json.dumps(output_list, indent=4).replace(" \n", "\n") 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("Generated updated version of \"%s\" based on tests in \"%s\"." % (REQ_FILE, RESULTS_FILE))
print("Required tests: %d" % test_count) print("Required tests: %d" % test_count)