laforge submitted this change.

View Change

Approvals: laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve osmith: Looks good to me, but someone else must approve Jenkins Builder: Verified
tests/testsuite.at: use AT_SKIP_IF for sim_test

Whether to run the given test or not can be determined by presence
of the respective `*_test` binary, since we build them conditionally
in the `Makefile.am`. Get rid of more complicated logic by using
AT_SKIP_IF and checking presence of `tests/sim/sim_test`.

Change-Id: Ic90b3a39936888eda6c9d443420c4faa131ac78f
---
M .gitignore
M configure.ac
M tests/Makefile.am
D tests/atlocal.in
M tests/testsuite.at
5 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/.gitignore b/.gitignore
index b14f67c..907743f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -61,7 +61,6 @@
#gnu autotest
tests/package.m4
tests/atconfig
-tests/atlocal
tests/osmo-test
tests/package.m4
tests/testsuite
diff --git a/configure.ac b/configure.ac
index 120500f..6a5f0c0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -650,7 +650,6 @@
src/pseudotalloc/Makefile
tapset/Makefile
tests/Makefile
- tests/atlocal
tests/osmo-config-merge/Makefile
utils/Makefile
utils/osmo-stat-dummy/Makefile
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 929cade..f98d67c 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -534,7 +534,7 @@
endif
endif

-DISTCLEANFILES = atconfig atlocal conv/gsm0503_test_vectors.c
+DISTCLEANFILES = atconfig conv/gsm0503_test_vectors.c
BUILT_SOURCES = conv/gsm0503_test_vectors.c
noinst_HEADERS = conv/conv.h

diff --git a/tests/atlocal.in b/tests/atlocal.in
deleted file mode 100644
index cd27532..0000000
--- a/tests/atlocal.in
+++ /dev/null
@@ -1 +0,0 @@
-enable_sim_test='@ENABLE_PCSC@'
diff --git a/tests/testsuite.at b/tests/testsuite.at
index 82758b7..1c9a97e 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -317,7 +317,7 @@

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

To view, visit change 41363. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: merged
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ic90b3a39936888eda6c9d443420c4faa131ac78f
Gerrit-Change-Number: 41363
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-Reviewer: osmith <osmith@sysmocom.de>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>