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

Reorganize FMCDAQ3, ADRV9361_BOB, SYNCHRONA #20

Open
wants to merge 17 commits into
base: reorganize_tests
Choose a base branch
from

Conversation

trupples
Copy link

No description provided.

trupples added 13 commits August 8, 2023 08:44
Signed-off-by: Ioan Dragomir <[email protected]>
Signed-off-by: Ioan Dragomir <[email protected]>
Scripts which are directly run (e.g. production.sh) should be executable.
Scripts which are always `source`-d (e.g. lib/*) should not be.

Signed-off-by: Ioan Dragomir <[email protected]>
setup_env.sh sometimes fails because apt can't get the dpkg lock because of other running apt processes, such as You need to be root to run this application. This change allows for a 60s grace period before failing

Signed-off-by: Ioan Dragomir <[email protected]>
On a fresh kuiper prebuilt image, the current date&time are not synchronized to anything and are usually long in the past. This breaks apt install and potentially other utilities as well. This setup step tries to first use NTP (which I found is not available on said fresh kuiper image) and alternatively queries a well-known HTTP server (in this case, google.com) for the current date&time, as a low precision but still OK fallback.

Signed-off-by: Ioan Dragomir <[email protected]>
Required in the build step of libiio

Signed-off-by: Ioan Dragomir <[email protected]>
Signed-off-by: Ioan Dragomir <[email protected]>
To make this work, the following commit was also squashed-in:

Prepend to LD_LIBRARY_PATH instead of overwriting

The current implementation traces back to fed5304 from 5 years ago, but
combined with `setup_env.sh` adding `vars.sh` to be run in `.bashrc`,
this overwrites any other directories in LD_LIBRARY_PATH, sometimes
breaking expected `ld.so` behaviour.
@@ -3,6 +3,6 @@ ANSWER=1
SCRIPT_DIR="$(readlink -f $(dirname $0))"

echo
python3 -m pytest --color yes -vs $SCRIPT_DIR/../work/pyadi-iio/test/test_fmcomms2-3_prod.py --uri="ip:analog.local" --adi-hw-map --hw=adrv9361
python3 -m pytest --color yes -vs $SCRIPT_DIR/../work/pyadi-iio/test/test_adrv9361_prod.py --uri="ip:analog.local" --adi-hw-map --hw=adrv9361
Copy link
Collaborator

Choose a reason for hiding this comment

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

does this test_adrv9361_prod.py file actually exist?

Copy link
Author

Choose a reason for hiding this comment

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

It was added in the fmcomms_scpi branch, commit 476bbcc.

MODE="$1"
case $MODE in
"FMCDAQ3 Test")
"$SCRIPT_DIR/rf_test.sh";
Copy link
Collaborator

Choose a reason for hiding this comment

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

why the quotation marks?

Copy link
Author

Choose a reason for hiding this comment

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

I added the quotes to allow for spaces in the file path. Not absolutely necessary for the prodtest images - this is likely a harmless leftover from one of my test runs. Should I remove it the quotes consistency's sake?

Copy link
Collaborator

Choose a reason for hiding this comment

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

yes

wait_for_board_online
export BOARD_SERIAL=$(get_board_serial)
echo_blue "Starting FMCDAQ3 Test"
production "crr" "$opt" "FMCDAQ3"

Choose a reason for hiding this comment

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

it's outside the scope of this pull request, but for future reference I think the "crr"/target parameter is redundant, i think only talise uses it for something minor. Perhaps it should be removed in future versions

sudo timedatectl set-ntp true && return

# Alternatively, use a much less precise source, but still good enough for certificates to be valid
sudo date +"%d %b %Y %T %Z" -s "$(curl -s --head http://google.com | grep '^Date:' | cut -d' ' -f 3-)"

Choose a reason for hiding this comment

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

just a nitpick but since this step and prereqs install require internet, maybe it would be useful to add a short connection check in the beginning of the script, to avoid going further if the device is not connected to the internet (maybe just a ping?)

Copy link
Author

Choose a reason for hiding this comment

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

Does def3e61 look alright?

Choose a reason for hiding this comment

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

looks good to me

trupples and others added 4 commits January 15, 2024 13:36
Signed-off-by: Ioan Dragomir <[email protected]>
This is a squashed commit which introduces the following:

1. Move synchrona test files to the proper folder (synch -> synchrona)
2. Fix bash syntax errors in lib/utils.sh (whitespace around env var assignments)
3. Change DUT subnet to /16 instead of /24
4. Copy the test files to the DUT using rsync at the beginning of each test
5. Detect ADT7422 hwmon index instead of hardcoding hwmon1 (hwmon indices may change, they are not bound to a device)
@trupples trupples changed the title Reorganize FMCDAQ3, ADRV9361_BOB Reorganize FMCDAQ3, ADRV9361_BOB, SYNCHRONA Apr 21, 2024
Copy link

@ranechita ranechita left a comment

Choose a reason for hiding this comment

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

take it out of draft before merging, otherwise looks good to me

@trupples trupples marked this pull request as ready for review June 5, 2024 10:14
@trupples trupples force-pushed the trupples/merge_tidy branch 3 times, most recently from 3a807f3 to 670d7eb Compare July 11, 2024 16:36
@trupples trupples force-pushed the trupples/merge_tidy branch from e4e5a91 to 9f88cbf Compare July 22, 2024 07:49
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.

3 participants