Rahix / tbot

Automation/Testing tool for Embedded Linux Development
https://tbot.tools
GNU General Public License v3.0
84 stars 21 forks source link

Move copy() into linux module and add a utils.copy_to_dir() helper to contrib #77

Closed Rahix closed 1 year ago

Rahix commented 1 year ago

The main purpose of the PR is adding the copy_to_dir() helper in tbot_contrib.utils. This helper can be used to copy one or many files to a directory. The copies will each have the same name as the respective source file. copy_to_dir() will return the path(s) to the copies.

Under the hood, it uses copy() which was moved from tc.shell to machine.linux (although the old name still exists for compat). This means that copy_to_dir() also works across SSH connections.

Documentation: https://tbot.tools/contrib/utils.html#tbot_contrib.utils.copy_to_dir

Rahix commented 1 year ago

Fixed selftests failing on Fedora... They store the sftp-server in a different location so the test needs to detect the correct one...

Rahix commented 1 year ago

And now the selftest should also work for debian/ubtuntu systems...