crospts: Fix the error when no data in results-chart.json

If the CrosPTS failed to run the tast test, there is no data in
results-chart.json. This causes the generating CSV failure.
Fix this error by skipping the no keys in JSON object.
Skip the data uploading, if there is no any results chart data produced.

BUG=b:323753496
TEST=./run_crospts.py -p all -u cns <DUT> with an error empty
results-chart.json

Change-Id: I7cb6537b77a224c59a6c2486ceebc75ba9a51791
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crospts/+/5267197
Tested-by: Darren Wu <[email protected]>
Reviewed-by: David Stevens <[email protected]>
Commit-Queue: Darren Wu <[email protected]>
1 file changed
tree: 21e59915ed8df95b06d0acfa92a5a1c70eca90f3
  1. build/
  2. docs/
  3. tools/
  4. .gitignore
  5. DIR_METADATA
  6. OWNERS
  7. PRESUBMIT.cfg