AT_INIT
AT_BANNER([Regression tests.])


# todo.. create one macro for it
AT_SETUP([a5])
AT_KEYWORDS([a5])
cat $abs_srcdir/a5/a5_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/a5/a5_test], [0], [expout])
AT_CLEANUP

AT_SETUP([abis])
AT_KEYWORDS([abis])
cat $abs_srcdir/abis/abis_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/abis/abis_test], [0], [expout], [ignore])
AT_CLEANUP

AT_SETUP([ctrl])
AT_KEYWORDS([ctrl])
cat $abs_srcdir/ctrl/ctrl_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/ctrl/ctrl_test], [0], [expout], [ignore])
AT_CLEANUP

AT_SETUP([kasumi])
AT_KEYWORDS([kasumi])
cat $abs_srcdir/kasumi/kasumi_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/kasumi/kasumi_test], [0], [expout])
AT_CLEANUP

AT_SETUP([bits])
AT_KEYWORDS([bits])
cat $abs_srcdir/bits/bitrev_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/bits/bitrev_test], [0], [expout])
AT_CLEANUP

AT_SETUP([bitvec])
AT_KEYWORDS([bitvec])
cat $abs_srcdir/bitvec/bitvec_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/bitvec/bitvec_test], [0], [expout])
AT_CLEANUP

AT_SETUP([bitcomp])
AT_KEYWORDS([bitcomp])
cat $abs_srcdir/bits/bitcomp_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/bits/bitcomp_test], [0], [expout])
AT_CLEANUP

AT_SETUP([bitfield])
AT_KEYWORDS([bitfield])
cat $abs_srcdir/bits/bitfield_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/bits/bitfield_test], [0], [expout])
AT_CLEANUP

AT_SETUP([conv])
AT_KEYWORDS([conv])
cat $abs_srcdir/conv/conv_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/conv/conv_test], [0], [expout])
AT_CLEANUP

AT_SETUP([conv_gsm0503])
AT_KEYWORDS([conv_gsm0503])
cat $abs_srcdir/conv/conv_gsm0503_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/conv/conv_gsm0503_test], [0], [expout])
AT_CLEANUP

AT_SETUP([coding])
AT_KEYWORDS([coding])
cat $abs_srcdir/coding/coding_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/coding/coding_test], [0], [expout])
AT_CLEANUP

AT_SETUP([msgb])
AT_KEYWORDS([msgb])
cat $abs_srcdir/msgb/msgb_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/msgb/msgb_test], [0], [expout], [ignore])
AT_CLEANUP

AT_SETUP([gea])
AT_KEYWORDS([gea])
cat $abs_srcdir/gea/gea_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/gea/gea_test], [0], [expout])
AT_CLEANUP

if ENABLE_MSGFILE
AT_SETUP([msgfile])
AT_KEYWORDS([msgfile])
cp $abs_srcdir/msgfile/msgconfig.cfg .
cat $abs_srcdir/msgfile/msgfile_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/msgfile/msgfile_test], [0], [expout])
AT_CLEANUP
endif

AT_SETUP([sms])
AT_KEYWORDS([sms])
cat $abs_srcdir/sms/sms_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/sms/sms_test], [0], [expout])
AT_CLEANUP

AT_SETUP([smscb])
AT_KEYWORDS([smscb])
cat $abs_srcdir/smscb/smscb_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/smscb/smscb_test], [0], [expout])
AT_CLEANUP

AT_SETUP([ussd])
AT_KEYWORDS([ussd])
cat $abs_srcdir/ussd/ussd_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/ussd/ussd_test], [0], [expout], [ignore])
AT_CLEANUP

AT_SETUP([auth])
AT_KEYWORDS([auth])
cat $abs_srcdir/auth/milenage_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/auth/milenage_test], [0], [expout], [ignore])
AT_CLEANUP

AT_SETUP([comp128])
AT_KEYWORDS([comp128])
cat $abs_srcdir/comp128/comp128_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/comp128/comp128_test], [0], [expout])
AT_CLEANUP

AT_SETUP([lapd])
AT_KEYWORDS([lapd])
cat $abs_srcdir/lapd/lapd_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/lapd/lapd_test], [0], [expout], [ignore])
AT_CLEANUP

AT_SETUP([gsm0502])
AT_KEYWORDS([gsm0502])
cat $abs_srcdir/gsm0502/gsm0502_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/gsm0502/gsm0502_test], [0], [expout], [ignore])
AT_CLEANUP

AT_SETUP([dtx])
AT_KEYWORDS([dtx])
cat $abs_srcdir/dtx/dtx_gsm0503_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/dtx/dtx_gsm0503_test], [0], [expout], [ignore])
AT_CLEANUP

AT_SETUP([gsm0808])
AT_KEYWORDS([gsm0808])
cat $abs_srcdir/gsm0808/gsm0808_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/gsm0808/gsm0808_test], [0], [expout], [ignore])
AT_CLEANUP

AT_SETUP([gsm29205])
AT_KEYWORDS([gsm29205])
cat $abs_srcdir/gsm29205/gsm29205_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/gsm29205/gsm29205_test], [0], [expout], [ignore])
AT_CLEANUP

AT_SETUP([gsm0408])
AT_KEYWORDS([gsm0408])
cat $abs_srcdir/gsm0408/gsm0408_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/gsm0408/gsm0408_test], [0], [expout], [ignore])
AT_CLEANUP

AT_SETUP([gsm48_rest_octets])
AT_KEYWORDS([gsm48_rest_octets])
cat $abs_srcdir/gsm48/rest_octets_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/gsm48/rest_octets_test], [0], [expout], [ignore])
AT_CLEANUP

AT_SETUP([gprs])
AT_KEYWORDS([gprs])
cat $abs_srcdir/gprs/gprs_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/gprs/gprs_test], [0], [expout], [ignore])
AT_CLEANUP

AT_SETUP([logging])
AT_KEYWORDS([logging])
cat $abs_srcdir/logging/logging_test.ok > expout
cat $abs_srcdir/logging/logging_test.err > experr
AT_CHECK([$abs_top_builddir/tests/logging/logging_test], [0], [expout], [experr])
AT_CLEANUP

AT_SETUP([codec])
AT_KEYWORDS([codec])
cat $abs_srcdir/codec/codec_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/codec/codec_test], [0], [expout], [ignore])
AT_CLEANUP

AT_SETUP([codec_ecu_fr])
AT_KEYWORDS([codec_ecu_fr])
cat $abs_srcdir/codec/codec_ecu_fr_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/codec/codec_ecu_fr_test], [0], [expout], [ignore])
AT_CLEANUP

AT_SETUP([fr])
AT_KEYWORDS([fr])
cat $abs_srcdir/fr/fr_test.ok > expout
cat $abs_srcdir/fr/fr_test.err > experr
AT_CHECK([$abs_top_builddir/tests/fr/fr_test], [0], [expout], [experr])
AT_CLEANUP

AT_SETUP([loggingrb])
AT_KEYWORDS([loggingrb])
cat $abs_srcdir/loggingrb/logging_test.ok > expout
cat $abs_srcdir/loggingrb/logging_test.err > experr
AT_CHECK([$abs_top_builddir/tests/loggingrb/loggingrb_test], [0], [expout], [experr])
AT_CLEANUP

AT_SETUP([strrb])
AT_KEYWORDS([strrb])
cat $abs_srcdir/strrb/strrb_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/strrb/strrb_test], [0], [expout], [ignore])
AT_CLEANUP

AT_SETUP([vty])
AT_KEYWORDS([vty])
cat $abs_srcdir/vty/vty_test.ok > expout
cat $abs_srcdir/vty/vty_test.err > experr
cp $abs_srcdir/vty/*.cfg .
AT_CHECK([$abs_top_builddir/tests/vty/vty_test], [0], [expout], [experr])
AT_CLEANUP

AT_SETUP([gprs-bssgp])
AT_KEYWORDS([gprs-bssgp])
cat $abs_srcdir/gb/gprs_bssgp_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/gb/gprs_bssgp_test], [0], [expout], [ignore])
AT_CLEANUP

AT_SETUP([gprs-bssgp-rim])
AT_KEYWORDS([gprs-bssgp-rim])
cat $abs_srcdir/gb/gprs_bssgp_rim_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/gb/gprs_bssgp_rim_test], [0], [expout], [ignore])
AT_CLEANUP

AT_SETUP([gprs-ns])
AT_KEYWORDS([gprs-ns])
cat $abs_srcdir/gb/gprs_ns_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/gb/gprs_ns_test], [0], [expout], [ignore])
AT_CLEANUP

AT_SETUP([gprs-ns2])
AT_KEYWORDS([gprs-ns2])
cat $abs_srcdir/gb/gprs_ns2_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/gb/gprs_ns2_test], [0], [expout], [ignore])
AT_CLEANUP

AT_SETUP([utils])
AT_KEYWORDS([utils])
cat $abs_srcdir/utils/utils_test.ok > expout
cat $abs_srcdir/utils/utils_test.err > experr
AT_CHECK([$abs_top_builddir/tests/utils/utils_test], [0], [expout], [experr])
AT_CLEANUP

AT_SETUP([stats])
AT_KEYWORDS([stats])
cat $abs_srcdir/stats/stats_test.ok > expout
cat $abs_srcdir/stats/stats_test.err > experr
AT_CHECK([$abs_top_builddir/tests/stats/stats_test], [0], [expout], [experr])
AT_CLEANUP

AT_SETUP([write_queue])
AT_KEYWORDS([write_queue])
cat $abs_srcdir/write_queue/wqueue_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/write_queue/wqueue_test], [0], [expout], [ignore])
AT_CLEANUP

AT_SETUP([bssgp-fc])
AT_KEYWORDS([bssgp-fc])
cat $abs_srcdir/gb/bssgp_fc_tests.ok > expout
cat $abs_srcdir/gb/bssgp_fc_tests.err > experr
AT_CHECK([$abs_top_srcdir/tests/gb/bssgp_fc_tests.sh $abs_top_builddir/tests/gb], [0], [expout], [experr])
AT_CLEANUP

AT_SETUP([sim])
AT_KEYWORDS([sim])
AT_CHECK([test "x$enable_sim_test" = xyes || exit 77])
cat $abs_srcdir/sim/sim_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/sim/sim_test], [0], [expout], [ignore])
AT_CLEANUP

AT_SETUP([timer])
AT_KEYWORDS([timer])
cat $abs_srcdir/timer/timer_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/timer/timer_test], [0], [expout], [ignore])
AT_CLEANUP

AT_SETUP([clk_override])
AT_KEYWORDS([clk_override])
cat $abs_srcdir/timer/clk_override_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/timer/clk_override_test], [0], [expout], [ignore])
AT_CLEANUP

AT_SETUP([tlv])
AT_KEYWORDS([tlv])
cat $abs_srcdir/tlv/tlv_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/tlv/tlv_test], [0], [expout], [ignore])
AT_CLEANUP

AT_SETUP([gsup])
AT_KEYWORDS([gsup])
cat $abs_srcdir/gsup/gsup_test.ok > expout
cat $abs_srcdir/gsup/gsup_test.err > experr
AT_CHECK([$abs_top_builddir/tests/gsup/gsup_test], [0], [expout], [experr])
AT_CLEANUP

AT_SETUP([fsm])
AT_KEYWORDS([fsm])
cat $abs_srcdir/fsm/fsm_test.ok > expout
cat $abs_srcdir/fsm/fsm_test.err > experr
AT_CHECK([$abs_top_builddir/tests/fsm/fsm_test], [0], [expout], [experr])
AT_CLEANUP

AT_SETUP([fsm_dealloc])
AT_KEYWORDS([fsm_dealloc])
cat $abs_srcdir/fsm/fsm_dealloc_test.err > experr
AT_CHECK([$abs_top_builddir/tests/fsm/fsm_dealloc_test], [0], [ignore], [experr])
AT_CLEANUP

AT_SETUP([oap])
AT_KEYWORDS([oap])
cat $abs_srcdir/oap/oap_test.ok > expout
touch experr
AT_CHECK([$abs_top_builddir/tests/oap/oap_test], [0], [expout], [experr])
AT_CLEANUP

AT_SETUP([oap_client])
AT_KEYWORDS([oap_client])
cat $abs_srcdir/oap/oap_client_test.ok > expout
cat $abs_srcdir/oap/oap_client_test.err > experr
AT_CHECK([$abs_top_builddir/tests/oap/oap_client_test], [0], [expout], [experr])
AT_CLEANUP

AT_SETUP([socket])
AT_KEYWORDS([socket])
cat $abs_srcdir/socket/socket_test.ok > expout
cat $abs_srcdir/socket/socket_test.err > experr
touch experr
AT_CHECK([$abs_top_builddir/tests/socket/socket_test], [0], [expout], [experr])
AT_CLEANUP

AT_SETUP([socket_sctp])
AT_KEYWORDS([socket_sctp])
AT_SKIP_IF([! test -e $abs_top_builddir/tests/socket/socket_sctp_test])
cat $abs_srcdir/socket/socket_sctp_test.ok > expout
cat $abs_srcdir/socket/socket_sctp_test.err > experr
touch experr
AT_CHECK([$abs_top_builddir/tests/socket/socket_sctp_test], [0], [expout], [experr])
AT_CLEANUP

AT_SETUP([osmo-auc-gen])
AT_KEYWORDS([osmo-auc-gen])
cat $abs_srcdir/osmo-auc-gen/osmo-auc-gen_test.ok > expout
cat $abs_srcdir/osmo-auc-gen/osmo-auc-gen_test.err > experr
AT_CHECK([$abs_top_srcdir/tests/osmo-auc-gen/osmo-auc-gen_test.sh $abs_top_builddir/utils/osmo-auc-gen], [0], [expout], [experr])
AT_CLEANUP

AT_SETUP([endian])
AT_KEYWORDS([endian])
cat $abs_srcdir/endian/endian_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/endian/endian_test], [0], [expout], [ignore])
AT_CLEANUP

AT_SETUP([sercomm])
AT_KEYWORDS([sercomm])
cat $abs_srcdir/sercomm/sercomm_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/sercomm/sercomm_test], [0], [expout], [ignore])
AT_CLEANUP

AT_SETUP([prbs])
AT_KEYWORDS([prbs])
cat $abs_srcdir/prbs/prbs_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/prbs/prbs_test], [0], [expout], [ignore])
AT_CLEANUP

AT_SETUP([gsm23003])
AT_KEYWORDS([gsm23003])
cat $abs_srcdir/gsm23003/gsm23003_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/gsm23003/gsm23003_test], [0], [expout], [ignore])
AT_CLEANUP

AT_SETUP([gsm23236])
AT_KEYWORDS([gsm23236])
cat $abs_srcdir/gsm23236/gsm23236_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/gsm23236/gsm23236_test], [0], [expout], [ignore])
AT_CLEANUP

AT_SETUP([tdef])
AT_KEYWORDS([tdef])
cat $abs_srcdir/tdef/tdef_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/tdef/tdef_test], [0], [expout], [ignore])
AT_CLEANUP

AT_SETUP([sockaddr_str])
AT_KEYWORDS([sockaddr_str])
cat $abs_srcdir/sockaddr_str/sockaddr_str_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/sockaddr_str/sockaddr_str_test], [0], [expout], [ignore])
AT_CLEANUP

AT_SETUP([use_count])
AT_KEYWORDS([use_count])
cat $abs_srcdir/use_count/use_count_test.ok > expout
cat $abs_srcdir/use_count/use_count_test.err > experr
AT_CHECK([$abs_top_builddir/tests/use_count/use_count_test], [0], [expout], [experr])
AT_CLEANUP

AT_SETUP([context])
AT_KEYWORDS([context])
cat $abs_srcdir/context/context_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/context/context_test], [0], [expout], [ignore])
AT_CLEANUP

AT_SETUP([exec])
AT_KEYWORDS([exec])
cat $abs_srcdir/exec/exec_test.ok > expout
cat $abs_srcdir/exec/exec_test.err > experr
AT_CHECK([$abs_top_builddir/tests/exec/exec_test], [0], [expout], [experr])
AT_CLEANUP

AT_SETUP([i460_mux])
AT_KEYWORDS([i460_mux])
cat $abs_srcdir/i460_mux/i460_mux_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/i460_mux/i460_mux_test], [0], [expout], [ignore])
AT_CLEANUP

AT_SETUP([bitgen])
AT_KEYWORDS([bitgen])
cat $abs_srcdir/bitgen/bitgen_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/bitgen/bitgen_test], [0], [expout], [ignore])
AT_CLEANUP

AT_SETUP([gad])
AT_KEYWORDS([gad])
cat $abs_srcdir/gad/gad_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/gad/gad_test], [0], [expout], [ignore])
AT_CLEANUP

AT_SETUP([bsslap])
AT_KEYWORDS([bsslap])
cat $abs_srcdir/bsslap/bsslap_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/bsslap/bsslap_test], [0], [expout], [ignore])
AT_CLEANUP

AT_SETUP([bssmap_le])
AT_KEYWORDS([bssmap_le])
cat $abs_srcdir/bssmap_le/bssmap_le_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/bssmap_le/bssmap_le_test], [0], [expout], [ignore])
AT_CLEANUP

AT_SETUP([it_q])
AT_KEYWORDS([it_q])
cat $abs_srcdir/it_q/it_q_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/it_q/it_q_test], [0], [expout], [ignore])
AT_CLEANUP

AT_SETUP([base64])
AT_KEYWORDS([base64])
cat $abs_srcdir/base64/base64_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/base64/base64_test], [0], [expout], [ignore])
AT_CLEANUP

AT_SETUP([time_cc])
AT_KEYWORDS([time_cc])
cat $abs_srcdir/time_cc/time_cc_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/time_cc/time_cc_test], [0], [expout], [ignore])
AT_CLEANUP

AT_SETUP([iuup])
AT_KEYWORDS([iuup])
cat $abs_srcdir/iuup/iuup_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/iuup/iuup_test], [0], [expout], [ignore])
AT_CLEANUP
