-
Notifications
You must be signed in to change notification settings - Fork 127
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
[PATCH v12] one more try to add nice stats for Shippable #309
Conversation
c0e0184
to
3f3d0b1
Compare
test/common/odp_cunit_common.c
Outdated
#include <odp_api.h> | ||
#include "odp_cunit_common.h" | ||
#include <odp/helper/odph_api.h> | ||
/* Globals */ | ||
static odph_odpthread_t thread_tbl[MAX_WORKERS]; | ||
static odp_instance_t instance; | ||
|
||
extern const char *__progname; |
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.
Please use a copy of argv[0]
instead of progname.
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.
save argv[0] in some global variable?
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.
@muvarov yes
test/common/odp_cunit_common.c
Outdated
} | ||
|
||
CU_automated_run_tests(); | ||
#else |
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.
This should be refactored to a function which is selected basing on TEST_CUNIT_XML
, rather than having #ifdef
directly in the function body.
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.
@muvarov I still do not like this piece. Maybe you can add a runtime switch through environment variable? Then there will be no requirement for extra AM_CONDITIONAL/AC_DEFINE
test/m4/validation.m4
Outdated
AC_ARG_ENABLE([cunit_out_xml], | ||
[AS_HELP_STRING([--enable-cunit_out_xml], | ||
[include additional debugging code ] | ||
[(set to 'full' to enable all --enable-*-debug-* options)])], |
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.
This is just incorrect
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.
yep, thanks it's copy paste text
test/Makefile.inc
Outdated
@@ -17,6 +17,9 @@ INCFLAGS = \ | |||
|
|||
AM_CPPFLAGS = $(INCFLAGS) | |||
AM_CFLAGS = $(CUNIT_CFLAGS) | |||
if cunit_out_xml | |||
AM_CFLAGS += -DTEST_CUNIT_XML | |||
endif |
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.
This looks like an overkill. I'd suggest to use Autoconf variable rather than Automake conditional here.
3f3d0b1
to
20b050e
Compare
20b050e
to
6edcb07
Compare
@ttrahan this PR adds Junit stats and copies it to results directory. But I think parsing script needs to be adjusted to support that output. I do not see that stats are updated. |
6edcb07
to
6afa711
Compare
6afa711
to
d5e6740
Compare
test/m4/validation.m4
Outdated
[AS_HELP_STRING([--enable-cunit_out_xml], | ||
[output to xml] | ||
[(output test results to xml instead of plain text)])], | ||
cunit_out_xml=yes, cunit_out_xml=no) |
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.
Ideally this should also be escaped with square brackets.
test/common/odp_cunit_common.c
Outdated
} | ||
|
||
CU_automated_run_tests(); | ||
#else |
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.
@muvarov I still do not like this piece. Maybe you can add a runtime switch through environment variable? Then there will be no requirement for extra AM_CONDITIONAL/AC_DEFINE
test/common/odp_cunit_common.h
Outdated
#include <CUnit/TestDB.h> | ||
#if TEST_CUNIT_XML | ||
#include <CUnit/Automated.h> | ||
#endif |
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.
No need to hide it under #if
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.
our arm tests use some previous version where function declared as finc(); i.e. not func(void) and gcc fails on it. In task which run inside Shippable it's corrected.
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.
@muvarov then it's better to update CUnit version on target, rather than workaround its bugs.
test/m4/validation.m4
Outdated
[TEST_CUNIT_XML=0]) | ||
AC_DEFINE_UNQUOTED([TEST_CUNIT_XML], [$TEST_CUNIT_XML], | ||
[Define to 1 to output to xml]) | ||
AM_CONDITIONAL([cunit_out_xml], [test "x$cunit_out_xml" = "xyes"]) |
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.
Conditional is unused
0e4f68a
to
02634e0
Compare
@lumag fixed comments. This version has to show counters. For Cunit I think we only can fix header because it's already the latest release. I added comment to travis. Please take a look. |
Travis fails here due to caches for cunit. After merge it has to be ok. Clean run is here: |
@lumag ping. |
@muvarov still an #ifdef inside function code. I really suggest to move xml/plain output type to test arguments. |
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Pass args to cunit to make code commong with other tests. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
02634e0
to
4438105
Compare
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
some gcc fails on including this header but cunit is the latest stable release. So fix it in place until it will not be fixed upstream. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
4438105
to
8936749
Compare
v12: switched to getenv() instead of ifdefs as agreed. |
Reviewed-by: Dmitry Eremin-Solenikov |
Merged. |
No description provided.