2021-04-13 00:49:38 +00:00
|
|
|
lang_tests = [
|
|
|
|
# test_name test_file expected_fail
|
|
|
|
['simple example', 'simple', false],
|
|
|
|
]
|
|
|
|
|
|
|
|
lib_tests = [
|
|
|
|
]
|
|
|
|
|
|
|
|
test_runner = executable('runner',
|
|
|
|
['runner.cc'],
|
|
|
|
dependencies: libcubescript,
|
|
|
|
include_directories: libcubescript_includes,
|
|
|
|
cpp_args: extra_cxxflags,
|
|
|
|
install: false
|
|
|
|
)
|
|
|
|
|
|
|
|
penv = environment()
|
|
|
|
penv.append('PATH', join_paths(build_root, 'src'))
|
2021-04-15 19:20:59 +00:00
|
|
|
# when running tests for crossbuilds in wine, this is used instead
|
|
|
|
penv.append('WINEPATH', join_paths(build_root, 'src'))
|
2021-04-13 00:49:38 +00:00
|
|
|
|
|
|
|
foreach tcase: lang_tests
|
|
|
|
test(tcase[0],
|
|
|
|
test_runner,
|
|
|
|
args: [join_paths(meson.current_source_dir(), tcase[1] + '.cube')],
|
|
|
|
should_fail: tcase[2],
|
|
|
|
env: penv
|
|
|
|
)
|
|
|
|
endforeach
|
|
|
|
|
|
|
|
foreach tcase: lib_tests
|
|
|
|
test_exe = executable(tcase[0],
|
|
|
|
[tcase[0] + '.cc'],
|
|
|
|
dependencies: libcubescript,
|
|
|
|
include_directories: libcubescript_includes,
|
|
|
|
cpp_args: extra_cxxflags,
|
|
|
|
instalL: false
|
|
|
|
)
|
|
|
|
test(tcase[0], tcase[0], should_fail: tcase[1], env: penv)
|
|
|
|
endforeach
|