Skip to content
Snippets Groups Projects
Commit 8aac5e75 authored by Raghunandan Netrapalli Madhusudhan's avatar Raghunandan Netrapalli Madhusudhan
Browse files

feat: Script to pull opTestrunner binaries

parent 3026b12c
No related branches found
No related tags found
1 merge request!280Use standalone pipeline for e2e
#!/bin/bash
################################################################################
# Copyright (c) 2025 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# http://www.eclipse.org/legal/epl-2.0.
#
# SPDX-License-Identifier: EPL-2.0
################################################################################
################################################################################
# This Script pull the optestrunner binaries and installs them
################################################################################
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
OP_REPO_DIR="${OP_REPO_DIR:=$SCRIPT_DIR/../../..}"
#ToDo: Set this variable at the top level
if [[ -z "${OP_TESTRUNNER_DIR}" ]]; then
# If not defined, set a default value
OP_TESTRUNNER_DIR="$SCRIPT_DIR/../../../../optestrunner"
echo "WARN: OP_TESTRUNNER_DIR variable is not set. Setting it to:
OP_TESTRUNNER_DIR is ${OP_TESTRUNNER_DIR}"
fi
mkdir -p "$OP_TESTRUNNER_DIR" && cd "$OP_TESTRUNNER_DIR" || exit 1
rm -rf -- * || { echo "Failed to clean $OP_TESTRUNNER_DIR directory"; exit 1; }
echo "Python virtual environment (.env) is being created at ${OP_REPO_DIR}"
"${PYTHON_EXECUTABLE}" -m venv "${OP_REPO_DIR}/.env"
venv_python_executable="${OP_REPO_DIR}/.env/bin/python3"
"${venv_python_executable}" -m pip install --upgrade pip
"${venv_python_executable}" -m pip install "${OPTESTRUNNER_URL}" || { echo "Failed to install dependencies"; exit 1; }
echo "Following packages are installed successfully in the virtual environment at ${OP_REPO_DIR}/.env."
"${venv_python_executable}" -m pip list -v
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment