Commit 0a60c71c authored by Paal Kvamme's avatar Paal Kvamme
Browse files

Make sure the sdglue tests are not run if Seismic Store is not configured.

parent 5ef00236
......@@ -11,6 +11,40 @@ set -e
cd $(dirname $0)/../..
# If OpenZGY was built without Seismic Store support then these tests
# do not apply. Unfortunately I cannot access native/src/Make.packages,
# so this check is not very elegant. The main problem is to figure out
# whether Seismic Store was actually meant to be present.
SDSDKS=$(/bin/ls seismic-service-bin/*/sdapi* 2>/dev/null || /bin/true)
WHEELS=$(/bin/ls build/deploy/sdglue/*/SdGlue-*.whl 2>/dev/null || /bin/true)
if [ x"${WHEELS}" = "x" -a ! -r build/deploy/sdglue/requirements.txt ]
# Test will not succeed. Try to understand why.
if [ x"${SDSDKS}" = "x" ]
# No SDAPI SDK found for any platform. It is safe to assume
# that the user did not expect to build with cloud support.
echo >&2 "OpenZGY built without Seismic Store support. Skip sdglue tests."
exit 0
# The build might still be good, e.g. is the user passed
# an explicit "HAVE_SD=" to the top level Makefile. Telling
# it to not build SD even though the library exists.
# But for now, treat this case as a failure.
echo >&2 "OpenZGY has problems with Seismic Store support."
echo >&2 "If you meant to build without Seismic Store then"
echo >&2 "please rename or delete seismic-service-bin."
exit 1
# There might still be problems, such as the SDAPI SDK being
# present but not for this platform. This is assumed to be a
# real problem. It will cause failures below, so I don't
# need an explicit test here.
echo "OpenZGY was built with Seismic Store. Testing sdglue."
# Local trick in my environment: If this is an impersonation token then
# refresh it now. This is more performant. Also, the way the tests work
# right now, the impersonation token might not be recognized as such.
Supports Markdown
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