Started TCK cleanup.
Summary: Changed run script to use built memgraph binary. Added missing binary check to run script. Reviewers: buda, teon.banek Reviewed By: buda, teon.banek Subscribers: pullbot Differential Revision: https://phabricator.memgraph.io/D504
This commit is contained in:
parent
3a922de963
commit
44e948c769
@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"project_id" : "memgraph",
|
|
||||||
"conduit_uri" : "https://phabricator.memgraph.io",
|
|
||||||
"phabricator_uri" : "https://phabricator.memgraph.io"
|
|
||||||
}
|
|
2
tests/qa/dbms/.gitignore
vendored
2
tests/qa/dbms/.gitignore
vendored
@ -1,2 +0,0 @@
|
|||||||
*
|
|
||||||
!.gitignore
|
|
@ -6,28 +6,13 @@ function print_usage_and_exit {
|
|||||||
echo "Optional arguments:"
|
echo "Optional arguments:"
|
||||||
echo -e " -s\tuse sudo apt-get for installing required packages"
|
echo -e " -s\tuse sudo apt-get for installing required packages"
|
||||||
echo -e " -h\tdisplay this help and exit"
|
echo -e " -h\tdisplay this help and exit"
|
||||||
echo -e " --no-clone-dependencies\tskip cloning memgraph sources"
|
|
||||||
echo -e " --arc-diff\tcheckout the DIFF_ID from Phabricator"
|
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
# read arguments
|
# read arguments
|
||||||
arcanist_diff_id=""
|
|
||||||
clone_dependencies=true
|
|
||||||
use_sudo=false
|
use_sudo=false
|
||||||
while [[ $# -gt 0 ]]; do
|
while [[ $# -gt 0 ]]; do
|
||||||
case $1 in
|
case $1 in
|
||||||
--no-clone-dependencies)
|
|
||||||
clone_dependencies=false
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
--arc-diff)
|
|
||||||
if [[ -z $2 ]]; then
|
|
||||||
print_usage_and_exit
|
|
||||||
fi
|
|
||||||
arcanist_diff_id=$2
|
|
||||||
shift 2
|
|
||||||
;;
|
|
||||||
-s)
|
-s)
|
||||||
use_sudo=true
|
use_sudo=true
|
||||||
shift
|
shift
|
||||||
@ -45,11 +30,10 @@ set -e
|
|||||||
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
cd ${script_dir}
|
cd ${script_dir}
|
||||||
|
|
||||||
required_pkgs=(git arcanist # used to clone sources
|
required_pkgs=(python-virtualenv python3-pip) # required by 'run' script
|
||||||
python-virtualenv python3-pip # required by 'run' script
|
|
||||||
)
|
|
||||||
|
|
||||||
# install all dependencies on debian based operating systems
|
# install all dependencies on debian based operating systems
|
||||||
|
required_missing=false
|
||||||
for pkg in ${required_pkgs[@]}; do
|
for pkg in ${required_pkgs[@]}; do
|
||||||
if dpkg -s $pkg 2>/dev/null >/dev/null; then
|
if dpkg -s $pkg 2>/dev/null >/dev/null; then
|
||||||
echo "Found $pkg"
|
echo "Found $pkg"
|
||||||
@ -78,36 +62,3 @@ fi
|
|||||||
source ve3/bin/activate
|
source ve3/bin/activate
|
||||||
pip3 install --upgrade pip
|
pip3 install --upgrade pip
|
||||||
pip3 install -r requirements.txt
|
pip3 install -r requirements.txt
|
||||||
|
|
||||||
# TODO: use pullbot and read a password from program arg or env var
|
|
||||||
# (in order to use this script inside CI infrastructure)
|
|
||||||
|
|
||||||
|
|
||||||
# clean dbms folder
|
|
||||||
dbms_folder=${script_dir}/dbms
|
|
||||||
mkdir -p ${dbms_folder}
|
|
||||||
|
|
||||||
# clone memgraph & checkout right commit
|
|
||||||
cd ${dbms_folder}
|
|
||||||
if [[ $clone_dependencies = true ]] ; then
|
|
||||||
rm -rf ${dbms_folder}/*
|
|
||||||
git clone https://phabricator.memgraph.io/diffusion/MG/memgraph.git
|
|
||||||
fi
|
|
||||||
memgraph_folder=${dbms_folder}/memgraph
|
|
||||||
cd ${memgraph_folder}
|
|
||||||
git checkout dev
|
|
||||||
# optionally apply arcanist patch
|
|
||||||
if [[ ! -z ${arcanist_diff_id} ]]; then
|
|
||||||
# nocommit is here because arc tries to commit the patch
|
|
||||||
# and it fails if user isn't set (inside CI infrastructure the user
|
|
||||||
# probably won't be defined because CI infrastructure doesn't push
|
|
||||||
# any code back to the repository)
|
|
||||||
arc patch ${arcanist_diff_id} --nocommit
|
|
||||||
fi
|
|
||||||
./init
|
|
||||||
|
|
||||||
# compile memgraph
|
|
||||||
memgraph_build_dir=${script_dir}/dbms/memgraph/build
|
|
||||||
cd ${memgraph_build_dir}
|
|
||||||
cmake ..
|
|
||||||
make -j8
|
|
||||||
|
11
tests/qa/run
11
tests/qa/run
@ -39,12 +39,10 @@ if [[ "$test_suite" = "" ]]; then
|
|||||||
print_usage_and_exit
|
print_usage_and_exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## build memgraph
|
|
||||||
|
|
||||||
# save the path where this script is
|
# save the path where this script is
|
||||||
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
memgraph_src_dir=${script_dir}/dbms/memgraph
|
memgraph_src_dir=${script_dir}/../..
|
||||||
memgraph_build_dir=${script_dir}/dbms/memgraph/build
|
memgraph_build_dir=${memgraph_src_dir}/build
|
||||||
|
|
||||||
# activate virtualenv
|
# activate virtualenv
|
||||||
source $script_dir/ve3/bin/activate
|
source $script_dir/ve3/bin/activate
|
||||||
@ -59,6 +57,11 @@ cd ${memgraph_build_dir}
|
|||||||
binary_name=$(find ${memgraph_build_dir}/ -maxdepth 1 -executable \
|
binary_name=$(find ${memgraph_build_dir}/ -maxdepth 1 -executable \
|
||||||
-name "memgraph*" | sort | tail -n 1)
|
-name "memgraph*" | sort | tail -n 1)
|
||||||
|
|
||||||
|
if [[ "$binary_name" == "" ]]; then
|
||||||
|
echo "You must build Memgraph before running this script!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# get full path to memgraph config for interpreted queries
|
# get full path to memgraph config for interpreted queries
|
||||||
config_path="${memgraph_src_dir}/config/testing.conf"
|
config_path="${memgraph_src_dir}/config/testing.conf"
|
||||||
|
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user