Skip to content

Commit 080fdf9

Browse files
committed
Fix cmake option for tests
1 parent 80499e0 commit 080fdf9

File tree

5 files changed

+16
-9
lines changed

5 files changed

+16
-9
lines changed

.ci/scripts/unittest-windows.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ if ($LASTEXITCODE -ne 0) {
1717
New-Item -Path "test-build" -ItemType Directory
1818
cd "test-build"
1919

20-
cmake .. --preset windows -B . -DCMAKE_BUILD_TESTS=ON
20+
cmake .. --preset windows -B . -DEXECUTORCH_BUILD_TESTS=ON
2121
if ($LASTEXITCODE -ne 0) {
2222
Write-Host "CMake configuration was unsuccessful. Exit code: $LASTEXITCODE."
2323
exit $LASTEXITCODE
2424
}
2525

26-
cmake --build . -j8 --config Release
26+
cmake --build . -j8 --config Release --verbose
2727
if ($LASTEXITCODE -ne 0) {
2828
Write-Host "CMake build was unsuccessful. Exit code: $LASTEXITCODE."
2929
exit $LASTEXITCODE

.github/workflows/_unittest.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,14 @@ jobs:
7070
\$PSNativeCommandUseErrorActionPreference = \$true
7171
7272
.ci/scripts/setup-windows.ps1
73+
if (\$LASTEXITCODE -ne 0) {
74+
Write-Host "Setup failed. Exit code: \$LASTEXITCODE."
75+
exit \$LASTEXITCODE
76+
}
7377
7478
.ci/scripts/unittest-windows.ps1 -editable "${{ inputs.editable }}"
75-
}"
79+
if (\$LASTEXITCODE -ne 0) {
80+
Write-Host "Unit tests failed. Exit code: \$LASTEXITCODE."
81+
exit \$LASTEXITCODE
82+
}
83+
} || exit 1"

runtime/executor/test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ add_custom_command(
3939
COMMAND
4040
${PYTHON_EXECUTABLE} -m test.models.export_delegated_program --modules
4141
"ModuleAddMul" --backend_id "StubBackend" --outdir
42-
"${CMAKE_CURRENT_BINARY_DIR}/delegated/" || true
42+
"${CMAKE_CURRENT_BINARY_DIR}/delegated/"
4343
WORKING_DIRECTORY ${EXECUTORCH_ROOT}
4444
)
4545

test/end2end/exported_module.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,6 @@ def __init__(self, method):
187187
if method_name_to_dynamic_shapes
188188
else None
189189
),
190-
strict=True,
191190
)
192191

193192
exec_prog = to_edge(

test/models/export_delegated_program.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,9 @@ def forward(self, *args, **kwargs):
155155

156156
if method_name != "forward":
157157
# Only require wrapper module if we're exporting a specific method other than forward.
158-
exported_program = export(WrapperModule(eager_module), args=inputs, strict=True)
158+
exported_program = export(WrapperModule(eager_module), args=inputs)
159159
else:
160-
exported_program = export(eager_module, args=inputs, strict=True)
160+
exported_program = export(eager_module, args=inputs)
161161

162162
edge_config = EdgeCompileConfig(_check_ir_validity=False)
163163
et_config = exir.ExecutorchBackendConfig(
@@ -178,7 +178,7 @@ def forward(self, *args, **kwargs):
178178
module=tagged_module,
179179
gen_tag_fn=lambda x: module_class.__name__,
180180
)
181-
exported_program = export(tagged_module, args=inputs, strict=True)
181+
exported_program = export(tagged_module, args=inputs)
182182
executorch_program = to_edge_transform_and_lower(
183183
exported_program,
184184
compile_config=edge_config,
@@ -205,7 +205,7 @@ def forward(self, *args, **kwargs):
205205
composite_module(*inputs)
206206

207207
executorch_program = to_edge(
208-
export(composite_module, args=inputs, strict=True)
208+
export(composite_module, args=inputs)
209209
).to_executorch(config=et_config)
210210

211211
return executorch_program

0 commit comments

Comments
 (0)