Commit 700df493 authored by Lev Walkin's avatar Lev Walkin

reshuffled the tests layout

parent 7c876301
......@@ -36,8 +36,8 @@ stamp-h*
/asn1c/unber
/asn1c/enber
# /asn1c/tests/
/asn1c/tests/test-*
# /tests/
/tests/tests-c-compiler/test-*
# /doc/docsrc
doc/docsrc/*.aux
......
......@@ -8,7 +8,7 @@ SUBDIRS = \
libasn1parser libasn1fix \
libasn1print libasn1compiler \
skeletons examples \
doc tests asn1c
doc asn1c tests
docsdir = $(datadir)/doc/asn1c
......
@CODE_COVERAGE_RULES@
SUBDIRS = . tests
AM_CFLAGS = @ADD_CFLAGS@
AM_CPPFLAGS = \
-I${top_srcdir}/libasn1compiler \
......@@ -21,7 +19,7 @@ bin_PROGRAMS = asn1c unber enber
noinst_HEADERS = sys-common.h
dist_check_SCRIPTS = check-xxber.sh check-parsing.sh
dist_check_SCRIPTS = check-xxber.sh
TESTS_ENVIRONMENT= top_srcdir=${top_srcdir}
TESTS = $(dist_check_SCRIPTS)
CLEANFILES = .check-xxber.*.tmp .check-parsing.*.tmp
CLEANFILES = .check-xxber.*.tmp
......@@ -145,21 +145,22 @@ AC_PATH_PROG([PANDOC], pandoc)
AM_CONDITIONAL([HAVE_PANDOC], [test -n "$PANDOC"])
AC_CONFIG_FILES([\
asn1c/tests/check-src/Makefile \
skeletons/tests/Makefile \
libasn1compiler/Makefile \
libasn1parser/Makefile \
libasn1print/Makefile \
asn1c/tests/Makefile \
libasn1fix/Makefile \
doc/docsrc/Makefile \
skeletons/Makefile \
examples/Makefile \
doc/man/Makefile \
tests/Makefile \
asn1c/Makefile \
doc/Makefile \
Makefile \
tests/tests-c-compiler/check-src/Makefile \
tests/tests-asn1c-compiler/Makefile \
tests/tests-c-compiler/Makefile \
skeletons/tests/Makefile \
libasn1compiler/Makefile \
libasn1parser/Makefile \
libasn1print/Makefile \
libasn1fix/Makefile \
doc/docsrc/Makefile \
skeletons/Makefile \
examples/Makefile \
doc/man/Makefile \
tests/Makefile \
asn1c/Makefile \
doc/Makefile \
Makefile \
])
AC_OUTPUT
......@@ -40,6 +40,6 @@ check_crange_LDADD = $(noinst_LTLIBRARIES) \
check_PROGRAMS = check_crange check_fixer
TESTS_ENVIRONMENT = ASN1_TESTS_DIR=${top_srcdir}/tests
TESTS_ENVIRONMENT = ASN1_TESTS_DIR=${top_srcdir}/tests/tests-asn1c-compiler
TESTS = ${check_PROGRAMS}
......@@ -60,7 +60,7 @@ main(int ac, char **av) {
if(ac <= 1) {
const char *asn1_tests_dir = getenv("ASN1_TESTS_DIR");
if(!asn1_tests_dir)
asn1_tests_dir = TOP_SRCDIR_S "/tests";
asn1_tests_dir = TOP_SRCDIR_S "/tests/tests-asn1c-compiler";
fprintf(stderr, "Testing in %s...\n", asn1_tests_dir);
ret = chdir(asn1_tests_dir);
if(ret == -1)
......@@ -196,7 +196,7 @@ check(const char *fname,
if(r_value == 0) {
asn1p_t *std_asn;
std_asn = asn1p_parse_file("../skeletons/standard-modules/ASN1C-UsefulInformationObjectClasses.asn1", A1P_NOFLAGS);
std_asn = asn1p_parse_file("../../skeletons/standard-modules/ASN1C-UsefulInformationObjectClasses.asn1", A1P_NOFLAGS);
if(std_asn) {
asn1p_module_t *mod;
while((mod = TQ_REMOVE(&(std_asn->modules), mod_next))) {
......
SUBDIRS = tests-asn1c-compiler tests-c-compiler
EXTRA_DIST = README
EXTRA_DIST = README $(srcdir)/*asn1*
This is a collection of various little ASN.1 modules, used independently
by several different testing engines below the main tree (i.e. libasn1fix)
for stressing various aspects of compiler operation.
tests-asn1c-compiler - tests behavior of asn1c compiler, textually
tests-c-compiler - attempts to compile C results of asn1c output
The files follow certain naming conventions:
Source file:
<Index>-<arbitrary-name>-{OK|SE|NP}.asn1
Regenerator test file:
<Index>-<arbitrary-name>-{OK|SE|NP}.asn1.[<compiler-flags>]
Where
<Index> is arbitrary number (digits)
<arbitrary-name> is arbitrary string, without dots
OK file syntax and semantics are absolutely correct
SE file semantics is wrong
SW file semantics is suspicious (warning)
NP file syntax is incorrect, file not parseable
<compiler-flags> command-line flags for compiler
Example:
07-int-OK.asn1 # Correct ASN.1 file
07-int-OK.asn1.-EF # Test of file regeneration with -E -F flags.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment