forked from enlightenment/efl
eolian: add code to run static checks but don't enable yet
This adds code to run the Eolian static checker as part of tests, but considering how many failures there are at this point, does not enable it. Once they're all fixed, it can be enabled by removing the #if 0.
This commit is contained in:
parent
d9e723ae53
commit
42baaa046d
|
@ -114,6 +114,7 @@ tests/eolian/eolian_suite
|
||||||
|
|
||||||
tests_eolian_eolian_suite_SOURCES = \
|
tests_eolian_eolian_suite_SOURCES = \
|
||||||
tests/eolian/eolian_parsing.c \
|
tests/eolian/eolian_parsing.c \
|
||||||
|
tests/eolian/eolian_static.c \
|
||||||
tests/eolian/eolian_generation.c \
|
tests/eolian/eolian_generation.c \
|
||||||
tests/eolian/eolian_generated_future.c \
|
tests/eolian/eolian_generated_future.c \
|
||||||
tests/eolian/eolian_suite.c \
|
tests/eolian/eolian_suite.c \
|
||||||
|
@ -126,6 +127,7 @@ CLEANFILES += tests/eolian/generated_future.eo.h tests/eolian/generated_future.e
|
||||||
tests_eolian_eolian_suite_CPPFLAGS = -I$(top_builddir)/src/lib/efl -I$(top_builddir)/src/tests/eolian \
|
tests_eolian_eolian_suite_CPPFLAGS = -I$(top_builddir)/src/lib/efl -I$(top_builddir)/src/tests/eolian \
|
||||||
-DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/eolian\" \
|
-DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/eolian\" \
|
||||||
-DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests/eolian\" \
|
-DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests/eolian\" \
|
||||||
|
-DEO_SRC_DIR=\"$(top_srcdir)/src/lib\" \
|
||||||
-DEOLIAN_GEN="\"$(EOLIAN_GEN)\"" \
|
-DEOLIAN_GEN="\"$(EOLIAN_GEN)\"" \
|
||||||
@CHECK_CFLAGS@ \
|
@CHECK_CFLAGS@ \
|
||||||
@EOLIAN_CFLAGS@ @EO_CFLAGS@
|
@EOLIAN_CFLAGS@ @EO_CFLAGS@
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <Eolian.h>
|
||||||
|
|
||||||
|
#include "eolian_suite.h"
|
||||||
|
|
||||||
|
EFL_START_TEST(eolian_static_check)
|
||||||
|
{
|
||||||
|
Eolian_State *eos = eolian_state_new();
|
||||||
|
fail_if(!eolian_state_directory_add(eos, EO_SRC_DIR));
|
||||||
|
fail_if(!eolian_state_all_eot_files_parse(eos));
|
||||||
|
fail_if(!eolian_state_all_eo_files_parse(eos));
|
||||||
|
#if 0
|
||||||
|
/* too many failures to enable this yet */
|
||||||
|
fail_if(!eolian_state_check(eos));
|
||||||
|
#endif
|
||||||
|
eolian_state_free(eos);
|
||||||
|
}
|
||||||
|
EFL_END_TEST
|
||||||
|
|
||||||
|
void eolian_static_test(TCase *tc)
|
||||||
|
{
|
||||||
|
tcase_add_test(tc, eolian_static_check);
|
||||||
|
}
|
|
@ -12,6 +12,7 @@
|
||||||
|
|
||||||
static const Efl_Test_Case etc[] = {
|
static const Efl_Test_Case etc[] = {
|
||||||
{ "Eolian Parsing", eolian_parsing_test},
|
{ "Eolian Parsing", eolian_parsing_test},
|
||||||
|
{ "Eolian Static Analysis", eolian_static_test},
|
||||||
{ "Eolian Generation", eolian_generation_test},
|
{ "Eolian Generation", eolian_generation_test},
|
||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
#include <check.h>
|
#include <check.h>
|
||||||
#include "../efl_check.h"
|
#include "../efl_check.h"
|
||||||
void eolian_parsing_test(TCase *tc);
|
void eolian_parsing_test(TCase *tc);
|
||||||
|
void eolian_static_test(TCase *tc);
|
||||||
void eolian_generation_test(TCase *tc);
|
void eolian_generation_test(TCase *tc);
|
||||||
|
|
||||||
#endif /* _EOLIAN_SUITE_H */
|
#endif /* _EOLIAN_SUITE_H */
|
||||||
|
|
Loading…
Reference in New Issue