Skip to content

Commit 9807def

Browse files
author
y-p
committed
BLD: fix path handling in test_perf
1 parent a8ed983 commit 9807def

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

test_perf.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ echo "Setting the BUILD_CACHE_DIR env var to a temp directory will"
99
echo "potentially speed up subsequent runs.\n"
1010

1111

12-
cd "$BASEDIR/vb_suite/"
13-
python test_perf.py $@
12+
#cd "$BASEDIR/vb_suite/"
13+
python "$BASEDIR"/vb_suite/test_perf.py $@
1414

15-
cd "$CURDIR"
15+
#cd "$CURDIR"

vb_suite/test_perf.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -232,22 +232,23 @@ def main():
232232
args.log_file = os.path.abspath(
233233
os.path.join(REPO_PATH, 'vb_suite.log'))
234234

235+
saved_dir = os.path.abspath(os.curdir)
235236
if args.outdf:
236237
# not bullet-proof but enough for us
237238
if os.path.sep not in args.outdf:
238-
args.outdf = os.path.join(os.curdir, args.outdf)
239+
args.outdf = os.path.join(saved_dir, args.outdf)
239240

240241
if args.log_file:
241242
# not bullet-proof but enough for us
242243
if os.path.sep not in args.log_file:
243-
args.log_file = os.path.join(os.curdir, args.log_file)
244+
args.log_file = os.path.join(saved_dir, args.log_file)
244245

245246
random.seed(args.seed)
246247
np.random.seed(args.seed)
247248

248249
prprint("LOG_FILE = %s\n" % args.log_file)
249250

250-
saved_dir = os.path.curdir
251+
251252
# move away from the pandas root dit, to avoid possible import
252253
# surprises
253254
os.chdir(os.path.dirname(os.path.abspath(__file__)))

0 commit comments

Comments
 (0)