Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem at running generate_scorecards #6

Closed
MarceloSalazar opened this issue Jul 4, 2018 · 3 comments
Closed

Problem at running generate_scorecards #6

MarceloSalazar opened this issue Jul 4, 2018 · 3 comments

Comments

@MarceloSalazar
Copy link

Few things:

  1. It complains about test_results not being defined.
    I think this line requires extra tab.
    https://github.com/maclobdell/simple_mbed_test_runner/blob/create_scorecards/generate_scorecards.py#L96

  2. I've specified a folder to analyze files using option "-f .\test_output\master"
    However, it looks only one folder is analyzed.

  3. It's hard to get the overall picture of what happened after the test.
    Could we also generate a master json object that can later be exported using json2html module?

@maclobdell

@maclobdell
Copy link
Owner

for 1 & 2, I've made some fixes and need to verify. For 3, lets talk more.

@MarceloSalazar
Copy link
Author

MarceloSalazar commented Jul 11, 2018

I've updated to master , commit 906e5a2

I see a few things related to my previous comment

  1. Running the script inside mbed-os, but outside of test_output folder
C:\mbed\mbed-os-multi>..\simple_mbed_test_runner\generate_scorecards.py
mbed os ver: 2018-July-2
target: DISCO_F413ZH
Traceback (most recent call last):
  File "C:\mbed\simple_mbed_test_runner\generate_scorecards.py", line 106, in <module>
    main()
  File "C:\mbed\simple_mbed_test_runner\generate_scorecards.py", line 50, in main
    generate_scorecard("./", target, mbed_ver)
  File "C:\mbed\simple_mbed_test_runner\generate_scorecards.py", line 96, in generate_scorecard
    scorecard_data[toolchain] = test_results
UnboundLocalError: local variable 'test_results' referenced before assignment

It would be great if the script could search for tests results in json format

  1. Running the script and specifying a folder

C:\mbed\mbed-os-multi>..\simple_mbed_test_runner\generate_scorecards.py -f test_output\2018-July-7
mbed os ver: DISCO_F413ZH

Note, there are more folders with multiple json files.
Why did it stop on DISCO_F413ZH ?

  1. Not an issue - but an enhancement request - to discuss separately ;-)

  2. New (minor) issue - Running the script outside of an mbed-os repo:

C:\mbed\simple_mbed_test_runner>python generate_scorecards.py -h
Traceback (most recent call last):
  File "generate_scorecards.py", line 16, in <module>
    from tools.targets import TARGETS
ImportError: No module named tools.targets

Note: not a valid case, as today we need to use the tools.

@maclobdell
Copy link
Owner

this ticket is really messy. Too many issues mixed together. I think a lot of it has to do with running the script from the right location, etc. Closing this ticket now. lets re-test the current state and add tickets for any new issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants