Commit b2d208ab authored by Mark's avatar Mark Committed by Mouse

revert script debugging & change copied comments to JER

parent 0ecd5e2e
...@@ -200,7 +200,7 @@ asn_TYPE_operation_t asn_OP_GeneralizedTime = { ...@@ -200,7 +200,7 @@ asn_TYPE_operation_t asn_OP_GeneralizedTime = {
GeneralizedTime_encode_jer, GeneralizedTime_encode_jer,
#else #else
0, 0,
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ #endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
#if !defined(ASN_DISABLE_OER_SUPPORT) #if !defined(ASN_DISABLE_OER_SUPPORT)
OCTET_STRING_decode_oer, OCTET_STRING_decode_oer,
OCTET_STRING_encode_oer, OCTET_STRING_encode_oer,
......
...@@ -439,7 +439,7 @@ asn_encode_internal(const asn_codec_ctx_t *opt_codec_ctx, ...@@ -439,7 +439,7 @@ asn_encode_internal(const asn_codec_ctx_t *opt_codec_ctx,
if(er.failed_type && er.failed_type->op->jer_encoder) { if(er.failed_type && er.failed_type->op->jer_encoder) {
errno = EBADF; /* Structure has incorrect form. */ errno = EBADF; /* Structure has incorrect form. */
} else { } else {
errno = ENOENT; /* XER is not defined for this type. */ errno = ENOENT; /* JER is not defined for this type. */
} }
} }
} else { } else {
......
...@@ -31,7 +31,7 @@ asn_TYPE_operation_t asn_OP_CHOICE = { ...@@ -31,7 +31,7 @@ asn_TYPE_operation_t asn_OP_CHOICE = {
CHOICE_encode_jer, CHOICE_encode_jer,
#else #else
0, 0,
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ #endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
#if !defined(ASN_DISABLE_OER_SUPPORT) #if !defined(ASN_DISABLE_OER_SUPPORT)
CHOICE_decode_oer, CHOICE_decode_oer,
CHOICE_encode_oer, CHOICE_encode_oer,
......
...@@ -51,7 +51,7 @@ typedef void (xer_type_encoder_f)(void); ...@@ -51,7 +51,7 @@ typedef void (xer_type_encoder_f)(void);
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */ #endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
#if !defined(ASN_DISABLE_JER_SUPPORT) #if !defined(ASN_DISABLE_JER_SUPPORT)
#include <jer_encoder.h> /* Encoder into JER (XML, text) */ #include <jer_encoder.h> /* Encoder into JER (JSON, text) */
#else #else
typedef void (jer_type_encoder_f)(void); typedef void (jer_type_encoder_f)(void);
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ #endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
......
...@@ -35,23 +35,18 @@ for ref in ${top_srcdir}/tests/tests-asn1c-compiler/*.asn1.+*; do ...@@ -35,23 +35,18 @@ for ref in ${top_srcdir}/tests/tests-asn1c-compiler/*.asn1.+*; do
PROCESSING="$ref (from $src)" PROCESSING="$ref (from $src)"
LC_ALL=C sed -e 's/^found in .*/found in .../' < "$ref" > "$oldversion" LC_ALL=C sed -e 's/^found in .*/found in .../' < "$ref" > "$oldversion"
ec=0 ec=0
echo ${template}
echo "${top_builddir}/asn1c/asn1c -S ${top_srcdir}/skeletons -no-gen-OER -no-gen-UPER -no-gen-APER $flags $src > $ref"
(${top_builddir}/asn1c/asn1c -S ${top_srcdir}/skeletons -no-gen-OER -no-gen-UPER -no-gen-APER $flags "$src" | LC_ALL=C sed -e 's/^found in .*/found in .../' > "$newversion") || ec=$? (${top_builddir}/asn1c/asn1c -S ${top_srcdir}/skeletons -no-gen-OER -no-gen-UPER -no-gen-APER $flags "$src" | LC_ALL=C sed -e 's/^found in .*/found in .../' > "$newversion") || ec=$?
if [ $? = 0 ]; then if [ $? = 0 ]; then
echo "diffing"
diff $diffArgs "$oldversion" "$newversion" || ec=$? diff $diffArgs "$oldversion" "$newversion" || ec=$?
fi fi
if [ $ec != 0 ]; then if [ $ec != 0 ]; then
echo "check diffing"
LAST_FAILED="$ref (from $src)" LAST_FAILED="$ref (from $src)"
finalExitCode=$ec finalExitCode=$ec
fi fi
# rm -f $oldversion $newversion rm -f $oldversion $newversion
if [ "$1" = "regenerate" ]; then if [ "$1" = "regenerate" ]; then
echo "regenerate"
${top_builddir}/asn1c/asn1c -S ${top_srcdir}/skeletons -no-gen-OER -no-gen-UPER -no-gen-APER $flags "$src" > "$ref" ${top_builddir}/asn1c/asn1c -S ${top_srcdir}/skeletons -no-gen-OER -no-gen-UPER -no-gen-APER $flags "$src" > "$ref"
fi fi
done done
echo "final"
exit $finalExitCode exit $finalExitCode
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