Skip to content

Commit

Permalink
Xtensa: fix python binding
Browse files Browse the repository at this point in the history
  • Loading branch information
imbillow committed Jun 26, 2024
1 parent d785c75 commit 6b8e7bc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -781,9 +781,11 @@ if(CAPSTONE_BUILD_TESTS)
if (${TBIN} IN_LIST TESTS_SKIP_CMP)
add_test(NAME "capstone_${TBIN}" COMMAND ${TBIN})
else ()
set(TST_PY ../bindings/python/${TBIN}.py)
set(TST_PY ${CMAKE_SOURCE_DIR}/bindings/python/${TBIN}.py)
set(TST_EXE ${CMAKE_BINARY_DIR}/${TBIN})
if(EXISTS ${TST_PY})
add_test(NAME "capstone_${TBIN}" COMMAND python3 ../bindings/stdout_cmp.py -f1 ./${TBIN} -f2 python3 ${TST_PY})
add_test(NAME "capstone_${TBIN}"
COMMAND python3 ${CMAKE_SOURCE_DIR}/bindings/stdout_cmp.py -f1 ${TST_EXE} -f2 python3 ${TST_PY})
else()
MESSAGE("TEST ${TST_PY} does not exist. Skip.")
endif()
Expand Down
5 changes: 3 additions & 2 deletions bindings/python/capstone/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,9 @@
CS_ARCH_TRICORE = 17
CS_ARCH_ALPHA = 18
CS_ARCH_HPPA = 19
CS_ARCH_XTENSA = 20
CS_ARCH_MAX = 20
CS_ARCH_LOONGARCH = 20
CS_ARCH_XTENSA = 21
CS_ARCH_MAX = 22
CS_ARCH_ALL = 0xFFFF

# disasm mode
Expand Down

0 comments on commit 6b8e7bc

Please sign in to comment.