Skip to content

Commit

Permalink
Disable some tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
floitsch committed Oct 10, 2024
1 parent fc46a0f commit dcd9c77
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,7 @@ jobs:
- name: Test 64-bit debug
shell: bash
# TODO(florian): fix this for Windows.
if: env.DO_MORE_TESTS == 'true' && runner.os != 'Windows'
if: env.DO_MORE_TESTS == 'true'
run: |
make BUILD=build-debug BUILD_TYPE=Debug test
Expand All @@ -279,8 +278,7 @@ jobs:
- name: Test -O2 with asserts
shell: bash
# TODO(florian): fix this for Windows.
if: env.DO_MORE_TESTS == 'true' && runner.os != 'Windows'
if: env.DO_MORE_TESTS == 'true'
run: |
TOIT_OPTIMIZATION_OVERRIDE=2 TOIT_ASSERT_OVERRIDE=1 make HOST=host-O2 TOOLCHAIN=host test
Expand Down
9 changes: 9 additions & 0 deletions tests/optimizations/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,16 @@ file(GLOB TOIT_OPTIMIZATION_TESTS RELATIVE ${TOIT_SDK_SOURCE_DIR} "*-test.toit")

include(fail.cmake)

set(OPTIMIZATIONS_IS_OVERRIDEN)
if (DEFINED ENV{TOIT_OPTIMIZATION_OVERRIDE})
set(OPTIMIZATIONS_IS_OVERRIDEN TRUE)
endif()

foreach(file ${TOIT_OPTIMIZATION_TESTS})
if(OPTIMIZATIONS_IS_OVERRIDEN)
# Don't run optimization tests if the optimization level is overriden.
continue()
endif()
if("${file}" IN_LIST TOIT_SKIP_TESTS)
continue()
endif()
Expand Down
6 changes: 4 additions & 2 deletions tests/type_propagation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,7 @@ function(add_tests flags)
endforeach()
endfunction()

add_tests("")
add_tests("-O2")
if (NOT DEFINED ENV{TOIT_OPTIMIZATION_OVERRIDE} AND NOT DEFINED ENV{TOIT_ASSERT_OVERRIDE})
add_tests("")
add_tests("-O2")
endif()

0 comments on commit dcd9c77

Please sign in to comment.