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

Use correct defaults sourcing for platform #1280

Merged

Conversation

jkonecny12
Copy link
Member

There are two issues breaking this functionality.

  • The functions.sh is currently sourcing only not platform specific defaults file. This works sometimes but sometimes but it might went wrong on the other than Fedora platforms.

  • The PLATFORM_NAME is incorrectly propagated to tests as PLATFORM variable. It was propagated from the container call this way and used correctly in the run-kstest with this name. However, all these variables are also propagated to shell scripts for given tests. There this name fails because PLATFORM_NAME is used everywhere else.

There are two issues breaking this functionality.

- The functions.sh is currently sourcing only not platform specific
defaults file. This works sometimes but sometimes but it might went
wrong on the other than Fedora platforms.

- The PLATFORM_NAME is incorrectly propagated to tests as PLATFORM
variable. It was propagated from the container call this way and used
correctly in the run-kstest with this name. However, all these variables
are also propagated to shell scripts for given tests. There this name
fails because PLATFORM_NAME is used everywhere else.
# Platform-specific defaults
if [[ -n "${PLATFORM_NAME}" ]]; then
if [[ -e "scripts/defaults-${PLATFORM_NAME}.sh" ]]; then
. "scripts/defaults-${PLATFORM_NAME}.sh"

Check warning

Code scanning / shellcheck

SC1090 Warning

ShellCheck can't follow non-constant source. Use a directive to specify location.
Copy link
Member Author

Choose a reason for hiding this comment

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

The code is taken from elsewhere plus the issue raised here is not really an issue just it's not able to follow. I want to ignore this.

@jkonecny12
Copy link
Member Author

/test-tmt

Copy link
Contributor

@M4rtinK M4rtinK left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@jkonecny12 jkonecny12 merged commit 9ecebf2 into rhinstaller:master Aug 13, 2024
4 of 5 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.

2 participants