Commit 4847d8e7 authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[test][scripts] Move build script to test folder

parent 21b9d65d
......@@ -5,3 +5,4 @@ recursive-include doc conf.py *.rst *.png *.svg *.ico *.odg *.pdf *.dot
recursive-include beat/core/schema *.json
recursive-include beat/core/prototypes *.json *.py
recursive-include beat/core/test/prefix *.json *.py *.r *.m *.rst *.h *.cpp
recursive-include beat/core/test/scripts *.sh
......@@ -77,11 +77,11 @@ class TestDockerExecution(BaseExecutionMixIn):
def build_algorithm(self, algorithm):
test_folder = os.path.abspath(os.path.join(os.path.dirname(__file__)))
scripts_folder = os.path.abspath(os.path.join(test_folder, '../../../'))
scripts_folder = os.path.abspath(os.path.join(test_folder, 'scripts'))
sources_folder = os.path.abspath(os.path.join(test_folder, algorithm))
cmd = ['/build.sh']
builder_container = self.host.create_container(BUILDER_IMAGE, cmd)
builder_container.add_volume("%s/scripts/build.sh" % scripts_folder, "/build.sh")
builder_container.add_volume("%s/build.sh" % scripts_folder, "/build.sh")
builder_container.add_volume(sources_folder, "/sources", read_only=False)
builder_container.uid = os.getuid()
builder_container.set_workdir("/sources")
......
......@@ -68,7 +68,7 @@ check_env BEAT_CORE_TEST_DIR
if [ "$1" == "build" ]; then
for k in "${ALGORITHMS[@]}"; do
algodir=$(dirname "${k}")
run_cmd docker run --rm --user=$(id -u gitlab-runner):$(id -g gitlab-runner) --volume="${CI_PROJECT_DIR}/scripts/build.sh:/build.sh" --volume="${BEAT_CORE_TEST_DIR}/${algodir}:/sources" --workdir="/sources" --entrypoint="bash" "${BEAT_CXX_DEV_ENVIRONMENT}" /build.sh
run_cmd docker run --rm --user=$(id -u gitlab-runner):$(id -g gitlab-runner) --volume="${BEAT_CORE_TEST_DIR}/scripts/build.sh:/build.sh" --volume="${BEAT_CORE_TEST_DIR}/${algodir}:/sources" --workdir="/sources" --entrypoint="bash" "${BEAT_CXX_DEV_ENVIRONMENT}" /build.sh
done
fi
......
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