Commit 29dfb636 authored by thomie's avatar thomie Committed by Krzysztof Gogolewski
Browse files

Strip ../ from testdir (fixes #15469)

Test Plan: Harbormaster

Reviewers: bgamari

Reviewed By: bgamari

Subscribers: rwbarton, carter

GHC Trac Issues: #15469

Differential Revision: https://phabricator.haskell.org/D5039
parent e94cc29e
......@@ -14,6 +14,7 @@ import copy
import glob
import sys
from math import ceil, trunc
from pathlib import PurePath
import collections
import subprocess
......@@ -618,8 +619,9 @@ def newTestDir(tempdir, dir):
testdir_suffix = '.run'
def _newTestDir(name, opts, tempdir, dir):
testdir = os.path.join('', *(p for p in PurePath(dir).parts if p != '..'))
opts.srcdir = os.path.join(os.getcwd(), dir)
opts.testdir = os.path.join(tempdir, dir, name + testdir_suffix)
opts.testdir = os.path.join(tempdir, testdir, name + testdir_suffix)
opts.compiler_always_flags = config.compiler_always_flags
# -----------------------------------------------------------------------------
......
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