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

Update HW test to use environmental variables #58

Merged
merged 1 commit into from
Oct 21, 2020
Merged

Update HW test to use environmental variables #58

merged 1 commit into from
Oct 21, 2020

Conversation

tfcollins
Copy link
Contributor

This PR is designed to make the library testable with the hardware testing harness where URIs are parameterizable.
This branch has been running fine in the harness for ~2 weeks.

Signed-off-by: Travis F. Collins [email protected]

@@ -52,7 +52,9 @@ int main(void)

unsigned long rates[] = {520888, 600000, 1000000, 10000000, 20000000, 40000000, 60000000};

char * uri = "ip:192.168.2.1";
const char* uri = getenv("URI_AD9361");
if (uri == NULL)
Copy link
Contributor

Choose a reason for hiding this comment

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

why not leave defaults here?

if (uri == NULL)
    uri = "ip:192.168.2.1;

if the IP doesn't work, if (ctx == NULL) should bail

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 would say we don't do this since

  1. You don't have to wait for timeouts when running tests
  2. You do not accidentally run a test on a board you don't explicitly want to (ran into this issue with M2K attached instead of Pluto)

Copy link
Contributor

Choose a reason for hiding this comment

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

Fine by me
Will merge tomorrow if no objections

Copy link
Contributor

Choose a reason for hiding this comment

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

oh; just thought of something;
would a message be a good idea? in case the env-vars aren't defined?

@commodo
Copy link
Contributor

commodo commented Oct 19, 2020

one note;
otherwise looks good from my side

@commodo commodo merged commit be7eb02 into master Oct 21, 2020
@commodo commodo deleted the hw-tests branch October 21, 2020 07:08
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