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

feat(hardware-testing): Added hardware testing usb package #13140

Merged
merged 9 commits into from
Jul 24, 2023

Conversation

vegano1
Copy link
Contributor

@vegano1 vegano1 commented Jul 20, 2023

Overview

The hardware-testing package is used for testing various parts of the Flex, however in order to use it you have to have a computer that has all of our packages, and dependencies and has been set up to run our software. This poses some friction as it requires a lot to get up and running. This pr solves this problem by creating a hardware-testing package, that can be run from a USB drive plugged directly into the Flex.

Test Plan

  • Use make -C hardware-testing setup-usb-module and make sure it generates a /dist/hardware_testing_usb-*.tar.gz file
  • Use make -C hardware-testing setup-usb-module usb_dir="<usb dir>" and make sure a hardware_testing_usb dir is extracted to the usb dir specified.
  • Make sure you can run hardware-testing scripts after running ./setup.sh from the Flex
  • Make sure you can run hardware-testing scripts even after reboots
  • Make sure you cant run hardware-testing scripts if the USB thumb drive has been removed.
  • Make sure you cant run hardware-testing scripts after running ./setup teardown and re-login.
  • Make sure the script does an auto teardown if the USB is not found.

Changelog

  • Added setup-usb-module to hardware-testing Makefile, which creates a USB package
  • Added hardware-testing entry to scripts/python_build_utils.py so we can get the package version
  • Added correct versioning based on git tags when producing sdist/wheel files

Review requests

  • If we want to have hardware-testing logging go to the thumb drive that should be a separate pr.
  • Anything I might be missing?

Risk assessment

Low, internal tooling

@vegano1 vegano1 requested review from a team as code owners July 20, 2023 15:58
@vegano1 vegano1 requested a review from andySigler July 20, 2023 15:58
@codecov
Copy link

codecov bot commented Jul 20, 2023

Codecov Report

Merging #13140 (6181f8c) into edge (1a3fc3c) will decrease coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             edge   #13140      +/-   ##
==========================================
- Coverage   72.45%   72.42%   -0.03%     
==========================================
  Files        2388     2390       +2     
  Lines       65998    66043      +45     
  Branches     7306     7306              
==========================================
+ Hits        47817    47834      +17     
- Misses      16442    16470      +28     
  Partials     1739     1739              
Flag Coverage Δ
app 71.26% <ø> (+0.02%) ⬆️
g-code-testing 96.44% <ø> (ø)
hardware 56.38% <ø> (-0.20%) ⬇️
notify-server 89.13% <ø> (ø)
shared-data 78.29% <ø> (ø)
system-server 96.07% <ø> (ø)
update-server 64.64% <ø> (ø)
usb-bridge 81.35% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 24 files with indirect coverage changes

Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

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

This will print the error message in the console at login if the usb drive isn't plugged in, right? We shouldn't do that because it will happen every time if we forget to remove it before shipping a robot. In that case it should either silently fail or silently teardown.

hardware-testing/Makefile Outdated Show resolved Hide resolved
hardware-testing/Makefile Outdated Show resolved Hide resolved
@vegano1 vegano1 requested a review from sfoster1 July 20, 2023 19:08
Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

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

Nice, looks great!

@sfoster1 sfoster1 merged commit 6267e73 into edge Jul 24, 2023
44 checks passed
@sfoster1 sfoster1 deleted the hardware-testing-usb-setup branch July 24, 2023 14:30
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.

None yet

3 participants