Skip to content

Commit

Permalink
tc-testing: Add newline when writing test case files
Browse files Browse the repository at this point in the history
When using the -i feature to generate random ID numbers for test
cases in tdc, the function that writes the JSON to file doesn't
add a newline character to the end of the file, so we have to
add our own.

Signed-off-by: Lucas Bates <lucasb@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Lucas Bates authored and David S. Miller committed Mar 30, 2018
1 parent ccdd0b4 commit c0b6ede
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tools/testing/selftests/tc-testing/tdc.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,7 @@ def generate_case_ids(alltests):
testlist.append(t)
outfile = open(f, "w")
json.dump(testlist, outfile, indent=4)
outfile.write("\n")
outfile.close()

def filter_tests_by_id(args, testlist):
Expand Down

0 comments on commit c0b6ede

Please sign in to comment.