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

Fix for runtime test for multilib support #487

Merged
merged 4 commits into from
Aug 26, 2023

Conversation

kkang-wr
Copy link
Contributor

@kkang-wr kkang-wr commented Aug 20, 2021

Test in a docker with:
1
$ cd /path/to/bats-core
$ ./install.sh /usr/ lib64
$ bats tests
$ ./uninstall.sh /usr/ lib64

2
$ ./install.sh /usr/
$ bats tests
$ ./uninstall.sh /usr/

Both results are as same as before:

172 tests, 5 failures, 18 skipped

@kkang-wr kkang-wr requested a review from a team as a code owner August 20, 2021 02:22
@kkang-wr kkang-wr mentioned this pull request Aug 20, 2021
2 tasks
@martin-schulze-vireso
Copy link
Member

I think the test failure already shows the problem: There are many users who will not run install.sh to "install" bats, so it should work for them as well. I also think that we should find a solution that allows uninstall to determine the correct lib path by itself without requiring the user to specify it.

I am unsure how other projects solve this problem but it might be possible to have a configuration file that only stores some variable definitions like bats_libdir and is optional.

@kkang-wr
Copy link
Contributor Author

kkang-wr commented Aug 23, 2021

I once thought use a configure file to export such kind of env variable. But I find there is a env var BATS_ROOT exported in bin/bats, so I did the same way.
I'll try to use a config file and check it exist. If not, then quit with some prompt info. I am not sure whether it works because it could put the config file in /etc directory in linux. But I am afraid it may not work for Windows.

@martin-schulze-vireso
Copy link
Member

The BATS_ROOT is easily determined by the path to the bats binary. However, the libdir is not as easily discovered. Regarding the install on windows: I am not sure if it is even used on this platform. The current install paths don't strike me as windows friendly but I did not try.

@kkang-wr
Copy link
Contributor Author

@martin-schulze-vireso I involved a config file and set with the libdir. If the config file does not exist or the env variable does not set , it assumes 'lib'. And I do some work on uninstall.sh. Let's check wether it works.

@martin-schulze-vireso martin-schulze-vireso merged commit 360c1ea into bats-core:master Aug 26, 2023
53 checks passed
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

2 participants