Skip to content

Commit

Permalink
Merge pull request #44 from lazka/remove-cross-skips
Browse files Browse the repository at this point in the history
toolchain: run all tests with the cross toolchain
  • Loading branch information
lazka authored Jul 1, 2023
2 parents ffe4dab + 35b7866 commit c6d7dfb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
1 change: 0 additions & 1 deletion toolchain/meson/meson_options.txt
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
option('cross', type : 'boolean', value : false)
14 changes: 5 additions & 9 deletions toolchain/meson/tests/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ test('snprintf_redef', executable('snprintf_redef', 'snprintf_redef.c'))
test('quick_exit', executable('quick_exit', 'quick_exit.cpp'))
test('exception_handling', executable('exception_handling', 'exception_handling.cpp'))
test('printf_format', executable('printf_format', 'printf_format.c'))
if not get_option('cross')
test('pch', executable('pch', 'pch.cpp', cpp_pch : 'pch/pch.hpp'))
endif
test('pch', executable('pch', 'pch.cpp', cpp_pch : 'pch/pch.hpp'))


openmp = dependency('openmp')
env = environment()
Expand All @@ -17,9 +16,8 @@ windres_res = import('windows').compile_resources('windres.rc')
windres = executable('windres', 'windres.c', windres_res)
test('windres', windres)

if not get_option('cross')
test('call_once', executable('call_once', 'call_once.cpp'))
endif
test('call_once', executable('call_once', 'call_once.cpp'))

test('undef_memrchr', executable('undef_memrchr', 'undef_memrchr.c', c_args: ['-O3']))

test('stpcpy_fortify', executable('stpcpy_fortify', 'stpcpy_fortify.c', c_args: ['-O3', '-D_FORTIFY_SOURCE=2']))
Expand Down Expand Up @@ -55,6 +53,4 @@ if compiler.get_id() == 'clang' and compiler.get_linker_id() == 'ld.lld'
test('guard_cf_nochecks-invalid_icall_nocf', guard_cf_nochecks, args : ['invalid_icall_nocf'])
endif

if not get_option('cross')
subdir('def-undec-stdcall')
endif
subdir('def-undec-stdcall')
4 changes: 2 additions & 2 deletions toolchain/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ cd ..

if [[ "$MSYSTEM" == "MSYS" ]]; then
cd meson
meson setup -Dcross=true --cross-file i686-w64-mingw32.txt _build_cross_32 --werror
meson setup --cross-file i686-w64-mingw32.txt _build_cross_32 --werror
meson compile -C _build
meson test -C _build
cd ..

cd meson
meson setup -Dcross=true --cross-file x86_64-w64-mingw32.txt _build_cross_64 --werror
meson setup --cross-file x86_64-w64-mingw32.txt _build_cross_64 --werror
meson compile -C _build
meson test -C _build
cd ..
Expand Down

0 comments on commit c6d7dfb

Please sign in to comment.