Skip to content

Commit

Permalink
Update HW test to use environmental variables
Browse files Browse the repository at this point in the history
Signed-off-by: Travis F. Collins <[email protected]>
  • Loading branch information
tfcollins authored and commodo committed Oct 21, 2020
1 parent 59e6b22 commit be7eb02
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 3 additions & 1 deletion test/auto_rate_test_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
exit(0);// Cant find anything don't run tests
ctx = iio_create_context_from_uri(uri);
if (ctx == NULL) {
printf("No device found... skipping test");
Expand Down
6 changes: 4 additions & 2 deletions test/filter_designer_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@ int main(void)

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

char * uri = "ip:192.168.2.1";
const char* uri = getenv("URI_AD9361");
if (uri == NULL)
exit(0);// Cant find anything don't run tests
ctx = iio_create_context_from_uri(uri);
if (ctx == NULL)
exit(0);// Cant find anything don't run tests
dev = iio_context_find_device(ctx, "ad9361-phy");

for (k = 0; k < 1; k++) {
for (k = 0; k < 3; k++) {

printf("Testing rate: %lu\n",rates[k]);

Expand Down
4 changes: 3 additions & 1 deletion test/fmcomms5_sync_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,9 @@ int main(void)
{
// Set up context
struct iio_context *ctx;
char * uri = "ip:192.168.1.208";
const char* uri = getenv("URI_FMCOMMS5");
if (uri == NULL)
exit(0);// Cant find anything don't run tests
ctx = iio_create_context_from_uri(uri);
if (ctx==NULL)
exit(0);// Cant find anything don't run tests
Expand Down

0 comments on commit be7eb02

Please sign in to comment.