Skip to content

Commit 2533b37

Browse files
committed
CMake: Support specifying EXTRA_ARGS for tests
1 parent 2115b21 commit 2533b37

File tree

1 file changed

+28
-41
lines changed

1 file changed

+28
-41
lines changed

integration_tests/CMakeLists.txt

Lines changed: 28 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -311,27 +311,14 @@ macro(RUN_UTIL RUN_FAIL RUN_NAME RUN_FILE_NAME RUN_LABELS RUN_EXTRAFILES RUN_NOM
311311
endmacro(RUN_UTIL)
312312

313313
macro(RUN)
314-
set(options FAIL NOFAST NOMOD ENABLE_CPYTHON LINK_NUMPY NO_WARNINGS)
314+
set(options FAIL NOFAST NOMOD)
315315
set(oneValueArgs NAME IMPORT_PATH COPY_TO_BIN REQ_PY_VER)
316-
set(multiValueArgs LABELS EXTRAFILES)
316+
set(multiValueArgs LABELS EXTRAFILES EXTRA_ARGS)
317317
cmake_parse_arguments(RUN "${options}" "${oneValueArgs}"
318318
"${multiValueArgs}" ${ARGN} )
319319

320-
set(RUN_EXTRA_ARGS "")
321320
set(RUN_FILE_NAME ${RUN_NAME})
322321

323-
if (RUN_LINK_NUMPY)
324-
set(RUN_EXTRA_ARGS ${RUN_EXTRA_ARGS} --link-numpy)
325-
endif()
326-
327-
if (RUN_ENABLE_CPYTHON)
328-
set(RUN_EXTRA_ARGS ${RUN_EXTRA_ARGS} --enable-cpython)
329-
endif()
330-
331-
if (RUN_NO_WARNINGS)
332-
set(RUN_EXTRA_ARGS ${RUN_EXTRA_ARGS} --no-warnings)
333-
endif()
334-
335322
if (RUN_IMPORT_PATH)
336323
# Only one import path supported for now
337324
# Later add support for multiple import paths by looping over and appending to extra args
@@ -619,7 +606,7 @@ RUN(NAME test_os LABELS cpython llvm c NOFAST)
619606
RUN(NAME test_builtin LABELS cpython llvm c)
620607
RUN(NAME test_builtin_abs LABELS cpython llvm c)
621608
RUN(NAME test_builtin_bool LABELS cpython llvm c)
622-
RUN(NAME test_builtin_pow LABELS cpython llvm c NO_WARNINGS)
609+
RUN(NAME test_builtin_pow LABELS cpython llvm c EXTRA_ARGS --no-warnings)
623610
RUN(NAME test_builtin_int LABELS cpython llvm c)
624611
RUN(NAME test_builtin_len LABELS cpython llvm c)
625612
RUN(NAME test_builtin_str LABELS cpython llvm c)
@@ -650,11 +637,11 @@ RUN(NAME bindc_05 LABELS llvm c
650637
EXTRAFILES bindc_05b.c)
651638
RUN(NAME bindc_06 LABELS llvm c
652639
EXTRAFILES bindc_06b.c)
653-
RUN(NAME bindpy_01 LABELS cpython c_py ENABLE_CPYTHON NOFAST COPY_TO_BIN bindpy_01_module.py)
654-
RUN(NAME bindpy_02 LABELS cpython c_py LINK_NUMPY COPY_TO_BIN bindpy_02_module.py)
655-
RUN(NAME bindpy_03 LABELS cpython c_py LINK_NUMPY NOFAST COPY_TO_BIN bindpy_03_module.py)
656-
RUN(NAME bindpy_04 LABELS cpython c_py LINK_NUMPY NOFAST COPY_TO_BIN bindpy_04_module.py)
657-
RUN(NAME bindpy_05 LABELS llvm_py c_py ENABLE_CPYTHON COPY_TO_BIN bindpy_05_module.py REQ_PY_VER 3.10)
640+
RUN(NAME bindpy_01 LABELS cpython c_py EXTRA_ARGS --enable-cpython NOFAST COPY_TO_BIN bindpy_01_module.py)
641+
RUN(NAME bindpy_02 LABELS cpython c_py EXTRA_ARGS --link-numpy COPY_TO_BIN bindpy_02_module.py)
642+
RUN(NAME bindpy_03 LABELS cpython c_py EXTRA_ARGS --link-numpy NOFAST COPY_TO_BIN bindpy_03_module.py)
643+
RUN(NAME bindpy_04 LABELS cpython c_py EXTRA_ARGS --link-numpy NOFAST COPY_TO_BIN bindpy_04_module.py)
644+
RUN(NAME bindpy_05 LABELS llvm_py c_py EXTRA_ARGS --enable-cpython COPY_TO_BIN bindpy_05_module.py REQ_PY_VER 3.10)
658645
RUN(NAME test_generics_01 LABELS cpython llvm c NOFAST)
659646
RUN(NAME test_cmath LABELS cpython llvm c NOFAST)
660647
RUN(NAME test_complex_01 LABELS cpython llvm c wasm wasm_x64)
@@ -719,25 +706,25 @@ RUN(NAME structs_33 LABELS cpython llvm c)
719706
RUN(NAME structs_34 LABELS cpython llvm c)
720707
RUN(NAME structs_35 LABELS cpython llvm)
721708

722-
RUN(NAME symbolics_01 LABELS cpython_sym c_sym llvm_sym NOFAST)
723-
RUN(NAME symbolics_02 LABELS cpython_sym c_sym llvm_sym NOFAST)
724-
RUN(NAME symbolics_03 LABELS cpython_sym c_sym llvm_sym NOFAST)
725-
RUN(NAME symbolics_04 LABELS cpython_sym c_sym llvm_sym NOFAST)
726-
RUN(NAME symbolics_05 LABELS cpython_sym c_sym llvm_sym NOFAST)
727-
RUN(NAME symbolics_06 LABELS cpython_sym c_sym llvm_sym NOFAST)
728-
RUN(NAME symbolics_07 LABELS cpython_sym c_sym llvm_sym NOFAST)
729-
RUN(NAME symbolics_08 LABELS cpython_sym c_sym llvm_sym)
730-
RUN(NAME symbolics_09 LABELS cpython_sym c_sym llvm_sym NOFAST)
731-
RUN(NAME symbolics_10 LABELS cpython_sym c_sym llvm_sym NOFAST)
732-
RUN(NAME symbolics_11 LABELS cpython_sym c_sym llvm_sym NOFAST)
733-
RUN(NAME symbolics_12 LABELS cpython_sym c_sym llvm_sym NOFAST)
734-
RUN(NAME symbolics_13 LABELS cpython_sym c_sym llvm_sym NOFAST)
735-
RUN(NAME symbolics_14 LABELS cpython_sym c_sym llvm_sym NOFAST)
736-
RUN(NAME test_gruntz LABELS cpython_sym c_sym llvm_sym NOFAST)
737-
RUN(NAME symbolics_15 LABELS c_sym llvm_sym NOFAST)
738-
RUN(NAME symbolics_16 LABELS cpython_sym c_sym llvm_sym NOFAST)
739-
RUN(NAME symbolics_17 LABELS cpython_sym c_sym llvm_sym NOFAST)
740-
RUN(NAME symbolics_18 LABELS cpython_sym c_sym llvm_sym NOFAST)
709+
RUN(NAME symbolics_01 LABELS cpython_sym c_sym llvm_sym NOFAST EXTRA_ARGS --enable-symengine)
710+
RUN(NAME symbolics_02 LABELS cpython_sym c_sym llvm_sym NOFAST EXTRA_ARGS --enable-symengine)
711+
RUN(NAME symbolics_03 LABELS cpython_sym c_sym llvm_sym NOFAST EXTRA_ARGS --enable-symengine)
712+
RUN(NAME symbolics_04 LABELS cpython_sym c_sym llvm_sym NOFAST EXTRA_ARGS --enable-symengine)
713+
RUN(NAME symbolics_05 LABELS cpython_sym c_sym llvm_sym NOFAST EXTRA_ARGS --enable-symengine)
714+
RUN(NAME symbolics_06 LABELS cpython_sym c_sym llvm_sym NOFAST EXTRA_ARGS --enable-symengine)
715+
RUN(NAME symbolics_07 LABELS cpython_sym c_sym llvm_sym NOFAST EXTRA_ARGS --enable-symengine)
716+
RUN(NAME symbolics_08 LABELS cpython_sym c_sym llvm_sym EXTRA_ARGS --enable-symengine)
717+
RUN(NAME symbolics_09 LABELS cpython_sym c_sym llvm_sym NOFAST EXTRA_ARGS --enable-symengine)
718+
RUN(NAME symbolics_10 LABELS cpython_sym c_sym llvm_sym NOFAST EXTRA_ARGS --enable-symengine)
719+
RUN(NAME symbolics_11 LABELS cpython_sym c_sym llvm_sym NOFAST EXTRA_ARGS --enable-symengine)
720+
RUN(NAME symbolics_12 LABELS cpython_sym c_sym llvm_sym NOFAST EXTRA_ARGS --enable-symengine)
721+
RUN(NAME symbolics_13 LABELS cpython_sym c_sym llvm_sym NOFAST EXTRA_ARGS --enable-symengine)
722+
RUN(NAME symbolics_14 LABELS cpython_sym c_sym llvm_sym NOFAST EXTRA_ARGS --enable-symengine)
723+
RUN(NAME test_gruntz LABELS cpython_sym c_sym llvm_sym NOFAST EXTRA_ARGS --enable-symengine)
724+
RUN(NAME symbolics_15 LABELS c_sym llvm_sym NOFAST EXTRA_ARGS --enable-symengine)
725+
RUN(NAME symbolics_16 LABELS cpython_sym c_sym llvm_sym NOFAST EXTRA_ARGS --enable-symengine)
726+
RUN(NAME symbolics_17 LABELS cpython_sym c_sym llvm_sym NOFAST EXTRA_ARGS --enable-symengine)
727+
RUN(NAME symbolics_18 LABELS cpython_sym c_sym llvm_sym NOFAST EXTRA_ARGS --enable-symengine)
741728

742729
RUN(NAME sizeof_01 LABELS llvm c
743730
EXTRAFILES sizeof_01b.c)
@@ -798,7 +785,7 @@ RUN(NAME func_dep_03 LABELS cpython llvm c)
798785
RUN(NAME func_dep_04 LABELS cpython llvm c)
799786
RUN(NAME func_internal_def_01 LABELS cpython llvm NOFAST)
800787
RUN(NAME func_01 LABELS cpython llvm)
801-
RUN(NAME func_02 LABELS c_sym llvm_sym NOFAST)
788+
RUN(NAME func_02 LABELS c_sym llvm_sym NOFAST EXTRA_ARGS --enable-symengine)
802789

803790
RUN(NAME float_01 LABELS cpython llvm c wasm wasm_x64)
804791
RUN(NAME recursive_01 LABELS cpython llvm c wasm wasm_x64 wasm_x86)

0 commit comments

Comments
 (0)