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

Fix --notestendpt handling #86

Merged
merged 4 commits into from
Apr 14, 2016
Merged

Fix --notestendpt handling #86

merged 4 commits into from
Apr 14, 2016

Conversation

sukidog
Copy link
Contributor

@sukidog sukidog commented Mar 29, 2016

The test logic was requiring a target executable even when --notestendpt was specified. The target binary is used only by the endpoint testing.

@c1728p9
Copy link
Contributor

c1728p9 commented Apr 13, 2016

@mbed-bot: TEST

project_dir_list = os.listdir(tool_dir)
if not project_dir_list:
print (errmsg)
exit(-1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be better to raise and exception here or add a 'vaild' field rather than calling exit. That way the script using this is able to recover from an error rather than exiting

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about that but then noticed there are a number of exit(-1) calls in run_test.py. I was trying to be consistent. Are you saying to throw an exception so the calling function can continue if it wishes to?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By script I meant run_test.py. Currently everything which uses exit() resides in run_test.py and isn't meant to be used outside that script. This is more of a nitpick so don't feel like it needs to change. If the need arises in the future to make this case recoverable then it can be changed later.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. I will leave it as is. Doesn't seem like a recoverable error condition. Like you said, we can change that as needed

John

On Apr 14, 2016, at 3:34 PM, Russ Butler [email protected] wrote:

In test/daplink_firmware.py:

     project_dir_list = os.listdir(tool_dir)
  •    if not project_dir_list:
    
  •        print (errmsg)
    
  •        exit(-1) 
    
    By script I meant run_test.py. Currently everything which uses exit() resides in run_test.py and isn't meant to be used outside that script. This is more of a nitpick so don't feel like it needs to change. If the need arises in the future to make this case recoverable then it can be changed later.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub

@c1728p9
Copy link
Contributor

c1728p9 commented Apr 14, 2016

@mbed-bot: TEST

@c1728p9
Copy link
Contributor

c1728p9 commented Apr 14, 2016

Thanks for the improvements!

@c1728p9 c1728p9 merged commit 3b4022b into ARMmbed:master Apr 14, 2016
gerargz added a commit to microbit-foundation/DAPLink that referenced this pull request Jan 6, 2021
…handling when target flash operation is in progress
gerargz added a commit to microbit-foundation/DAPLink that referenced this pull request Jan 6, 2021
mbrossard pushed a commit to mbrossard/DAPLink that referenced this pull request Aug 5, 2021
…handling when target flash operation is in progress
mbrossard pushed a commit to mbrossard/DAPLink that referenced this pull request Aug 5, 2021
c1728p9 pushed a commit to c1728p9/DAPLink that referenced this pull request Aug 14, 2021
…handling when target flash operation is in progress
c1728p9 pushed a commit to c1728p9/DAPLink that referenced this pull request Aug 14, 2021
mathias-arm pushed a commit to mathias-arm/DAPLink that referenced this pull request Aug 20, 2021
…handling when target flash operation is in progress
mathias-arm pushed a commit to mathias-arm/DAPLink that referenced this pull request Aug 20, 2021
gaborcsapo pushed a commit to gaborcsapo/DAPLink that referenced this pull request Jun 29, 2022
…handling when target flash operation is in progress
gaborcsapo pushed a commit to gaborcsapo/DAPLink that referenced this pull request Jun 29, 2022
gaborcsapo pushed a commit to gaborcsapo/DAPLink that referenced this pull request Jun 29, 2022
…handling when target flash operation is in progress
gaborcsapo pushed a commit to gaborcsapo/DAPLink that referenced this pull request Jun 29, 2022
gaborcsapo pushed a commit to gaborcsapo/DAPLink that referenced this pull request Jun 29, 2022
…handling when target flash operation is in progress
gaborcsapo pushed a commit to gaborcsapo/DAPLink that referenced this pull request Jun 29, 2022
gaborcsapo pushed a commit to gaborcsapo/DAPLink that referenced this pull request Jun 29, 2022
…handling when target flash operation is in progress
gaborcsapo pushed a commit to gaborcsapo/DAPLink that referenced this pull request Jun 29, 2022
gaborcsapo pushed a commit to gaborcsapo/DAPLink that referenced this pull request Jun 29, 2022
…handling when target flash operation is in progress
gaborcsapo pushed a commit to gaborcsapo/DAPLink that referenced this pull request Jun 29, 2022
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

Successfully merging this pull request may close these issues.

2 participants