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

NAS-132361 / 25.04 / Fix runtest.py when an absolute path is provided to --tests #14903

Merged
merged 1 commit into from
Nov 8, 2024

Conversation

bmeagherix
Copy link
Contributor

A previous fix (#14880) did not take account of when an absolute path is provided to --tests. Rectify.

With this the following all work:

~/truenas/middleware/tests$ ./runtest.py -v --ip scale3 --interface enp0s8 --password password --test test_mock_remote.py
~/truenas/middleware/tests$ ./runtest.py -v --ip scale3 --interface enp0s8 --password password --test api2/test_mock_remote.py
~/truenas/middleware/tests$ ./runtest.py -v --ip scale3 --interface enp0s8 --password password --tests test_mock_remote.py
~/truenas/middleware/tests$ ./runtest.py -v --ip scale3 --interface enp0s8 --password password --tests api2/test_mock_remote.py
~/truenas/middleware/tests$ ./runtest.py -v --ip scale3 --interface enp0s8 --password password --tests /home/brian/truenas/middleware/tests/api2/test_mock_remote.py

@bmeagherix bmeagherix added the jira label Nov 8, 2024
@bugclerk bugclerk changed the title Fix runtest.py when an absolute path is provided to --tests NAS-132361 / 25.04 / Fix runtest.py when an absolute path is provided to --tests Nov 8, 2024
@bugclerk
Copy link
Contributor

bugclerk commented Nov 8, 2024

Copy link
Contributor

@yocalebo yocalebo left a comment

Choose a reason for hiding this comment

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

This makes sense but this is becoming unnecessarily complicated. I'm not asking for you to fix it in this PR (i'll probably open another PR) but we should consider using pathlib.Path module for this type of manipulation/checks.

@bmeagherix bmeagherix merged commit 06e4c02 into master Nov 8, 2024
1 of 3 checks passed
@bmeagherix bmeagherix deleted the fix_runtest_abs_path branch November 8, 2024 14:41
@bugclerk
Copy link
Contributor

bugclerk commented Nov 8, 2024

This PR has been merged and conversations have been locked.
If you would like to discuss more about this issue please use our forums or raise a Jira ticket.

@truenas truenas locked as resolved and limited conversation to collaborators Nov 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants