-
Notifications
You must be signed in to change notification settings - Fork 993
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
logging: Always run crate tests #2970
logging: Always run crate tests #2970
Conversation
Fixed the top-level build which was broken: the kata deploy Makefile was being sourced, but it was defining the first target, which became the default. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
493dcaa
to
865851a
Compare
/test |
865851a
to
829cbb8
Compare
/test |
Ensure the tests in the local `logging` crate are run for all consumers of it. Additionally, add a new test which checks that output is generated by a range of different log level `slog` macros. This is designed to ensure debug level output is always available for the consumers of the `logging` crate. Fixes: kata-containers#2969. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
829cbb8
to
d47484e
Compare
/test |
@liubin - could you tal? |
@@ -17,11 +17,16 @@ TOOLS += agent-ctl | |||
|
|||
STANDARD_TARGETS = build check clean install test vendor | |||
|
|||
default: all | |||
|
|||
all: logging-crate-tests build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does logging-crate-tests
will run twice? build
target in sub-directories will also trigger logging-crate-tests
too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@liubin - it might yes. The problem is we need to ensure the logging crate tests run however the build is invoked - either running make
from the top-level, or running make -C src/agent
for example. I'm not sure how to avoid running it multiple times whilst also ensuring that it does run. Any ideas?
ftr, running the logging crate tests twice takes < 300ms on a laptop system so it's potentially unecessary to run multiple times, but it isn't going to increase the build time much.
Ideally, we want cargo test
and cargo test --release
to run when any of the other components run cargo build
, but I don't think that's possible. I did think of one way, but it's horrid: create pkg/logging/build.rs
which runs make
! ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a hack, but I could then remove all the changes to the other makefiles.
/retest-vfio |
CI green, so just need 1 more ack here. |
Going through this one now, James. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jodh-intel, lgtm, but take this with a grain of salt considering my current rust skills!
Thanks!
Thanks @fidencio ! ;) |
Ensure the tests in the local
logging
crate are run for all consumersof it.
Additionally, add a new test which checks that output is generated by a
range of different log level
slog
macros. This is designed to ensuredebug level output is always available for the consumers of the
logging
crate.Fixes: #2969.
Signed-off-by: James O. D. Hunt james.o.hunt@intel.com