Unverified Commit 7de66805 authored by Robert Winslow's avatar Robert Winslow Committed by GitHub

CI: New Docker tests for Python with numpy (#5677)

* New Docker tests for Python with numpy

* print numpy status in test suite
parent 3a70e0b3
FROM python:2.7.15-slim-stretch as base
WORKDIR /code
ADD . .
RUN cp flatc_debian_stretch flatc
WORKDIR /code/tests
RUN python --version
RUN pip install numpy
RUN pip install coverage
RUN ./PythonTest.sh
FROM python:3.7.1-slim-stretch as base
WORKDIR /code
ADD . .
RUN cp flatc_debian_stretch flatc
WORKDIR /code/tests
RUN python --version
RUN pip install numpy
RUN pip install coverage
RUN ./PythonTest.sh
......@@ -2368,6 +2368,13 @@ def main():
kwargs = dict(argv=sys.argv[:-3])
# show whether numpy is present, as it changes the test logic:
try:
import numpy
print('numpy available')
except ImportError:
print('numpy not available')
# run tests, and run some language comparison checks if needed:
success = backward_compatible_run_tests(**kwargs)
if success and os.environ.get('COMPARE_GENERATED_TO_GO', 0) == "1":
......
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