Skip to content

Commit 9759382

Browse files
committed
prevent test form removeing the root dir
1 parent 52855b5 commit 9759382

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
from tools.utils import mkdir, ToolException, NotSupportedException
3535
from tools.test_exporters import ReportExporter, ResultExporterType
3636
from utils import argparse_filestring_type, argparse_lowercase_type, argparse_many
37+
from utils import argparse_dir_not_parent
3738
from tools.toolchains import mbedToolchain
3839
from tools.settings import CLI_COLOR_MAP
3940

@@ -57,7 +58,7 @@
5758
type=argparse_filestring_type,
5859
default=None, help="The source (input) directory (for sources other than tests). Defaults to current directory.", action="append")
5960

60-
parser.add_argument("--build", dest="build_dir",
61+
parser.add_argument("--build", dest="build_dir", type=argparse_dir_not_parent(ROOT),
6162
default=None, help="The build (output) directory")
6263

6364
parser.add_argument("-l", "--list", action="store_true", dest="list",

0 commit comments

Comments
 (0)