createSandbox
Syntax
success = createSandbox
createSandbox("Overwrite",overwrite_option)
Description
creates a sandbox folder and
subfolders, and returns true if the method successfully
creates a sandbox. The folder name is success
= createSandbox<LibraryFileName>_sandbox
, where
LibraryFileName
is the LibraryFileName
property of the
sltest.CodeImporter
object. This method applies only if the
TestType
property of the sltest.CodeImporter
object is
UnitTest
.
The created folder subdirectories are:
autostub
— Contains theauto_stub.h
andauto_stub.c
files, which are generated only if the imported code has undefined symbols.manualstub
— Contains theman_stub.h
andman_stub.c
files, which you can use to manually stub symbols. Theman_stub.h
header file includes the aggregated header if theMode
property setting ofsltest.CodeImporter.SandboxSettings
isGenerateAggregatedHeader
.include
— Contains the header files required by the sandbox. This folder also contains a generatedaggregatedHeader.h
orinterfaceHeader.h
file. AnaggregatedHeader.h
file is generated if theMode
property setting ofsltest.CodeImporter.SandboxSettings
isGenerateAggregatedHeader
. Otherwise, the folder contains aninterfaceHeader.h
file.src
— Contains copies of the code source files if theCopySource
property of thesltest.CodeImporter.SandboxSettings
object istrue
.
createSandbox("Overwrite",
overwrites the existing sandbox. If overwrite_option
)overwrite_option
is
"on"
, the method deletes the existing sandbox directory and creates a new
sandbox directory. If overwrite_option
is "off"
, the
method deletes all folders except
manualstub
and generates a new sandbox. The method does not change the
manualstub
folder or its contents. The default is
"off"
.
Output Arguments
Examples
Version History
Introduced in R2021a