mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-upf.git
synced 2025-11-02 04:53:24 +00:00
Defining a protocol of message types with lists of IEs bears a lot of repetitive, copy-paste-error-prone writing out of data structures. Add a third layer to libosmo-tlv, which allows helpful code generation. By non-repetitive data structures that briefly describe the protocol's messages and IEs, generate possibly repetitive IE list arrays and decoded-struct definitions automatically, avoiding grunt work errors. I tried C macros for this at first, but it became too convoluted. Generating C code that can be read and grepped makes things easier. A usage example is found in tests/libosmo-tlv/test_tlv_gen/. Related: SYS#5599 Change-Id: Ifb3ea54d2797ce060b95834aa117725ec2d6c4cf
21 lines
644 B
Plaintext
21 lines
644 B
Plaintext
AT_INIT
|
|
AT_BANNER([Regression tests.])
|
|
|
|
AT_SETUP([tlv])
|
|
AT_KEYWORDS([tlv])
|
|
cat $abs_srcdir/libosmo-tlv/tlv_test.ok > expout
|
|
AT_CHECK([$abs_top_builddir/tests/libosmo-tlv/tlv_test], [], [expout], [ignore])
|
|
AT_CLEANUP
|
|
|
|
AT_SETUP([tlv_dec_enc])
|
|
AT_KEYWORDS([tlv_dec_enc])
|
|
cat $abs_srcdir/libosmo-tlv/tlv_dec_enc_test.ok > expout
|
|
AT_CHECK([$abs_top_builddir/tests/libosmo-tlv/tlv_dec_enc_test], [], [expout], [ignore])
|
|
AT_CLEANUP
|
|
|
|
AT_SETUP([tlv_gen])
|
|
AT_KEYWORDS([tlv_gen])
|
|
cat $abs_srcdir/libosmo-tlv/test_tlv_gen/tlv_gen_test.ok > expout
|
|
AT_CHECK([$abs_top_builddir/tests/libosmo-tlv/test_tlv_gen/tlv_gen_test], [], [expout], [ignore])
|
|
AT_CLEANUP
|