teemtee / tmt

Test Management Tool
MIT License
85 stars 129 forks source link

Failed to run tests with libraries after login to test machine #803

Open brakogh opened 3 years ago

brakogh commented 3 years ago

Hi,

I'm using following command to run test and login to test machine: tmt run --all -vvv provision --how minute --image rhel8 test --name . login

Test run ok. After login, I'm in following directory: /var/tmp/tmt/run-018/plans/all/tree/

Naturally, I'm trying to run test from "tree" directory, in my case /var/tmp/tmt/run-018/plans/all/tree/integration/php-mariadb, by running runtest.sh. This is failing because test can't find requested libraries. After dicussion with @lukaszachy we found out that I have to be using /var/tmp/tmt/run-018/plans/all/discover/default/tests/integration/php-mariadb instead of tree/integration/php-mariadb directory. Running ./runtest.sh from discover directory works as expected. So can you do cd /var/tmp/tmt/run-018/plans/all/discover/default/tests/ to be in correct directory right after login?

lukaszachy commented 3 years ago

I think we miss option to login immediately after failed test and cd into tests' workdir automatically.

Athwale commented 4 months ago

We are still hitting this problem in 2024.

happz commented 2 months ago

It seems this might be related to tmt try also not entering test path after logging in. Possible ideas: with a single test, jumping to its directory; with multiple discover phases, jumping to the last one's workdir? @falconizmi volunteered to take a look.