From cc7baaff43146bf5bec57013426aae78b53d0287 Mon Sep 17 00:00:00 2001 From: Ubaid Shaikh Date: Sat, 22 Feb 2025 06:40:10 +0530 Subject: [PATCH 01/11] Add new workflow and disable other tests --- .github/workflows/CI.yml | 4 +- .github/workflows/debug_tests.yml | 82 ++ integration_tests/CMakeLists.txt | 447 +-------- tests/tests.toml | 1461 ----------------------------- 4 files changed, 84 insertions(+), 1910 deletions(-) create mode 100644 .github/workflows/debug_tests.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 362159b5a7..b629307e1c 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -6,9 +6,7 @@ on: - main tags: - 'v*' - pull_request: - branches: - - main + env: MACOSX_DEPLOYMENT_TARGET: 14.0 diff --git a/.github/workflows/debug_tests.yml b/.github/workflows/debug_tests.yml new file mode 100644 index 0000000000..9b19c2081a --- /dev/null +++ b/.github/workflows/debug_tests.yml @@ -0,0 +1,82 @@ +name: Debug Disabled Tests + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + debug_tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - uses: mamba-org/setup-micromamba@v1 + with: + environment-file: ci/environment.yml + create-args: >- + python=3.10 + bison=3.4 + + - name: Print Debug Information + shell: bash -e -l {0} + run: | + echo "=== System Information ===" + uname -a + free -h + df -h + + echo "=== Micromamba Information ===" + micromamba --version + micromamba info + + echo "=== Compiler Versions ===" + gfortran --version + gcc --version + g++ --version + clang --version + python --version + cmake --version + ninja --version + + echo "=== Compiler Locations ===" + which gfortran + which gcc + which g++ + which clang + which python + which cmake + which ninja + + echo "=== Environment ===" + env | sort + + echo "=== Python Dependencies ===" + pip list + + - name: Build Release + shell: bash -e -l {0} + run: | + ./build0.sh + cmake . -GNinja \ + -DCMAKE_BUILD_TYPE=Release \ + -DWITH_LLVM=yes \ + -DLFORTRAN_BUILD_ALL=yes \ + -DWITH_STACKTRACE=no \ + -DCMAKE_PREFIX_PATH="$CONDA_PREFIX" \ + -DCMAKE_INSTALL_PREFIX=`pwd`/inst + + cmake --build . -j16 --target install + + - name: Run Tests + shell: bash -e -l {0} + run: | + ctest --rerun-failed --output-on-failure + ./run_tests.py -s + + cd integration_tests + ./run_tests.py -b llvm + ./run_tests.py -b llvm -f diff --git a/integration_tests/CMakeLists.txt b/integration_tests/CMakeLists.txt index 5ad8a0074d..bd103804b2 100644 --- a/integration_tests/CMakeLists.txt +++ b/integration_tests/CMakeLists.txt @@ -416,449 +416,4 @@ macro(COMPILE) endmacro(COMPILE) -# Test zero and non-zero exit code and assert statements -RUN(NAME array_01_decl LABELS cpython llvm llvm_jit c) -RUN(NAME array_02_decl LABELS cpython llvm llvm_jit c) -RUN(NAME array_03_decl LABELS cpython llvm llvm_jit c) -RUN(NAME variable_decl_01 LABELS cpython llvm llvm_jit c) -RUN(NAME variable_decl_02 LABELS cpython llvm llvm_jit c) -RUN(NAME variable_decl_03 LABELS cpython llvm llvm_jit c) -RUN(NAME array_expr_01 LABELS cpython llvm llvm_jit c) -RUN(NAME array_expr_02 LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME array_expr_03 LABELS cpython llvm llvm_jit c) -RUN(NAME array_expr_04 LABELS cpython llvm llvm_jit c) -RUN(NAME array_expr_05 LABELS cpython llvm llvm_jit c) -RUN(NAME array_expr_06 LABELS cpython llvm llvm_jit c) -RUN(NAME array_expr_07 LABELS cpython llvm llvm_jit c) -RUN(NAME array_expr_08 LABELS cpython llvm llvm_jit c) -RUN(NAME array_expr_09 LABELS cpython llvm llvm_jit c) -RUN(NAME array_expr_10 LABELS cpython llvm llvm_jit c) -RUN(NAME array_size_01 LABELS cpython llvm llvm_jit c) -RUN(NAME array_size_02 LABELS cpython llvm llvm_jit c) -RUN(NAME array_01 LABELS cpython llvm llvm_jit wasm c) -RUN(NAME array_02 LABELS cpython wasm c) -RUN(NAME array_03 LABELS cpython llvm llvm_jit c) -RUN(NAME array_04 LABELS cpython llvm llvm_jit c) -RUN(NAME array_05 LABELS cpython llvm llvm_jit c) -RUN(NAME array_06 LABELS cpython llvm llvm_jit) -RUN(NAME bindc_01 LABELS cpython llvm llvm_jit c) -RUN(NAME bindc_02 LABELS cpython llvm llvm_jit c) -RUN(NAME bindc_04 LABELS llvm llvm_jit c NOFAST) -RUN(NAME bindc_07 LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME bindc_08 LABELS cpython llvm llvm_jit c) -RUN(NAME bindc_09 LABELS cpython llvm llvm_jit c) -RUN(NAME bindc_09b LABELS cpython llvm llvm_jit c) -RUN(NAME bindc_10 LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME bindc_11 LABELS cpython) # This is CPython test only -RUN(NAME exit_01 LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME exit_02 FAIL LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME exit_03 LABELS cpython llvm llvm_jit c wasm wasm_x86 wasm_x64) -RUN(NAME exit_04 FAIL LABELS cpython llvm llvm_jit c wasm wasm_x86 wasm_x64) -RUN(NAME exit_01b LABELS cpython llvm llvm_jit c wasm wasm_x86 wasm_x64) -RUN(NAME exit_02b FAIL LABELS cpython llvm llvm_jit c wasm wasm_x86 wasm_x64) -RUN(NAME exit_02c FAIL LABELS cpython llvm llvm_jit c) - -# Test all four backends -RUN(NAME print_01 LABELS cpython llvm llvm_jit c wasm) # wasm not yet supports sep and end keywords -RUN(NAME print_03 LABELS x86 c wasm wasm_x86 wasm_x64) # simple test case specifically for x86, wasm_x86 and wasm_x64 -RUN(NAME print_04 LABELS cpython llvm llvm_jit c) -RUN(NAME print_06 LABELS cpython llvm llvm_jit c) -RUN(NAME print_05 LABELS cpython llvm llvm_jit c wasm wasm_x64) -RUN(NAME print_float LABELS cpython llvm llvm_jit c wasm wasm_x64) -RUN(NAME print_list_tuple_01 LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME print_list_tuple_02 LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME print_list_tuple_03 LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME test_list_item_mixed_print LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME test_intrinsic_function_mixed_print LABELS cpython llvm llvm_jit NOFAST) - -# CPython and LLVM -RUN(NAME const_01 LABELS cpython llvm llvm_jit c wasm) -RUN(NAME const_02 LABELS cpython llvm llvm_jit c wasm) -RUN(NAME const_03 LABELS cpython llvm c - EXTRAFILES const_03b.c) -RUN(NAME const_04 LABELS cpython llvm llvm_jit c) -RUN(NAME expr_01 LABELS cpython llvm llvm_jit c wasm wasm_x64) -RUN(NAME expr_02 LABELS cpython llvm llvm_jit c wasm wasm_x64) -RUN(NAME expr_03 LABELS cpython llvm llvm_jit c wasm wasm_x64) -RUN(NAME expr_04 LABELS cpython llvm llvm_jit c wasm NOFAST) -RUN(NAME expr_05 LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME expr_06 LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME expr_07 LABELS cpython llvm llvm_jit c) -RUN(NAME expr_08 LABELS llvm llvm_jit c NOFAST) -RUN(NAME expr_09 LABELS cpython llvm llvm_jit c) -RUN(NAME expr_10 LABELS cpython llvm llvm_jit c) -RUN(NAME expr_11 LABELS cpython llvm llvm_jit c wasm) -RUN(NAME expr_12 LABELS llvm llvm_jit c) -RUN(NAME expr_13 LABELS llvm c - EXTRAFILES expr_13b.c NOFAST) -RUN(NAME expr_14 LABELS cpython llvm llvm_jit c) -RUN(NAME expr_15 LABELS cpython llvm llvm_jit c) -RUN(NAME expr_16 LABELS cpython llvm llvm_jit c) -RUN(NAME expr_17 LABELS cpython llvm llvm_jit c) -RUN(NAME expr_18 FAIL LABELS cpython llvm llvm_jit c) -RUN(NAME expr_19 LABELS cpython llvm llvm_jit c) -RUN(NAME expr_20 LABELS cpython llvm llvm_jit c) -RUN(NAME expr_21 LABELS cpython llvm llvm_jit c) -RUN(NAME expr_22 LABELS cpython llvm llvm_jit c) -RUN(NAME expr_23 LABELS cpython llvm llvm_jit c) -RUN(NAME expr_24 LABELS cpython wasm) # mandelbrot - -RUN(NAME expr_01u LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME expr_02u LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME expr_03u LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME expr_04u LABELS cpython llvm llvm_jit c) - -RUN(NAME list_01 LABELS cpython llvm llvm_jit) - -RUN(NAME loop_01 LABELS cpython llvm llvm_jit c) -RUN(NAME loop_02 LABELS cpython llvm llvm_jit c wasm wasm_x86 wasm_x64) -RUN(NAME loop_03 LABELS cpython llvm llvm_jit c wasm wasm_x64) -RUN(NAME loop_04 LABELS cpython llvm llvm_jit c) -RUN(NAME loop_05 LABELS cpython llvm llvm_jit c) -RUN(NAME loop_06 LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME loop_07 LABELS cpython llvm llvm_jit c) -RUN(NAME loop_08 LABELS cpython llvm llvm_jit c) -RUN(NAME loop_09 LABELS cpython llvm llvm_jit) -RUN(NAME loop_10 LABELS cpython llvm llvm_jit) -RUN(NAME loop_11 LABELS cpython llvm llvm_jit) -RUN(NAME if_01 LABELS cpython llvm llvm_jit c wasm wasm_x86 wasm_x64) -RUN(NAME if_02 LABELS cpython llvm llvm_jit c wasm wasm_x86 wasm_x64) -RUN(NAME if_03 FAIL LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME print_02 LABELS cpython llvm llvm_jit c) -RUN(NAME test_types_01 LABELS cpython llvm llvm_jit c) -RUN(NAME test_types_02 LABELS cpython llvm llvm_jit c wasm) -RUN(NAME test_str_01 LABELS cpython llvm llvm_jit c) -RUN(NAME test_str_02 LABELS cpython llvm llvm_jit c) -RUN(NAME test_str_03 LABELS cpython llvm llvm_jit c) -RUN(NAME test_str_04 LABELS cpython llvm llvm_jit c wasm) -RUN(NAME test_str_05 LABELS cpython llvm llvm_jit c) -RUN(NAME test_str_06 LABELS cpython llvm llvm_jit c) -RUN(NAME test_string_01 LABELS cpython llvm llvm_jit c) -RUN(NAME test_list_01 LABELS cpython llvm llvm_jit c) -RUN(NAME test_list_02 LABELS cpython llvm llvm_jit c) -RUN(NAME test_list_03 LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME test_list_04 LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME test_list_05 LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME test_list_06 LABELS cpython llvm llvm_jit c) -RUN(NAME test_list_07 LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME test_list_08 LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME test_list_09 LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME test_list_10 LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME test_list_11 LABELS cpython llvm llvm_jit c) -RUN(NAME test_list_section LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME test_list_section2 LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME test_list_count LABELS cpython llvm llvm_jit) -RUN(NAME test_list_index LABELS cpython llvm llvm_jit) -RUN(NAME test_list_index2 LABELS cpython llvm llvm_jit) -RUN(NAME test_list_repeat LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME test_list_repeat2 LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME test_list_reverse LABELS cpython llvm llvm_jit) -RUN(NAME test_list_pop LABELS cpython llvm llvm_jit NOFAST) # TODO: Remove NOFAST from here. -RUN(NAME test_list_pop2 LABELS cpython llvm llvm_jit NOFAST) # TODO: Remove NOFAST from here. -RUN(NAME test_list_pop3 LABELS cpython llvm llvm_jit) -RUN(NAME test_list_compare LABELS cpython llvm llvm_jit) -RUN(NAME test_list_compare2 LABELS cpython llvm llvm_jit) -RUN(NAME test_list_concat LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME test_list_reserve LABELS cpython llvm llvm_jit) -RUN(NAME test_const_list LABELS cpython llvm llvm_jit) -RUN(NAME test_const_access LABELS cpython llvm llvm_jit) -RUN(NAME test_tuple_01 LABELS cpython llvm llvm_jit c) -RUN(NAME test_tuple_02 LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME test_tuple_03 LABELS cpython llvm llvm_jit c) -RUN(NAME test_tuple_04 LABELS cpython llvm llvm_jit c) -RUN(NAME test_tuple_concat LABELS cpython llvm llvm_jit) -RUN(NAME test_tuple_nested LABELS cpython llvm llvm_jit) -RUN(NAME test_const_dict LABELS cpython llvm llvm_jit) -RUN(NAME test_params LABELS cpython llvm llvm_jit NOFAST) -RUN(NAME test_dict_01 LABELS cpython llvm llvm_jit c) -RUN(NAME test_dict_02 LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME test_dict_03 LABELS cpython llvm llvm_jit NOFAST) -RUN(NAME test_dict_04 LABELS cpython llvm llvm_jit NOFAST) -RUN(NAME test_dict_05 LABELS cpython llvm llvm_jit c) -RUN(NAME test_dict_06 LABELS cpython llvm llvm_jit c) -RUN(NAME test_dict_07 LABELS cpython llvm llvm_jit c) -RUN(NAME test_dict_08 LABELS cpython llvm llvm_jit c) -RUN(NAME test_dict_09 LABELS cpython llvm llvm_jit c) -RUN(NAME test_dict_10 LABELS cpython llvm llvm_jit c) -RUN(NAME test_dict_11 LABELS cpython llvm llvm_jit c) -RUN(NAME test_dict_12 LABELS cpython llvm llvm_jit c) -RUN(NAME test_dict_13 LABELS cpython llvm llvm_jit c) -RUN(NAME test_dict_bool LABELS cpython llvm llvm_jit) -RUN(NAME test_dict_increment LABELS cpython llvm llvm_jit) -RUN(NAME test_dict_keys_values LABELS cpython llvm llvm_jit) -RUN(NAME test_dict_nested1 LABELS cpython llvm llvm_jit) -RUN(NAME test_dict_clear LABELS cpython llvm) -RUN(NAME test_set_len LABELS cpython llvm llvm_jit) -RUN(NAME test_set_add LABELS cpython llvm llvm_jit) -RUN(NAME test_set_remove LABELS cpython llvm llvm_jit) -RUN(NAME test_set_discard LABELS cpython llvm llvm_jit) -RUN(NAME test_set_clear LABELS cpython llvm) -RUN(NAME test_set_pop LABELS cpython llvm) -RUN(NAME test_global_set LABELS cpython llvm llvm_jit) -RUN(NAME test_for_loop LABELS cpython llvm llvm_jit c) -RUN(NAME modules_01 LABELS cpython llvm llvm_jit c wasm wasm_x86 wasm_x64) -RUN(NAME modules_02 LABELS cpython llvm llvm_jit c wasm wasm_x86 wasm_x64) -RUN(NAME test_import_01 LABELS cpython llvm llvm_jit c) -RUN(NAME test_import_02 LABELS cpython llvm llvm_jit c) -RUN(NAME test_import_03 LABELS cpython llvm llvm_jit c) -RUN(NAME test_import_04 LABELS cpython llvm llvm_jit c) -RUN(NAME test_import_05 LABELS cpython llvm llvm_jit c wasm wasm_x86 wasm_x64) -RUN(NAME test_import_06 LABELS cpython llvm llvm_jit) -RUN(NAME test_import_07 LABELS cpython llvm llvm_jit c) -RUN(NAME test_math LABELS cpython llvm llvm_jit NOFAST) -RUN(NAME test_membership_01 LABELS cpython llvm) -RUN(NAME test_numpy_01 LABELS cpython llvm llvm_jit c) -RUN(NAME test_numpy_02 LABELS cpython llvm llvm_jit c) -RUN(NAME test_numpy_03 LABELS cpython llvm llvm_jit c) -RUN(NAME test_numpy_04 LABELS cpython llvm llvm_jit c) -RUN(NAME elemental_01 LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME elemental_02 LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME elemental_03 LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME elemental_04 LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME elemental_05 LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME elemental_06 LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME elemental_07 LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME elemental_08 LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME elemental_09 LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME elemental_10 LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME elemental_11 LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME elemental_12 LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME elemental_13 LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME test_random LABELS cpython llvm llvm_jit NOFAST) -RUN(NAME test_random_02 LABELS cpython llvm llvm_jit NOFAST) -RUN(NAME test_os LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME test_builtin LABELS cpython llvm llvm_jit c) -RUN(NAME test_builtin_abs LABELS cpython llvm llvm_jit c) -RUN(NAME test_builtin_bool LABELS cpython llvm llvm_jit c) -RUN(NAME test_builtin_pow LABELS cpython llvm llvm_jit c EXTRA_ARGS --no-warnings) -RUN(NAME test_builtin_int LABELS cpython llvm llvm_jit c) -RUN(NAME test_builtin_len LABELS cpython llvm llvm_jit c) -RUN(NAME test_builtin_str LABELS cpython llvm llvm_jit c) -RUN(NAME test_builtin_oct LABELS cpython llvm llvm_jit c) -RUN(NAME test_builtin_hex LABELS cpython llvm llvm_jit c) -RUN(NAME test_builtin_bin LABELS cpython llvm llvm_jit c) -RUN(NAME test_builtin_float LABELS cpython llvm llvm_jit c) -RUN(NAME test_builtin_str_02 LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME test_builtin_round LABELS cpython llvm llvm_jit c) -RUN(NAME test_builtin_divmod LABELS cpython llvm llvm_jit c) -RUN(NAME test_builtin_sum LABELS cpython llvm llvm_jit c) -RUN(NAME test_math1 LABELS cpython llvm llvm_jit c) -RUN(NAME test_math_02 LABELS cpython llvm llvm_jit NOFAST) -RUN(NAME test_math_03 LABELS llvm llvm_jit) #1595: TODO: Test using CPython (3.11 recommended) -RUN(NAME test_pass_compare LABELS cpython llvm llvm_jit c) -RUN(NAME test_c_interop_01 LABELS cpython llvm llvm_jit c) -RUN(NAME test_c_interop_02 LABELS cpython llvm c - EXTRAFILES test_c_interop_02b.c) -RUN(NAME test_c_interop_03 LABELS cpython llvm c - EXTRAFILES test_c_interop_03b.c) -RUN(NAME test_c_interop_04 LABELS cpython llvm llvm_jit c - EXTRAFILES test_c_interop_04b.c) -RUN(NAME test_c_interop_05 LABELS llvm c - EXTRAFILES test_c_interop_05b.c) -RUN(NAME bindc_03 LABELS llvm c - EXTRAFILES bindc_03b.c) -RUN(NAME bindc_05 LABELS llvm c - EXTRAFILES bindc_05b.c) -RUN(NAME bindc_06 LABELS llvm c - EXTRAFILES bindc_06b.c) -RUN(NAME bindpy_01 LABELS cpython llvm_py c_py EXTRA_ARGS --enable-cpython NOFAST COPY_TO_BIN bindpy_01_module.py) -RUN(NAME bindpy_02 LABELS cpython c_py EXTRA_ARGS --link-numpy COPY_TO_BIN bindpy_02_module.py) -RUN(NAME bindpy_03 LABELS cpython c_py EXTRA_ARGS --link-numpy NOFAST COPY_TO_BIN bindpy_03_module.py) -RUN(NAME bindpy_04 LABELS cpython c_py EXTRA_ARGS --link-numpy NOFAST COPY_TO_BIN bindpy_04_module.py) -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) -RUN(NAME bindpy_06 LABELS cpython llvm_py EXTRA_ARGS --enable-cpython NOFAST COPY_TO_BIN bindpy_06_module.py REQ_PY_VER 3.10) -RUN(NAME test_generics_01 LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME test_cmath LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME test_complex_01 LABELS cpython llvm llvm_jit c wasm wasm_x64) -RUN(NAME test_complex_02 LABELS cpython llvm llvm_jit c) -RUN(NAME test_ConstantEllipsis LABLES cpython llvm llvm_jit c) -RUN(NAME test_max_min LABELS cpython llvm llvm_jit c) -RUN(NAME test_global LABELS cpython llvm llvm_jit c) -RUN(NAME test_global_decl LABELS cpython llvm llvm_jit c) -RUN(NAME test_ifexp_01 LABELS cpython llvm llvm_jit c) -RUN(NAME test_ifexp_02 LABELS cpython llvm llvm_jit c) -RUN(NAME test_ifexp_03 LABELS cpython llvm llvm_jit c) -RUN(NAME test_unary_op_01 LABELS cpython llvm llvm_jit c) # unary minus -RUN(NAME test_unary_op_02 LABELS cpython llvm llvm_jit c) # unary plus -RUN(NAME test_unary_op_03 LABELS cpython llvm llvm_jit c wasm) # unary bitinvert -RUN(NAME test_unary_op_04 LABELS cpython llvm llvm_jit c) # unary bitinvert -RUN(NAME test_unary_op_05 LABELS cpython llvm llvm_jit c) # unsigned unary minus, plus -RUN(NAME test_unary_op_06 LABELS cpython llvm llvm_jit c) # unsigned unary bitnot -RUN(NAME test_unsigned_01 LABELS cpython llvm llvm_jit c) # unsigned bitshift left, right -RUN(NAME test_unsigned_02 LABELS cpython llvm llvm_jit c) -RUN(NAME test_unsigned_03 LABELS cpython llvm llvm_jit c) -RUN(NAME test_bool_binop LABELS cpython llvm llvm_jit c) -RUN(NAME test_issue_518 LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME structs_01 LABELS cpython llvm llvm_jit c) -RUN(NAME structs_02 LABELS cpython llvm llvm_jit c) -RUN(NAME structs_02b LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME structs_03 LABELS llvm llvm_jit c) -RUN(NAME structs_04 LABELS cpython llvm llvm_jit c) -RUN(NAME structs_05 LABELS cpython llvm llvm_jit c) -RUN(NAME structs_06 LABELS cpython llvm llvm_jit c) -RUN(NAME structs_07 LABELS llvm c - EXTRAFILES structs_07b.c) -RUN(NAME structs_08 LABELS cpython llvm llvm_jit c) -RUN(NAME structs_09 LABELS cpython llvm llvm_jit c) -RUN(NAME structs_10 LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME structs_11 LABELS cpython llvm llvm_jit c) -RUN(NAME structs_12 LABELS cpython llvm llvm_jit c) -RUN(NAME structs_13 LABELS llvm c - EXTRAFILES structs_13b.c) -RUN(NAME structs_14 LABELS cpython llvm llvm_jit c) -RUN(NAME structs_15 LABELS cpython llvm llvm_jit c) -RUN(NAME structs_16 LABELS cpython llvm llvm_jit c) -RUN(NAME structs_17 LABELS cpython llvm llvm_jit c) -RUN(NAME structs_18 LABELS cpython llvm c - EXTRAFILES structs_18b.c) -RUN(NAME structs_19 LABELS cpython llvm c - EXTRAFILES structs_19b.c) -RUN(NAME structs_20 LABELS cpython llvm c - EXTRAFILES structs_20b.c) -RUN(NAME structs_21 LABELS cpython llvm llvm_jit c) -RUN(NAME structs_22 LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME structs_23 LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME structs_24 LABELS cpython llvm llvm_jit c) -RUN(NAME structs_25 LABELS cpython llvm llvm_jit c) -RUN(NAME structs_26 LABELS cpython llvm llvm_jit c) -RUN(NAME structs_27 LABELS cpython llvm llvm_jit c) -RUN(NAME structs_28 LABELS cpython llvm llvm_jit c) -RUN(NAME structs_29 LABELS cpython llvm llvm_jit) -RUN(NAME structs_30 LABELS cpython llvm llvm_jit c) -RUN(NAME structs_31 LABELS cpython llvm llvm_jit c) -RUN(NAME structs_32 LABELS cpython llvm llvm_jit c) -RUN(NAME structs_33 LABELS cpython llvm llvm_jit c) -RUN(NAME structs_34 LABELS cpython llvm llvm_jit c) -RUN(NAME structs_35 LABELS cpython llvm llvm_jit) - -RUN(NAME symbolics_01 LABELS cpython_sym c_sym llvm_sym llvm_jit NOFAST EXTRA_ARGS --enable-symengine) -RUN(NAME symbolics_02 LABELS cpython_sym c_sym llvm_sym llvm_jit NOFAST EXTRA_ARGS --enable-symengine) -RUN(NAME symbolics_03 LABELS cpython_sym c_sym llvm_sym llvm_jit NOFAST EXTRA_ARGS --enable-symengine) -RUN(NAME symbolics_04 LABELS cpython_sym c_sym llvm_sym llvm_jit NOFAST EXTRA_ARGS --enable-symengine) -RUN(NAME symbolics_05 LABELS cpython_sym c_sym llvm_sym llvm_jit NOFAST EXTRA_ARGS --enable-symengine) -RUN(NAME symbolics_06 LABELS cpython_sym c_sym llvm_sym llvm_jit NOFAST EXTRA_ARGS --enable-symengine) -RUN(NAME symbolics_07 LABELS cpython_sym c_sym llvm_sym llvm_jit NOFAST EXTRA_ARGS --enable-symengine) -RUN(NAME symbolics_08 LABELS cpython_sym c_sym llvm_sym llvm_jit EXTRA_ARGS --enable-symengine) -RUN(NAME symbolics_09 LABELS cpython_sym c_sym llvm_sym llvm_jit NOFAST EXTRA_ARGS --enable-symengine) -RUN(NAME symbolics_10 LABELS cpython_sym c_sym llvm_sym NOFAST EXTRA_ARGS --enable-symengine) -RUN(NAME symbolics_11 LABELS cpython_sym c_sym llvm_sym llvm_jit NOFAST EXTRA_ARGS --enable-symengine) -RUN(NAME symbolics_12 LABELS cpython_sym c_sym llvm_sym llvm_jit NOFAST EXTRA_ARGS --enable-symengine) -RUN(NAME symbolics_13 LABELS cpython_sym c_sym llvm_sym llvm_jit NOFAST EXTRA_ARGS --enable-symengine) -RUN(NAME symbolics_14 LABELS cpython_sym c_sym llvm_sym llvm_jit NOFAST EXTRA_ARGS --enable-symengine) -RUN(NAME test_gruntz LABELS cpython_sym c_sym llvm_sym NOFAST EXTRA_ARGS --enable-symengine) -RUN(NAME symbolics_15 LABELS c_sym llvm_sym llvm_jit NOFAST EXTRA_ARGS --enable-symengine) -RUN(NAME symbolics_16 LABELS cpython_sym c_sym llvm_sym llvm_jit NOFAST EXTRA_ARGS --enable-symengine) -RUN(NAME symbolics_17 LABELS cpython_sym c_sym llvm_sym llvm_jit NOFAST EXTRA_ARGS --enable-symengine) -RUN(NAME symbolics_18 LABELS cpython_sym c_sym llvm_sym llvm_jit NOFAST EXTRA_ARGS --enable-symengine) -RUN(NAME gruntz_demo3 LABELS cpython_sym c_sym llvm_sym llvm_jit NOFAST EXTRA_ARGS --enable-symengine) - -RUN(NAME sizeof_01 LABELS llvm c - EXTRAFILES sizeof_01b.c) -RUN(NAME sizeof_02 LABELS cpython llvm llvm_jit c) -RUN(NAME enum_01 LABELS cpython llvm llvm_jit c) -RUN(NAME enum_02 LABELS cpython llvm llvm_jit) -RUN(NAME enum_03 LABELS cpython llvm llvm_jit c) -RUN(NAME enum_04 LABELS cpython llvm llvm_jit c) -RUN(NAME enum_05 LABELS llvm c - EXTRAFILES enum_05b.c) -RUN(NAME enum_06 LABELS cpython llvm llvm_jit c) -RUN(NAME enum_07 IMPORT_PATH .. - LABELS cpython llvm llvm_jit c) -RUN(NAME union_01 LABELS cpython llvm llvm_jit c) -RUN(NAME union_02 LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME union_03 LABELS cpython llvm llvm_jit c) -RUN(NAME union_04 IMPORT_PATH .. - LABELS cpython llvm llvm_jit c) -RUN(NAME test_str_to_int LABELS cpython llvm llvm_jit c) -RUN(NAME test_platform LABELS cpython llvm llvm_jit c) -RUN(NAME test_vars_01 LABELS cpython llvm llvm_jit) -RUN(NAME test_version LABELS cpython llvm llvm_jit) -RUN(NAME logical_binop1 LABELS cpython llvm llvm_jit) -RUN(NAME test_logical_compare LABELS cpython llvm llvm_jit) # TODO: Add C backend after fixing issue #2708 -RUN(NAME test_logical_assignment LABELS cpython llvm llvm_jit) # TODO: Add C backend after fixing issue #2708 -RUN(NAME vec_01 LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME test_str_comparison LABELS cpython llvm llvm_jit c wasm) -RUN(NAME test_bit_length LABELS cpython c) # FIXME: This test fails on llvm & llvm_jit -RUN(NAME str_to_list_cast LABELS cpython llvm llvm_jit c) -RUN(NAME cast_01 LABELS cpython llvm llvm_jit c) -RUN(NAME cast_02 LABELS cpython llvm llvm_jit c) -RUN(NAME test_sys_01 LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME intent_01 LABELS cpython llvm llvm_jit) - - -RUN(NAME test_package_01 LABELS cpython llvm llvm_jit NOFAST) -RUN(NAME test_pkg_lpdraw LABELS cpython llvm llvm_jit wasm) -RUN(NAME test_pkg_lnn_01 LABELS cpython llvm llvm_jit NOFAST) -RUN(NAME test_pkg_lnn_02 LABELS cpython llvm llvm_jit NOFAST) -RUN(NAME test_pkg_lpconvexhull LABELS cpython llvm llvm_jit c NOFAST) - -RUN(NAME generics_01 LABELS cpython llvm llvm_jit c) -RUN(NAME generics_02 LABELS cpython llvm llvm_jit c) -RUN(NAME generics_array_01 LABELS cpython llvm llvm_jit c) -RUN(NAME generics_array_02 LABELS cpython llvm llvm_jit c) -RUN(NAME generics_array_03 LABELS cpython llvm llvm_jit c) -RUN(NAME generics_list_01 LABELS cpython llvm llvm_jit c) -RUN(NAME test_statistics_01 LABELS cpython llvm llvm_jit NOFAST) -RUN(NAME test_statistics_02 LABELS cpython llvm llvm_jit NOFAST REQ_PY_VER 3.10) -RUN(NAME test_attributes LABELS cpython llvm llvm_jit) -RUN(NAME test_str_attributes LABELS cpython llvm llvm_jit c) -RUN(NAME kwargs_01 LABELS cpython llvm llvm_jit c NOFAST) -RUN(NAME def_func_01 LABELS cpython llvm llvm_jit c) - -RUN(NAME func_inline_01 LABELS llvm llvm_jit c wasm) -RUN(NAME func_inline_02 LABELS cpython llvm llvm_jit c) -RUN(NAME func_static_01 LABELS cpython llvm llvm_jit c wasm) -RUN(NAME func_static_02 LABELS cpython llvm llvm_jit c wasm) -RUN(NAME func_dep_03 LABELS cpython llvm llvm_jit c) -RUN(NAME func_dep_04 LABELS cpython llvm llvm_jit c) -RUN(NAME func_internal_def_01 LABELS cpython llvm llvm_jit NOFAST) -RUN(NAME func_01 LABELS cpython llvm llvm_jit) -RUN(NAME func_02 LABELS c_sym llvm_sym llvm_jit NOFAST EXTRA_ARGS --enable-symengine) - -RUN(NAME float_01 LABELS cpython llvm llvm_jit c wasm wasm_x64) -RUN(NAME recursive_01 LABELS cpython llvm llvm_jit c wasm wasm_x64 wasm_x86) -RUN(NAME comp_01 LABELS cpython llvm llvm_jit c wasm wasm_x64) -RUN(NAME bit_operations_i32 LABELS cpython llvm llvm_jit c wasm wasm_x64) -RUN(NAME bit_operations_i64 LABELS cpython llvm llvm_jit c wasm) - -RUN(NAME test_argv_01 LABELS cpython llvm NOFAST) -RUN(NAME global_syms_01 LABELS cpython llvm llvm_jit c) -RUN(NAME global_syms_02 LABELS cpython llvm llvm_jit c) -RUN(NAME global_syms_03_b LABELS cpython llvm llvm_jit c) -RUN(NAME global_syms_03_c LABELS cpython llvm llvm_jit c) -RUN(NAME global_syms_04 LABELS cpython llvm llvm_jit c wasm wasm_x64) -RUN(NAME global_syms_05 LABELS cpython llvm llvm_jit c) -RUN(NAME global_syms_06 LABELS cpython llvm llvm_jit c) - -RUN(NAME callback_01 LABELS cpython llvm llvm_jit c) -RUN(NAME callback_02 LABELS cpython llvm llvm_jit c) -RUN(NAME callback_03 LABELS cpython llvm llvm_jit c) - -RUN(NAME lambda_01 LABELS cpython llvm llvm_jit) - -RUN(NAME c_mangling LABELS cpython llvm llvm_jit c) -RUN(NAME class_01 LABELS cpython llvm llvm_jit) -RUN(NAME class_02 LABELS cpython llvm llvm_jit) -RUN(NAME class_03 LABELS cpython llvm llvm_jit) -RUN(NAME class_04 LABELS cpython llvm llvm_jit) -RUN(NAME class_05 LABELS cpython llvm llvm_jit) -RUN(NAME class_06 LABELS cpython llvm llvm_jit) - - -# callback_04 is to test emulation. So just run with cpython -RUN(NAME callback_04 IMPORT_PATH .. LABELS cpython) - -# Intrinsic Functions -RUN(NAME intrinsics_01 LABELS cpython llvm llvm_jit NOFAST) # any -RUN(NAME intrinsics_02 LABELS cpython llvm llvm_jit c) # floordiv -RUN(NAME test_builtin_type LABELS cpython llvm llvm_jit c) # type -RUN(NAME test_builtin_type_set LABELS cpython llvm llvm_jit) # type (specifically for `set`) - -# lpython decorator -RUN(NAME lpython_decorator_01 LABELS cpython) -RUN(NAME lpython_decorator_02 LABELS cpython) - -COMPILE(NAME import_order_01 LABELS cpython llvm llvm_jit c) # any - -# LPython emulation mode -RUN(NAME lpython_emulation_01 LABELS cpython NOMOD) +RUN(NAME test_str_01 LABELS cpython llvm) diff --git a/tests/tests.toml b/tests/tests.toml index 8969f43c8b..7bb18a6c94 100644 --- a/tests/tests.toml +++ b/tests/tests.toml @@ -1,1436 +1,3 @@ -# Possible tests: -# ast ... run the Parser and output AST, compare against reference version -# ast_new ... run the New Parser and output AST, compare against reference version -# asr ... run the Semantics and output ASR, compare against reference version -# llvm ... run the Semantics and output LLVM, compare against reference version -# llvm_dbg ... run the Semantics and output LLVM with debug information -# tokens ... output Tokens, compare against reference version -# run ... compiles and executes the specified file; -# checks both runtime errors and successful runs -# run_with_dbg ... runtime checks with debug information enabled - -# tests - -[[test]] -filename = "doconcurrentloop_01.py" -ast = true -asr = true -cpp = true - -[[test]] -filename = "complex1.py" -ast = true -asr = true - -[[test]] -filename = "complex2.py" -# cpp = true - -[[test]] -filename = "constants1.py" -ast = true -asr = true - -[[test]] -filename = "subscript1.py" -ast = true -asr = true - -[[test]] -filename = "list1.py" -ast = true -asr = true - -[[test]] -filename = "tuple1.py" -ast = true -asr = true - -[[test]] -filename = "dictionary1.py" -ast = true -asr = true - -[[test]] -filename = "test_aggregate_constants.py" -python = true - -[[test]] -filename = "test_list_methods.py" -python = true - -[[test]] -filename = "expr1.py" -ast = true -asr = true - -[[test]] -filename = "expr2.py" -ast = true -asr = true -cpp = true -wat = true -python = true - -[[test]] -filename = "expr4.py" -ast = true -asr = true -python = true - -[[test]] -filename = "expr5.py" -ast = true -asr = true -cpp = true -python = true - -[[test]] -filename = "expr6.py" -ast = true -asr = true -cpp = true -python = true - -[[test]] -filename = "expr7.py" -ast = true -asr = true -cpp = true -c = true - -[[test]] -filename = "expr8.py" -ast = true -asr = true -cpp = true -#llvm = true - -[[test]] -filename = "expr9.py" -ast = true -asr = true -cpp = true -wat = true - -[[test]] -filename = "expr10.py" -ast = true -asr = true - -[[test]] -filename = "expr11.py" -ast = true -asr = true -python = true - -[[test]] -filename = "expr12.py" -ast = true -asr = true -cpp = true - -[[test]] -filename = "expr13.py" -ast = true -asr = true - -[[test]] -filename = "expr14.py" -llvm = true -wat = true -python = true - -[[test]] -filename = "expr15.py" -cpp = true - -[[test]] -filename = "expr16.py" -asr = true - -[[test]] -filename = "expr17.py" -python = true - -[[test]] -filename = "expr_01.py" -ast = true -asr = true -llvm = true -llvm_dbg = true - -[[test]] -filename = "../integration_tests/array_01_decl.py" -asr = true - -[[test]] -filename = "../integration_tests/array_02_decl.py" -asr = true - -[[test]] -filename = "../integration_tests/expr_07.py" -asr = true - -[[test]] -filename = "../integration_tests/test_numpy_03.py" -asr = true - -[[test]] -filename = "../integration_tests/test_numpy_04.py" -asr = true - -[[test]] -filename = "../integration_tests/expr_01.py" -asr = true -c = true - -[[test]] -filename = "../integration_tests/expr_09.py" -asr = true - -[[test]] -filename = "../integration_tests/elemental_01.py" -asr = true - -[[test]] -filename = "../integration_tests/expr_10.py" -asr = true - -[[test]] -filename = "../integration_tests/expr_11.py" -c = true -cpp = true - -[[test]] -filename = "../integration_tests/expr_12.py" -asr = true -c = true - -[[test]] -filename = "../integration_tests/expr_14.py" -asr = true - -[[test]] -filename = "../integration_tests/modules_02.py" -asr = true -asr_json = true - -[[test]] -filename = "../integration_tests/test_import_02.py" -c = true - -[[test]] -filename = "../integration_tests/import_order_01.py" -c = true -disable_main = true - -[[test]] -filename = "../integration_tests/vec_01.py" -asr = true -pass = "loop_vectorise" - -[[test]] -filename = "../integration_tests/func_inline_01.py" -asr = true -llvm = true -pass_with_llvm = true -pass = "inline_function_calls" -fast = true - -# to make sure static keyword is actually present in function declaration -[[test]] -filename = "../integration_tests/func_static_01.py" -c = true - -[[test]] -filename = "loop1.py" -ast = true -asr = true -cpp = true -c = true -wat = true - -[[test]] -filename = "loop3.py" -ast = true -asr = true -cpp = true - -[[test]] -filename = "loop4.py" -asr = true -c = true -cpp = true - -[[test]] -filename = "assert1.py" -ast = true -asr = true -cpp = true -llvm = true -python = true - -[[test]] -filename = "assign1.py" -ast = true -asr = true -python = true - -[[test]] -filename = "assign2.py" -asr = true - -[[test]] -filename = "set1.py" -ast = true -asr = true - -[[test]] -filename = "bool1.py" -llvm = true -wat = true - -[[test]] -filename = "global_scope1.py" -ast = true -asr = true - -[[test]] -filename = "c_interop1.py" -asr = true -c = true - -[[test]] -filename = "test_end_sep_keywords.py" -asr = true - -[[test]] -filename = "lpython1.py" -llvm = true - -[[test]] -filename = "print_str.py" -wat = true - -[[test]] -filename = "intent_01.py" -asr = true - -# integration_tests - -[[test]] -filename = "../integration_tests/test_list_repeat2.py" -cpp = true - -[[test]] -filename = "../integration_tests/test_builtin.py" -asr = true - -[[test]] -filename = "../integration_tests/test_complex_01.py" -asr = true - -[[test]] -filename = "../integration_tests/test_complex_02.py" -asr = true - -[[test]] -filename = "../integration_tests/structs_01.py" -asr = true - -[[test]] -filename = "../integration_tests/structs_02.py" -asr = true - -[[test]] -filename = "../integration_tests/structs_03.py" -asr = true - -[[test]] -filename = "../integration_tests/structs_04.py" -asr = true - -[[test]] -filename = "../integration_tests/structs_05.py" -asr = true - -[[test]] -filename = "../integration_tests/structs_16.py" -asr = true -pass = "class_constructor" -cumulative = true - -[[test]] -filename = "errors/class01.py" -asr = true - -[[test]] -filename = "../integration_tests/callback_01.py" -asr = true - -[[test]] -filename = "../integration_tests/bindc_01.py" -asr = true -llvm = true - -[[test]] -filename = "../integration_tests/bindc_02.py" -asr = true - -[[test]] -filename = "../integration_tests/test_builtin_abs.py" -asr = true - -[[test]] -filename = "../integration_tests/test_builtin_str.py" -asr = true - -[[test]] -filename = "../integration_tests/test_builtin_bool.py" -asr = true - -[[test]] -filename = "../integration_tests/test_builtin_len.py" -asr = true - -[[test]] -filename = "../integration_tests/test_builtin_pow.py" -asr = true -cpp = true - -[[test]] -filename = "../integration_tests/test_builtin_int.py" -asr = true - -[[test]] -filename = "../integration_tests/test_builtin_float.py" -asr = true - -[[test]] -filename = "../integration_tests/test_builtin_round.py" -asr = true - -[[test]] -filename = "../integration_tests/test_builtin_bin.py" -asr = true - -[[test]] -filename = "../integration_tests/test_builtin_hex.py" -asr = true - -[[test]] -filename = "../integration_tests/test_builtin_oct.py" -asr = true - -[[test]] -filename = "../integration_tests/test_max_min.py" -asr = true - -[[test]] -filename = "../integration_tests/expr_05.py" -asr = true - -[[test]] -filename = "../integration_tests/test_unary_op_03.py" -asr = true -llvm = true -cpp = true - -[[test]] -filename = "../integration_tests/test_bool_binop.py" -asr = true - -[[test]] -filename = "../integration_tests/test_issue_518.py" -llvm = true -c = true - -[[test]] -filename = "../integration_tests/test_c_interop_01.py" -asr = true - -[[test]] -filename = "../integration_tests/print_01.py" -c = true -cpp = true - -[[test]] -filename = "../integration_tests/variable_decl_03.py" -c = true - -[[test]] -filename = "../integration_tests/print_02.py" -asr = true -pass = "print_list_tuple" - -[[test]] -filename = "../integration_tests/print_list_tuple_03.py" -asr = true -pass = "print_list_tuple" - -[[test]] -filename = "../integration_tests/print_04.py" -llvm = true - -[[test]] -filename = "../integration_tests/test_list_item_mixed_print.py" -run = true - -[[test]] -filename = "../integration_tests/test_intrinsic_function_mixed_print.py" -run = true - -[[test]] -filename = "../integration_tests/generics_01.py" -asr = true - -[[test]] -filename = "../integration_tests/generics_02.py" -asr = true - -[[test]] -filename = "../integration_tests/generics_array_01.py" -asr = true - -[[test]] -filename = "../integration_tests/generics_array_02.py" -asr = true - -[[test]] -filename = "../integration_tests/generics_array_03.py" -asr = true - -[[test]] -filename = "../integration_tests/generics_list_01.py" -asr = true - -[[test]] -filename = "../integration_tests/global_syms_01.py" -asr = true - -[[test]] -filename = "cast.py" -asr = true - -# tests/tokens - -[[test]] -filename = "tokens/docstring1.py" -tokens = true - -[[test]] -filename = "tokens/comment1.py" -tokens = true - -[[test]] -filename = "tokens/comment2.py" -tokens = true -ast_new = true - -[[test]] -filename = "tokens/symbols1.py" -tokens = true - -[[test]] -filename = "tokens/numbers1.py" -tokens = true - -[[test]] -filename = "tokens/indent1.py" -tokens = true - -[[test]] -filename = "tokens/indent2.py" -tokens = true - -# tests/parser - -[[test]] -filename = "parser/import1.py" -ast_new = true - -[[test]] -filename = "parser/statements1.py" -ast_new = true - -[[test]] -filename = "parser/statements2.py" -ast_new = true - -[[test]] -filename = "parser/yield.py" -ast_new = true - -[[test]] -filename = "parser/if1.py" -ast_new = true - -[[test]] -filename = "parser/for1.py" -ast_new = true - -[[test]] -filename = "parser/comprehension1.py" -ast_new = true - -[[test]] -filename = "parser/conditional_expr1.py" -ast_new = true - -[[test]] -filename = "parser/try1.py" -ast_new = true - -[[test]] -filename = "parser/function_def1.py" -ast_new = true - -[[test]] -filename = "parser/function_def2.py" -ast_new = true - -[[test]] -filename = "parser/function_def3.py" -ast_new = true - -[[test]] -filename = "parser/class_def1.py" -ast_new = true - -[[test]] -filename = "parser/class_def2.py" -ast_new = true - -[[test]] -filename = "parser/dictionary1.py" -ast_new = true - -[[test]] -filename = "parser/with1.py" -ast_new = true - -[[test]] -filename = "parser/async1.py" -ast_new = true - -[[test]] -filename = "parser/slice1.py" -ast_new = true - -[[test]] -filename = "parser/ellipsis1.py" -ast = true - -[[test]] -filename = "parser/ellipsis2.py" -ast_new = true - -[[test]] -filename = "parser/while1.py" -ast_new = true - -[[test]] -filename = "parser/string1.py" -ast_new = true - -[[test]] -filename = "parser/string2.py" -ast_new = true - -[[test]] -filename = "parser/string3.py" -ast_new = true - -[[test]] -filename = "parser/global1.py" -ast = true -ast_new = true - -[[test]] -filename = "parser/if2.py" -ast_new = true - -[[test]] -filename = "parser/for2.py" -ast_new = true - -[[test]] -filename = "parser/boolOp1.py" -ast_new = true - -[[test]] -filename = "parser/lambda1.py" -ast_new = true - -[[test]] -filename = "parser/lambda2.py" -ast_new = true - -[[test]] -filename = "parser/tuple1.py" -ast_new = true - -[[test]] -filename = "errors/lambda_01.py" -asr = true - -[[test]] -filename = "errors/test_bit_length.py" -asr = true - -[[test]] -filename = "errors/string_01.py" -asr = true - -[[test]] -filename = "errors/string_02.py" -asr = true - -[[test]] -filename = "errors/structs_01.py" -asr = true - -[[test]] -filename = "errors/arrays_01.py" -asr = true - -[[test]] -filename = "errors/arrays_02.py" -asr = true - -[[test]] -filename = "errors/arrays_03.py" -asr = true - -[[test]] -filename = "errors/arrays_04.py" -asr = true - -[[test]] -filename = "errors/arrays_05.py" -asr = true - -[[test]] -filename = "errors/arrays_06.py" -asr = true - -[[test]] -filename = "errors/arrays_07.py" -asr = true - -[[test]] -filename = "errors/arrays_08.py" -asr = true - -[[test]] -filename = "errors/arrays_09.py" -asr = true - -[[test]] -filename = "errors/arrays_10.py" -asr = true - -[[test]] -filename = "errors/arrays_11.py" -asr = true - -[[test]] -filename = "errors/arrays_12.py" -asr = true - -[[test]] -filename = "errors/arrays_13.py" -asr = true - -[[test]] -filename = "errors/arrays_14.py" -asr = true - -[[test]] -filename = "errors/structs_02.py" -asr = true - -[[test]] -filename = "errors/structs_03.py" -asr = true - -[[test]] -filename = "errors/structs_04.py" -asr = true - -[[test]] -filename = "structs_01.py" -asr = true - -[[test]] -filename = "errors/structs_06.py" -asr = true - -[[test]] -filename = "errors/structs_07.py" -asr = true - -[[test]] -filename = "errors/structs_08.py" -asr = true - -[[test]] -filename = "errors/structs_09.py" -asr = true - -[[test]] -filename = "errors/structs_10.py" -asr = true - -[[test]] -filename = "structs_11.py" -llvm = true - -[[test]] -filename = "errors/const_01.py" -asr = true - -[[test]] -filename = "errors/const_02.py" -asr = true - -[[test]] -filename = "errors/test_compare_01.py" -asr = true - -[[test]] -filename = "errors/test_compare_02.py" -asr = true - -[[test]] -filename = "parser/type_comment1.py" -ast_new = true - -[[test]] -filename = "parser/unicode.py" -ast_new = true - -[[test]] -filename = "parser/match_stmt1.py" -ast_new = true - -# tests/errors - -[[test]] -filename = "errors/test_async.py" -asr = true - -[[test]] -filename = "errors/test_str_indexing.py" -asr = true - -[[test]] -filename = "errors/test_set_indexing.py" -asr = true - -[[test]] -filename = "errors/test_str_slicing.py" -asr = true - -[[test]] -filename = "errors/test_str_slicing2.py" -asr = true - -[[test]] -filename = "errors/test_str_slicing3.py" -asr = true - -[[test]] -filename = "errors/test_str_slicing4.py" -asr = true - -[[test]] -filename = "errors/test_list_slicing.py" -asr = true - -[[test]] -filename = "errors/test_const_list_append.py" -asr = true - -[[test]] -filename = "errors/test_const_list_clear.py" -asr = true - -[[test]] -filename = "errors/test_const_list_insert.py" -asr = true - -[[test]] -filename = "errors/test_const_list_pop.py" -asr = true - -[[test]] -filename = "errors/test_const_list_reverse.py" -asr = true - -[[test]] -filename = "errors/test_const_list_remove.py" -asr = true - -[[test]] -filename = "errors/test_annassign_01.py" -asr = true - -[[test]] -filename = "errors/test_annassign_02.py" -asr = true - -[[test]] -filename = "errors/test_annassign_03.py" -asr = true - -[[test]] -filename = "errors/test_annassign_type_mismatch.py" -asr = true - -[[test]] -filename = "errors/test_annassign_type_mismatch2.py" -asr = true - -[[test]] -filename = "errors/test_append_type_mismatch.py" -asr = true - -[[test]] -filename = "errors/test_list_concat.py" -asr = true - -[[test]] -filename = "errors/test_list_count.py" -asr = true - -[[test]] -filename = "errors/test_list_index.py" -run = true - -[[test]] -filename = "errors/test_list_index2.py" -run = true - -[[test]] -filename = "errors/test_list_index3.py" -run = true - -[[test]] -filename = "errors/test_list_index4.py" -run = true - -[[test]] -filename = "errors/test_list1.py" -asr = true - -[[test]] -filename = "errors/test_list2.py" -asr = true - -[[test]] -filename = "errors/test_list3.py" -asr = true - -[[test]] -filename = "errors/test_list4.py" -asr = true - -[[test]] -filename = "errors/test_set1.py" -asr = true - -[[test]] -filename = "errors/test_set2.py" -asr = true - -[[test]] -filename = "errors/test_set3.py" -asr = true - -[[test]] -filename = "errors/test_set4.py" -asr = true - -[[test]] -filename = "errors/test_pow.py" -asr = true - -[[test]] -filename = "errors/test_pow1.py" -asr = true - -[[test]] -filename = "errors/test_pow2.py" -asr = true - -[[test]] -filename = "errors/test_pow3.py" -asr = true - -[[test]] -filename = "errors/test_pow4.py" -asr = true - -[[test]] -filename = "errors/test_operator_01.py" -asr = true - -[[test]] -filename = "errors/test_ord.py" -asr = true - -[[test]] -filename = "errors/test_chr.py" -asr = true - -[[test]] -filename = "errors/test_assign1.py" -asr = true - -[[test]] -filename = "errors/test_assign2.py" -asr = true - -[[test]] -filename = "errors/test_assign3.py" -asr = true - -[[test]] -filename = "errors/test_assign4.py" -asr = true - -[[test]] -filename = "errors/test_assign5.py" -asr = true - -[[test]] -filename = "errors/test_assign6.py" -asr = true - -[[test]] -filename = "errors/test_assign7.py" -asr = true - -[[test]] -filename = "errors/test_assign8.py" -asr = true - -[[test]] -filename = "errors/test_assign9.py" -asr = true - -[[test]] -filename = "errors/test_binop1.py" -asr = true - -[[test]] -filename = "errors/test_binop2.py" -asr = true - -[[test]] -filename = "errors/test_binop3.py" -asr = true - -[[test]] -filename = "errors/test_dict1.py" -asr = true - -[[test]] -filename = "errors/test_dict_key1.py" -asr = true - -[[test]] -filename = "errors/test_dict_key2.py" -asr = true - -[[test]] -filename = "errors/test_dict_key3.py" -asr = true - -[[test]] -filename = "errors/test_dict_key4.py" -asr = true - -[[test]] -filename = "errors/test_dict_key5.py" -asr = true - -[[test]] -filename = "errors/test_dict_key6.py" -asr = true - -[[test]] -filename = "errors/test_set_object1.py" -asr = true - -[[test]] -filename = "errors/test_set_object2.py" -asr = true - -[[test]] -filename = "errors/test_set_object3.py" -asr = true - -[[test]] -filename = "errors/test_set_object4.py" -asr = true - -[[test]] -filename = "errors/test_set_object5.py" -asr = true - -[[test]] -filename = "errors/test_set_object6.py" -asr = true - -[[test]] -filename = "errors/test_dict8.py" -asr = true - -[[test]] -filename = "errors/test_dict9.py" -asr = true - -[[test]] -filename = "errors/test_dict10.py" -asr = true - -[[test]] -filename = "errors/test_dict11.py" -asr = true - -[[test]] -filename = "errors/test_dict12.py" -asr = true - -[[test]] -filename = "errors/test_dict13.py" -asr = true - -[[test]] -filename = "errors/test_dict14.py" -run = true - -[[test]] -filename = "errors/test_dict15.py" -run = true - -[[test]] -filename = "errors/test_dict16.py" -run = true - -[[test]] -filename = "errors/test_const_dict.py" -asr = true - -[[test]] -filename = "errors/test_zero_division.py" -asr = true - -[[test]] -filename = "errors/test_zero_division2.py" -asr = true - -[[test]] -filename = "errors/test_zero_division3.py" -asr = true - -[[test]] -filename = "errors/test_zero_division4.py" -asr = true - -[[test]] -filename = "errors/test_len1.py" -asr = true - -[[test]] -filename = "errors/test_return1.py" -asr = true - -[[test]] -filename = "errors/test_return2.py" -asr = true - -[[test]] -filename = "errors/test_dict2.py" -asr = true - -[[test]] -filename = "errors/test_dict3.py" -asr = true - -[[test]] -filename = "errors/test_dict4.py" -asr = true - -[[test]] -filename = "errors/test_dict5.py" -asr = true - -[[test]] -filename = "errors/test_dict6.py" -asr = true - -[[test]] -filename = "errors/test_dict7.py" -asr = true - -[[test]] -filename = "errors/test_func_args.py" -asr = true - -[[test]] -filename = "errors/test_str_to_int.py" -asr = true - -[[test]] -filename = "errors/test_bitwise_on_float.py" -asr = true - -[[test]] -filename = "errors/test_bitwise_on_complex.py" -asr = true - -[[test]] -filename = "errors/test_print1.py" -asr = true - -[[test]] -filename = "errors/test_print2.py" -asr = true - -[[test]] -filename = "errors/test_pointer_types.py" -asr = true - -[[test]] -filename = "errors/test_unsupported_type.py" -asr = true - -[[test]] -filename = "errors/test_int_semantic_error.py" -asr = true - -[[test]] -filename = "errors/test_float_semantic_error.py" -asr = true - -[[test]] -filename = "errors/generics_error_01.py" -asr = true - -[[test]] -filename = "errors/generics_error_02.py" -asr = true - -[[test]] -filename = "errors/generics_error_03.py" -asr = true - -[[test]] -filename = "errors/test_str_capitalize.py" -asr = true - -[[test]] -filename = "errors/test_tuple1.py" -asr = true - -[[test]] -filename = "errors/test_tuple2.py" -asr = true - -[[test]] -filename = "errors/test_tuple3.py" -asr = true - -[[test]] -filename = "errors/test_for2.py" -asr = true - -[[test]] -filename = "errors/test_import_01.py" -asr = true - -[[test]] -filename = "errors/test_import_02.py" -asr = true - -[[test]] -filename = "errors/type_mismatch.py" -asr = true - -[[test]] -filename = "errors/test_type_mismatch_01.py" -asr = true - -# tests/tokens/errors - -[[test]] -filename = "tokens/errors/paren1.py" -tokens = true - -[[test]] -filename = "tokens/errors/paren2.py" -tokens = true - -[[test]] -filename = "tokens/errors/paren3.py" -tokens = true - -[[test]] -filename = "tokens/errors/paren4.py" -tokens = true - -[[test]] -filename = "tokens/errors/indent1.py" -tokens = true - -[[test]] -filename = "tokens/errors/indent2.py" -tokens = true - -[[test]] -filename = "tokens/errors/indent3.py" -tokens = true - -[[test]] -filename = "errors/test_literal.py" -tokens = true - -[[test]] -filename = "errors/kwargs_01_error.py" -asr = true - -[[test]] -filename = "errors/kwargs_02_error.py" -asr = true - -[[test]] -filename = "errors/kwargs_03_error.py" -asr = true - -[[test]] -filename = "errors/enum_01.py" -asr = true - -[[test]] -filename = "errors/enum_02.py" -asr = true - -[[test]] -filename = "errors/loop_01.py" -asr = true - -[[test]] -filename = "errors/loop_02.py" -asr = true - -[[test]] -filename = "errors/loop_03.py" -asr = true - -[[test]] -filename = "errors/test_logical_compare_01.py" -asr = true - -[[test]] -filename = "errors/bindc_01.py" -asr = true - -[[test]] -filename = "errors/bindc_02.py" -asr = true - -[[test]] -filename = "errors/bindc_03.py" -asr = true - -[[test]] -filename = "errors/bindc_04.py" -asr = true - -[[test]] -filename = "errors/bindc_10e.py" -asr = true - -[[test]] -filename = "errors/cptr_01.py" -asr = true - -[[test]] -filename = "errors/func_01.py" -asr = true - -[[test]] -filename = "errors/func_02.py" -asr = true - -[[test]] -filename = "errors/func_03.py" -asr = true - -[[test]] -filename = "errors/func_04.py" -asr = true - -[[test]] -filename = "errors/func_05.py" -asr = true - -[[test]] -filename = "errors/func_06.py" -asr = true - -[[test]] -filename = "errors/func_07.py" -asr = true - -[[test]] -filename = "errors/func_08.py" -asr = true - -[[test]] -filename = "errors/unsigned_01.py" -asr = true - -[[test]] -filename = "errors/unsigned_02.py" -asr = true - -[[test]] -filename = "errors/unsigned_03.py" -asr = true - -[[test]] -filename = "errors/unsigned_04.py" -asr = true - -[[test]] -filename = "errors/prefix_string_01.py" -ast = true - -[[test]] -filename = "errors/prefix_string_02.py" -ast = true - -# tests/runtime_errors -[[test]] -filename = "runtime_errors/test_list_01.py" -run = true - -[[test]] -filename = "runtime_errors/test_list_02.py" -run = true - -[[test]] -filename = "runtime_errors/test_str_01.py" -run = true - -[[test]] -filename = "runtime_errors/test_str_02.py" -run = true [[test]] filename = "runtime_errors/test_assert_01.py" @@ -1451,31 +18,3 @@ run_with_dbg = true [[test]] filename = "runtime_errors/test_raise_01.py" run_with_dbg = true - -[[test]] -filename = "errors/test_optional.py" -asr = true - -[[test]] -filename = "errors/def_func_01.py" -asr = true - -[[test]] -filename = "errors/def_func_02.py" -asr = true - -[[test]] -filename = "errors/def_func_03.py" -asr = true - -[[test]] -filename = "errors/def_func_04.py" -asr = true - -[[test]] -filename = "errors/def_func_05.py" -asr = true - -[[test]] -filename = "errors/def_func_06.py" -asr = true \ No newline at end of file From 41fb21b3127d3ab24fd3f0a60a7f1e0e41739d6a Mon Sep 17 00:00:00 2001 From: Ubaid Shaikh Date: Sat, 22 Feb 2025 06:45:14 +0530 Subject: [PATCH 02/11] Always run all tests --- .github/workflows/debug_tests.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/debug_tests.yml b/.github/workflows/debug_tests.yml index 9b19c2081a..9002fffe3a 100644 --- a/.github/workflows/debug_tests.yml +++ b/.github/workflows/debug_tests.yml @@ -71,12 +71,22 @@ jobs: cmake --build . -j16 --target install - - name: Run Tests + - name: Run Ctest + if: Always() shell: bash -e -l {0} run: | ctest --rerun-failed --output-on-failure + + - name: Run Reference Tests + if: Always() + shell: bash -e -l {0} + run: | ./run_tests.py -s + - name: Run Integration Tests + if: Always() + shell: bash -e -l {0} + run: | cd integration_tests ./run_tests.py -b llvm ./run_tests.py -b llvm -f From e3a215e7b58cbf66615efa23e9e3b343a7abf326 Mon Sep 17 00:00:00 2001 From: Ubaid Shaikh Date: Sat, 22 Feb 2025 06:47:15 +0530 Subject: [PATCH 03/11] Use exact same command to build --- .github/workflows/debug_tests.yml | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/.github/workflows/debug_tests.yml b/.github/workflows/debug_tests.yml index 9002fffe3a..0b0b01cae8 100644 --- a/.github/workflows/debug_tests.yml +++ b/.github/workflows/debug_tests.yml @@ -57,17 +57,27 @@ jobs: echo "=== Python Dependencies ===" pip list - - name: Build Release + - uses: hendrikmuhs/ccache-action@main + with: + variant: sccache + key: ${{ github.job }}-ubuntu + + - name: Build Linux shell: bash -e -l {0} run: | ./build0.sh + export CXXFLAGS="-Werror" cmake . -GNinja \ - -DCMAKE_BUILD_TYPE=Release \ - -DWITH_LLVM=yes \ - -DLFORTRAN_BUILD_ALL=yes \ - -DWITH_STACKTRACE=no \ - -DCMAKE_PREFIX_PATH="$CONDA_PREFIX" \ - -DCMAKE_INSTALL_PREFIX=`pwd`/inst + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_FLAGS_RELEASE="-Wall -Wextra -O3 -funroll-loops -DNDEBUG" \ + -DWITH_LLVM=yes \ + -DLFORTRAN_BUILD_ALL=yes \ + -DWITH_STACKTRACE=no \ + -DWITH_RUNTIME_STACKTRACE=yes \ + -DCMAKE_PREFIX_PATH="$CONDA_PREFIX" \ + -DCMAKE_INSTALL_PREFIX=`pwd`/inst \ + -DCMAKE_C_COMPILER_LAUNCHER=sccache \ + -DCMAKE_CXX_COMPILER_LAUNCHER=sccache cmake --build . -j16 --target install From 284aad0e8b15ded0127faeaae5bde2d62c35b6f8 Mon Sep 17 00:00:00 2001 From: Ubaid Shaikh Date: Sat, 22 Feb 2025 06:51:18 +0530 Subject: [PATCH 04/11] fix --- .github/workflows/debug_tests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/debug_tests.yml b/.github/workflows/debug_tests.yml index 0b0b01cae8..ec1571f123 100644 --- a/.github/workflows/debug_tests.yml +++ b/.github/workflows/debug_tests.yml @@ -57,10 +57,10 @@ jobs: echo "=== Python Dependencies ===" pip list - - uses: hendrikmuhs/ccache-action@main - with: - variant: sccache - key: ${{ github.job }}-ubuntu + - uses: hendrikmuhs/ccache-action@main + with: + variant: sccache + key: ${{ github.job }}-ubuntu - name: Build Linux shell: bash -e -l {0} From 86d7c7e933299d17764a9634d233a98c2befd346 Mon Sep 17 00:00:00 2001 From: Ubaid Shaikh Date: Sat, 22 Feb 2025 06:55:08 +0530 Subject: [PATCH 05/11] Initialize variables --- src/libasr/diagnostics.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libasr/diagnostics.h b/src/libasr/diagnostics.h index 002e66216f..da727283d3 100644 --- a/src/libasr/diagnostics.h +++ b/src/libasr/diagnostics.h @@ -23,7 +23,8 @@ struct Span { // Lines of source code from first_line to last_line std::vector source_code; - Span(const Location &loc) : loc{loc} {} + Span(const Location &loc) : loc{loc}, first_line{0}, first_column{0}, + last_line{0}, last_column{0}, filename{""}, source_code{""} {} }; /* From bd200669822ee8d5fb0f1cc09a4c128d6f58f42b Mon Sep 17 00:00:00 2001 From: Ubaid Shaikh Date: Sat, 22 Feb 2025 07:06:06 +0530 Subject: [PATCH 06/11] Add new workflow --- .../debug_tests_pinned_compilers.yml | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 .github/workflows/debug_tests_pinned_compilers.yml diff --git a/.github/workflows/debug_tests_pinned_compilers.yml b/.github/workflows/debug_tests_pinned_compilers.yml new file mode 100644 index 0000000000..37e797496a --- /dev/null +++ b/.github/workflows/debug_tests_pinned_compilers.yml @@ -0,0 +1,108 @@ +name: Debug Tests (Pinned Compilers) + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + debug_tests_pinned: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Install specific compiler versions + run: | + sudo apt-get update + sudo apt-get install -y gcc-11 g++-11 clang-14 + + - uses: mamba-org/setup-micromamba@v1 + with: + environment-file: ci/environment.yml + create-args: >- + python=3.10 + bison=3.4 + + - name: Print Debug Information + shell: bash -e -l {0} + run: | + echo "=== System Information ===" + uname -a + free -h + df -h + + echo "=== Micromamba Information ===" + micromamba --version + micromamba info + + echo "=== Compiler Versions ===" + gcc-11 --version + g++-11 --version + clang-14 --version + python --version + cmake --version + ninja --version + + echo "=== Compiler Locations ===" + which gcc-11 + which g++-11 + which clang-14 + which python + which cmake + which ninja + + echo "=== Environment ===" + env | sort + + echo "=== Python Dependencies ===" + pip list + + - uses: hendrikmuhs/ccache-action@main + with: + variant: sccache + key: ${{ github.job }}-ubuntu + + - name: Build Linux + shell: bash -e -l {0} + run: | + ./build0.sh + export CXXFLAGS="-Werror" + export CC=gcc-11 + export CXX=g++-11 + cmake . -GNinja \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_FLAGS_RELEASE="-Wall -Wextra -O3 -funroll-loops -DNDEBUG" \ + -DWITH_LLVM=yes \ + -DLFORTRAN_BUILD_ALL=yes \ + -DWITH_STACKTRACE=no \ + -DWITH_RUNTIME_STACKTRACE=yes \ + -DCMAKE_PREFIX_PATH="$CONDA_PREFIX" \ + -DCMAKE_INSTALL_PREFIX=`pwd`/inst \ + -DCMAKE_C_COMPILER_LAUNCHER=sccache \ + -DCMAKE_CXX_COMPILER_LAUNCHER=sccache + + cmake --build . -j16 --target install + + # Rest of the steps remain the same + - name: Run Ctest + if: Always() + shell: bash -e -l {0} + run: | + ctest --rerun-failed --output-on-failure + + - name: Run Reference Tests + if: Always() + shell: bash -e -l {0} + run: | + ./run_tests.py -s + + - name: Run Integration Tests + if: Always() + shell: bash -e -l {0} + run: | + cd integration_tests + ./run_tests.py -b llvm + ./run_tests.py -b llvm -f From a1d90c1824fbf45626a6b3d59c8d4eccb8698f81 Mon Sep 17 00:00:00 2001 From: Ubaid Shaikh Date: Sat, 22 Feb 2025 07:09:37 +0530 Subject: [PATCH 07/11] Add debug flags --- .github/workflows/debug_tests.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/debug_tests.yml b/.github/workflows/debug_tests.yml index ec1571f123..e2ca679f09 100644 --- a/.github/workflows/debug_tests.yml +++ b/.github/workflows/debug_tests.yml @@ -66,10 +66,12 @@ jobs: shell: bash -e -l {0} run: | ./build0.sh - export CXXFLAGS="-Werror" + export CXXFLAGS="-Werror -DDEBUG_ERROR_RENDERING" + export LPYTHON_TEST_DEBUG=1 + export DOCTEST_CONFIG_SUPER_QUIET=1 cmake . -GNinja \ -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_CXX_FLAGS_RELEASE="-Wall -Wextra -O3 -funroll-loops -DNDEBUG" \ + -DCMAKE_CXX_FLAGS_RELEASE="-Wall -Wextra -O3 -funroll-loops -DNDEBUG -DDEBUG_ERROR_RENDERING" \ -DWITH_LLVM=yes \ -DLFORTRAN_BUILD_ALL=yes \ -DWITH_STACKTRACE=no \ @@ -85,7 +87,15 @@ jobs: if: Always() shell: bash -e -l {0} run: | - ctest --rerun-failed --output-on-failure + # Print test file contents for debugging + echo "=== Test Environment ===" + ls -la src/lpython/tests/ + cat src/lpython/tests/test_error_rendering.cpp + + # Run tests with more verbosity + export LPYTHON_TEST_DEBUG=1 + export DOCTEST_CONFIG_SUPER_QUIET=1 + CTEST_OUTPUT_ON_FAILURE=1 ctest -V --rerun-failed --output-on-failure - name: Run Reference Tests if: Always() From ed075e112f0b84a292c3a9cebf1dcd322557738e Mon Sep 17 00:00:00 2001 From: Ubaid Shaikh Date: Sat, 22 Feb 2025 07:13:22 +0530 Subject: [PATCH 08/11] Remove CXXFLAGS --- .github/workflows/debug_tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/debug_tests.yml b/.github/workflows/debug_tests.yml index e2ca679f09..2565930be0 100644 --- a/.github/workflows/debug_tests.yml +++ b/.github/workflows/debug_tests.yml @@ -66,7 +66,6 @@ jobs: shell: bash -e -l {0} run: | ./build0.sh - export CXXFLAGS="-Werror -DDEBUG_ERROR_RENDERING" export LPYTHON_TEST_DEBUG=1 export DOCTEST_CONFIG_SUPER_QUIET=1 cmake . -GNinja \ From bd2af58f247436ef05b6077c625ea1d4a7ce3c14 Mon Sep 17 00:00:00 2001 From: Ubaid Shaikh Date: Sat, 22 Feb 2025 07:19:41 +0530 Subject: [PATCH 09/11] Try without flags --- .github/workflows/debug_tests_pinned_compilers.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/debug_tests_pinned_compilers.yml b/.github/workflows/debug_tests_pinned_compilers.yml index 37e797496a..4f648436a6 100644 --- a/.github/workflows/debug_tests_pinned_compilers.yml +++ b/.github/workflows/debug_tests_pinned_compilers.yml @@ -69,9 +69,6 @@ jobs: shell: bash -e -l {0} run: | ./build0.sh - export CXXFLAGS="-Werror" - export CC=gcc-11 - export CXX=g++-11 cmake . -GNinja \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_CXX_FLAGS_RELEASE="-Wall -Wextra -O3 -funroll-loops -DNDEBUG" \ From ab0b18a437801fe78c1f3bdc44dd74789c9f6fbf Mon Sep 17 00:00:00 2001 From: Ubaid Shaikh Date: Sat, 22 Feb 2025 07:22:07 +0530 Subject: [PATCH 10/11] Fix code --- src/libasr/diagnostics.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libasr/diagnostics.h b/src/libasr/diagnostics.h index da727283d3..471df923e1 100644 --- a/src/libasr/diagnostics.h +++ b/src/libasr/diagnostics.h @@ -23,8 +23,7 @@ struct Span { // Lines of source code from first_line to last_line std::vector source_code; - Span(const Location &loc) : loc{loc}, first_line{0}, first_column{0}, - last_line{0}, last_column{0}, filename{""}, source_code{""} {} + Span(const Location &loc) : loc{loc}, first_line{0}, first_column{0}, last_line{0}, last_column{0} {} }; /* From c4362d07cc747dd19165c0a1cf80571b067f8746 Mon Sep 17 00:00:00 2001 From: Ubaid Shaikh Date: Sat, 22 Feb 2025 08:14:17 +0530 Subject: [PATCH 11/11] Test previous code --- .github/workflows/debug_tests.yml | 12 +----------- .github/workflows/debug_tests_pinned_compilers.yml | 2 ++ 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/.github/workflows/debug_tests.yml b/.github/workflows/debug_tests.yml index 2565930be0..33b4b8e127 100644 --- a/.github/workflows/debug_tests.yml +++ b/.github/workflows/debug_tests.yml @@ -66,8 +66,6 @@ jobs: shell: bash -e -l {0} run: | ./build0.sh - export LPYTHON_TEST_DEBUG=1 - export DOCTEST_CONFIG_SUPER_QUIET=1 cmake . -GNinja \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_CXX_FLAGS_RELEASE="-Wall -Wextra -O3 -funroll-loops -DNDEBUG -DDEBUG_ERROR_RENDERING" \ @@ -86,15 +84,7 @@ jobs: if: Always() shell: bash -e -l {0} run: | - # Print test file contents for debugging - echo "=== Test Environment ===" - ls -la src/lpython/tests/ - cat src/lpython/tests/test_error_rendering.cpp - - # Run tests with more verbosity - export LPYTHON_TEST_DEBUG=1 - export DOCTEST_CONFIG_SUPER_QUIET=1 - CTEST_OUTPUT_ON_FAILURE=1 ctest -V --rerun-failed --output-on-failure + ctest --rerun-failed --output-on-failure - name: Run Reference Tests if: Always() diff --git a/.github/workflows/debug_tests_pinned_compilers.yml b/.github/workflows/debug_tests_pinned_compilers.yml index 4f648436a6..20e719dca8 100644 --- a/.github/workflows/debug_tests_pinned_compilers.yml +++ b/.github/workflows/debug_tests_pinned_compilers.yml @@ -69,6 +69,8 @@ jobs: shell: bash -e -l {0} run: | ./build0.sh + export CC=gcc-11 + export CXX=g++-11 cmake . -GNinja \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_CXX_FLAGS_RELEASE="-Wall -Wextra -O3 -funroll-loops -DNDEBUG" \