Skip to content
Snippets Groups Projects
Unverified Commit 4e4117a1 authored by Shylock Hg's avatar Shylock Hg Committed by GitHub
Browse files

Setup server in user current workspace. (#399)


Co-authored-by: default avatarYee <2520865+yixinglu@users.noreply.github.com>
parent 93f4c0a2
No related branches found
No related tags found
No related merge requests found
......@@ -90,17 +90,16 @@ function run_ctest() {
}
function run_test() {
cd $BUILD_DIR/tests
export PYTHONPATH=$PROJ_DIR:$PYTHONPATH
testpath=$(cat $PROJ_DIR/ci/tests.txt | sed "s|\(.*\)|$PROJ_DIR/tests/\1|g" | tr '\n' ' ')
./ntr \
$BUILD_DIR/tests/ntr \
-n=8 \
--dist=loadfile \
--debug_log=false \
$testpath
./ntr --debug_log=false $PROJ_DIR/tests/job/*
$BUILD_DIR/tests/ntr --debug_log=false $PROJ_DIR/tests/job/*
}
function test_in_cluster() {
......
......@@ -22,8 +22,7 @@ class NebulaService(object):
def __init__(self, build_dir, src_dir):
self.build_dir = build_dir
self.src_dir = src_dir
self.work_dir = "/tmp/nebula-" + str(
random.randrange(1000000, 100000000))
self.work_dir = os.path.join(os.getcwd(), 'build', 'server')
self.pids = {}
def set_work_dir(self, work_dir):
......@@ -84,6 +83,8 @@ class NebulaService(object):
return result == 0
def install(self):
if os.path.exists(self.work_dir):
shutil.rmtree(self.work_dir)
os.mkdir(self.work_dir)
print("work directory: " + self.work_dir)
os.chdir(self.work_dir)
......
......@@ -3,5 +3,4 @@
import os, sys
os.environ['NEBULA_BUILD_DIR'] = '@CMAKE_BINARY_DIR@'
os.environ['NEBULA_SOURCE_DIR'] = '@CMAKE_SOURCE_DIR@'
os.chdir('@CMAKE_SOURCE_DIR@/tests')
exec(open("@CMAKE_SOURCE_DIR@/tests/nebula-test-run.py").read())
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