tools/compile_and_test_for_board: assert resultdir is valid
Currently giving an absolute or outside of RIOT application breaks the result directory evaluation which can lead to deleting the application. Add an assertion to detect it.
This commit is contained in:
parent
db3847f107
commit
16f07e571e
@ -232,6 +232,10 @@ class RIOTApplication():
|
||||
self.resultdir = os.path.join(resultdir, appdir)
|
||||
self.logger = logging.getLogger('%s.%s' % (board, appdir))
|
||||
|
||||
# Currently not handling absolute directories or outside of RIOT
|
||||
assert is_in_directory(self.resultdir, resultdir), \
|
||||
"Application result directory is outside main result directory"
|
||||
|
||||
# Extract values from make
|
||||
def name(self):
|
||||
"""Get application name."""
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user