Skip to content

Conversation

@dcandler
Copy link
Collaborator

@dcandler dcandler commented Dec 2, 2024

Testing with QEMU is implicitly enabled by default, but configuring the project to run with tests requires QEMU. As testing with QEMU is considered optional, it should be possible to disable tests when QEMU is not available or testing is not needed.

Since there is already an option for controlling FVP testing, this patch adds a similar option for QEMU, ENABLE_QEMU_TESTING, which instead defaults to ON. This can then be turned off when QEMU is not installed, so that configurations where QEMU is expected can suitably detect and show an error when it is missing.

Copy link
Contributor

@smithp35 smithp35 left a comment

Choose a reason for hiding this comment

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

Code change LGTM, I think we may want to change the help text.

file(READ ${variant_json_file} variant_json_str)
string(JSON test_executor GET ${variant_json_str} "args" "common" "TEST_EXECUTOR")

# FVP testing should default to off, so override any
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this comment need to be revised now that both FVP and QEMU testing is optional?

set(LIBC_HDRGEN "" CACHE PATH "Path to prebuilt lbc-hdrgen if not included in LLVM binaries set by LLVM_BINARY_DIR")
option(
ENABLE_QEMU_TESTING
"Tests using QEMU are enabled by default, but can be disabled."
Copy link
Contributor

Choose a reason for hiding this comment

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

The help text, while correct, doesn't fit well with ENABLE_QEMU_TESTING. It would fit better with a DISABLE_QEMU_TESTING option.

Perhaps

Enable tests that use QEMU. This option is ON by default.

If the text is changed, would be good to update the other places too.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done, and updated FVP options to match.

Testing with QEMU is implicitly enabled by default, but configuring
the project to run with tests requires QEMU. As testing with QEMU
is considered optional, it should be possible to disable tests when
QEMU is not available or testing is not needed.

Since there is already an option for controlling FVP testing, this
patch adds a similar option for QEMU, ENABLE_QEMU_TESTING, which
instead defaults to ON. This can then be turned off when QEMU is
not installed, so that configurations where QEMU is expected can
suitably detect and show an error when it is missing.
Copy link
Contributor

@smithp35 smithp35 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the update.

@dcandler dcandler merged commit 0b2dce0 into ARM-software:main Dec 2, 2024
1 check passed
@dcandler dcandler deleted the enable_qemu_option branch December 2, 2024 11:09
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