Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modern testing #2384

Closed
wants to merge 317 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
317 commits
Select commit Hold shift + click to select a range
c689ac6
Improve link management
Rot127 Jul 11, 2024
fc9de29
Improve logging
Rot127 Jul 11, 2024
f91de28
Fix: Empty options were added to files
Rot127 Jul 12, 2024
a7b121c
Fix append str logic
Rot127 Jul 12, 2024
060afde
expected is always on the right.
Rot127 Jul 12, 2024
3eaaacd
Prefix for log message
Rot127 Jul 12, 2024
43cf17d
Reintroduce normalizing negaive numbers to bits.
Rot127 Jul 12, 2024
e673945
Make all ARM instructions part of a single test.
Rot127 Jul 12, 2024
6c4e10d
Add helper script to move tests to yaml format
Rot127 Jul 12, 2024
7c598df
Add TriCore yaml tests
Rot127 Jul 12, 2024
edb9640
Add BPF yaml tests
Rot127 Jul 12, 2024
c4d8cf9
Convert tests to single instruction one test pattern.
Rot127 Jul 12, 2024
920cc92
Add Sparc yaml tests
Rot127 Jul 12, 2024
cdda2dc
Add Mips MC tests
Rot127 Jul 12, 2024
4b9774b
Add SystemZ yaml MC tests
Rot127 Jul 12, 2024
3d7c4ea
Fix replace_hex to also take upper case hex values.
Rot127 Jul 12, 2024
76a7f65
Add x86 yaml MC tests
Rot127 Jul 12, 2024
051e23f
Remove empty file
Rot127 Jul 12, 2024
77df41a
Fix typo in register identifier to print correct number.
Rot127 Jul 14, 2024
0de838b
Fix missing printing of immediate value for SVEPatterns
Rot127 Jul 14, 2024
0a46474
Fix Imm8Opt.
Rot127 Jul 14, 2024
515bf3a
Handle AArch64_OP_GROUP_TypedVectorList_0_0:
Rot127 Jul 14, 2024
13ec4c2
Normalize space usage in asm text.
Rot127 Jul 20, 2024
db532b7
Add toggle for unified and separated test cases.
Rot127 Jul 20, 2024
9a4868f
Add +all mattr to all llvm-mc commands of AArch64
Rot127 Jul 20, 2024
de97c09
Update AArch64 tests files
Rot127 Jul 20, 2024
8b2f5f7
Set all strings to lower case
Rot127 Jul 20, 2024
e20da21
Implement skip mechanic.
Rot127 Jul 20, 2024
e808837
Print expressions as simple immediate values for now.
Rot127 Jul 20, 2024
5547136
Skip tests which require expressions
Rot127 Jul 20, 2024
9ed1016
Correct two tests
Rot127 Jul 20, 2024
4bde8a9
Reset MCInst operand counter after failed decode.
Rot127 Jul 20, 2024
c983cbf
Normalize spaces also in expected asm strings.
Rot127 Jul 20, 2024
86f48f9
Don't count skipped tests as successful.
Rot127 Jul 20, 2024
4fa9f7d
Fix test file, one line to many.
Rot127 Jul 20, 2024
333487f
Remove old MC test files.
Rot127 Jul 20, 2024
4f4c953
Add cstest integration tests to CI
Rot127 Jul 21, 2024
aeb5ade
Add doc string
Rot127 Jul 21, 2024
5edd38f
Remove old CI workflow for cstest
Rot127 Jul 21, 2024
3ed609f
Add diet-build option to CI again.
Rot127 Jul 21, 2024
ff046e6
Use strncat instead of strcat
Rot127 Jul 21, 2024
247843d
Remove hard coded path to llvm-lit, it is installed by pip
Rot127 Jul 21, 2024
0c2d6a9
Add detail test for Arch64.
Rot127 Jul 22, 2024
cc5e454
Add basic details to cstest of AArch64
Rot127 Jul 22, 2024
bc6ce30
Add untested binary search for enum to value mapping table.
Rot127 Jul 23, 2024
339eb3e
Use strings n the yaml files to describe most properties.
Rot127 Jul 23, 2024
ac506e6
Add include guards
Rot127 Jul 23, 2024
a5bcf71
Add a tbool type
Rot127 Jul 23, 2024
8755554
Add two macros for tbool and uint8 comparision.
Rot127 Jul 23, 2024
fc20477
Search for multiple names of the libyaml lib
Rot127 Jul 23, 2024
b96ba08
Don't hard-code return value in macros
Rot127 Jul 23, 2024
f4105a6
Make tbool an int32_t
Rot127 Jul 23, 2024
8a3db1b
Fix tbool bool comparision
Rot127 Jul 23, 2024
caf7667
Rename test_mappings -> test_mapping
Rot127 Jul 23, 2024
ff1450f
Implement comparision of aarch64 details
Rot127 Jul 23, 2024
245c75d
Implement schemas
Rot127 Jul 23, 2024
6917c61
Fix reachable assert if files is NULL
Rot127 Jul 23, 2024
8afa4c1
Fix some names of fields
Rot127 Jul 23, 2024
3a33f0c
Implement rest of detail checking.
Rot127 Jul 23, 2024
33c6722
Fix names
Rot127 Jul 23, 2024
5d30ed0
Add implementation of test_detail
Rot127 Jul 23, 2024
8b289e0
Fix mem leaks
Rot127 Jul 23, 2024
f347b86
Add check for expected data
Rot127 Jul 23, 2024
0320eed
Fix table and broken binary search
Rot127 Jul 24, 2024
73cfc86
Formatting
Rot127 Jul 24, 2024
17fee61
Remove dependency on thread
Rot127 Jul 24, 2024
9a5b567
Remove unecessary imports
Rot127 Jul 24, 2024
bd79197
Use correct flag
Rot127 Jul 24, 2024
bb14c4d
Add detail, mc, cstest unit and integration tests to CMakeLists.txt
Rot127 Jul 24, 2024
558990b
Use ctest in CI
Rot127 Jul 24, 2024
b34864d
Add compatibility header test to CMake and CI
Rot127 Jul 24, 2024
3287a7b
Build libcstest staticly
Rot127 Jul 24, 2024
b7ac248
Move cmake logic of cstest to cstest dir
Rot127 Jul 24, 2024
a6ad480
Fix ctest in CI
Rot127 Jul 24, 2024
9c772fb
Move COMPILE.TXT to COMPILE_MAKE.TXT and mention cmake as default.
Rot127 Jul 24, 2024
7fa4cea
Fix: invert condition
Rot127 Jul 24, 2024
87bf9d9
Cast values before comparing them
Rot127 Jul 24, 2024
dc2e4c3
Fix reg group comparision
Rot127 Jul 24, 2024
2b10b9d
Add some NULL checks
Rot127 Jul 24, 2024
6a4f6b1
Add prefix for hex numbers
Rot127 Jul 24, 2024
1b0032b
Add flag if vector_indices are set
Rot127 Jul 24, 2024
da5b592
More testing and out of bounds checks for binary search of strings.
Rot127 Jul 24, 2024
b685289
Fix and add details for test file
Rot127 Jul 24, 2024
3dd80d9
Fix and add several ids to the map
Rot127 Jul 24, 2024
76beb9d
Move binary search of enum tables to Mapping
Rot127 Jul 24, 2024
06c8971
Add ARM test_arm details
Rot127 Jul 25, 2024
ce8242b
Implement detail testing for ARM.
Rot127 Jul 25, 2024
37964be
Only enable CS_OPT_NO_BRANCH_OFFSET for ARM and PPC
Rot127 Jul 25, 2024
b1f4b31
Fix ARM details tests
Rot127 Aug 3, 2024
3636589
Add PPC detail tests
Rot127 Aug 3, 2024
21f3a3d
Run clang-format
Rot127 Aug 3, 2024
bda9806
Add forgotten PPC test files
Rot127 Aug 4, 2024
32e9c03
Add TriCore detail tests
Rot127 Aug 4, 2024
d401271
Add Alpha tests
Rot127 Aug 4, 2024
d0251a8
Add hppa tests
Rot127 Aug 4, 2024
a6fd674
Move BPF tests
Rot127 Aug 4, 2024
b4e555d
Add Xcore tests
Rot127 Aug 4, 2024
9972fdb
Move Systemz tests
Rot127 Aug 4, 2024
2e767c5
Add Sparc test
Rot127 Aug 4, 2024
daed1b2
Move SH tests
Rot127 Aug 4, 2024
4e8358a
Move Mips tests
Rot127 Aug 4, 2024
353720e
Move RiscV tests
Rot127 Aug 4, 2024
8629453
Move m680x tests
Rot127 Aug 5, 2024
e122ced
Allocate only for pointers
Rot127 Aug 5, 2024
96a5050
Add TMS320c64x tests.
Rot127 Aug 5, 2024
a5f3b55
Run clang-format
Rot127 Aug 5, 2024
1c645e9
Move MOS65xx tests
Rot127 Aug 5, 2024
3517783
Move EVM tests
Rot127 Aug 5, 2024
4640a64
Add skipdata test
Rot127 Aug 5, 2024
446203f
Move LoongArch tests
Rot127 Aug 5, 2024
929efca
Move WASM tests
Rot127 Aug 6, 2024
aaa6546
Add x86 tests
Rot127 Aug 6, 2024
6e5d765
Fix M68K, masks on immediate values were not always applied.
Rot127 Aug 6, 2024
cd049ce
Add M68K_reg_access
Rot127 Aug 6, 2024
17b4d01
Move M68K tests
Rot127 Aug 6, 2024
e9f2166
Allow to test all read/writes and only impliciti ons separately.
Rot127 Aug 8, 2024
5312e63
Add common detail tests
Rot127 Aug 8, 2024
3878999
Remove legacy detail tests and configure the old integration tests ov…
Rot127 Aug 8, 2024
fc79715
Enable CS_OPT_NO_BRANCH_OFFSET for AArch64 by default.
Rot127 Aug 8, 2024
9b923e4
Fix shadowed i index
Rot127 Aug 8, 2024
23dd21f
Add cstest to Windows
Rot127 Aug 8, 2024
7677d68
Remove legacy tests from Makefile
Rot127 Aug 8, 2024
7cf8116
Remove old copies of libraries
Rot127 Aug 8, 2024
a4ab602
Fix PPC tests
Rot127 Aug 8, 2024
ecb5bb2
Fix Windows CI
Rot127 Aug 8, 2024
52458c7
Add name field to test input
Rot127 Aug 11, 2024
a941e53
Add incomplete move issue files.
Rot127 Aug 11, 2024
23f8e2a
Rename schema
Rot127 Aug 12, 2024
ad3b2ea
Add AArch64 SME and predicate operands
Rot127 Aug 12, 2024
c30ba3b
Fix NULL dereference
Rot127 Aug 12, 2024
83bee1f
Fix mem leak
Rot127 Aug 12, 2024
2b69c93
Fix sparc detail comparison. Allow for 0 epxected ops
Rot127 Aug 12, 2024
caa94f9
Add 0 checks
Rot127 Aug 12, 2024
c89b5b8
Add asserts to check if set flags are consistent
Rot127 Aug 12, 2024
78c1dac
Fix: Adding duplicate FP op.
Rot127 Aug 12, 2024
d4e5281
Move issues.cs
Rot127 Aug 12, 2024
856a1f4
Move last detail tests
Rot127 Aug 12, 2024
9f8fb61
Make the name as input optional
Rot127 Aug 12, 2024
7fc10fd
Add 0 check
Rot127 Aug 12, 2024
1246d85
Remove unused file.
Rot127 Aug 12, 2024
a54c813
Add missing set flags
Rot127 Aug 12, 2024
c6ec67c
Fix some set flag logic
Rot127 Aug 12, 2024
1d25947
Remove unused files
Rot127 Aug 12, 2024
edc1092
Always use cmake to build the Python bindings.
Rot127 Aug 12, 2024
501c2e9
Update BUILDING.txt with new build information
Rot127 Aug 13, 2024
99422e2
Add basic py_cstest
Rot127 Aug 13, 2024
13a79c6
Allow to use the cstest integration tests with any cstest implementat…
Rot127 Aug 16, 2024
b384ece
Remove unused code.
Rot127 Aug 16, 2024
6437caa
Implement minimal workable testing state and add test with integratio…
Rot127 Aug 16, 2024
edec762
Fix integration test
Rot127 Aug 16, 2024
0af3e5d
Install pyyaml prerequisite.
Rot127 Aug 16, 2024
b294376
Make py_cstest a proper package to not run into weird import problems
Rot127 Aug 16, 2024
cefde97
Typing support for Python3.8
Rot127 Aug 16, 2024
005e666
Fix some warnings
Rot127 Aug 17, 2024
4d8439e
Fix option selection from dict.
Rot127 Aug 17, 2024
7b7b372
Handle mode options in TRICORE_option
Rot127 Aug 17, 2024
b8de0aa
Some small fixes
Rot127 Aug 17, 2024
73bb0ce
Update Python constants
Rot127 Aug 17, 2024
b0112ee
Add LoongArch to the Python bindings
Rot127 Aug 17, 2024
2fa121b
Track and list all failing files.
Rot127 Aug 17, 2024
c385717
Implement CS_MODE handling
Rot127 Aug 17, 2024
898a39e
Add missing LoongArch modes
Rot127 Aug 17, 2024
a48b896
Use py_cstest logger
Rot127 Aug 17, 2024
846ea0d
Fix decimal numer replacement
Rot127 Aug 17, 2024
a18bc8f
Fix asm_text comparison
Rot127 Aug 17, 2024
fbdb75c
Add detail testing file
Rot127 Aug 17, 2024
4443479
Move readme
Rot127 Aug 18, 2024
9ac2da9
Add all tests to the workflow
Rot127 Aug 18, 2024
8dfeae2
Fix loongarch bindings
Rot127 Aug 18, 2024
e3ea735
Set internal flags if certain options are set.
Rot127 Aug 18, 2024
fd93986
Small fixes and check reg read/writes
Rot127 Aug 18, 2024
e4b4f42
More LoongArch binding fixups
Rot127 Aug 18, 2024
2de7386
Implement AArch64 detail testing
Rot127 Aug 18, 2024
430211c
Add missing properties, error messages and correct constant.
Rot127 Aug 18, 2024
1f71b16
Set correct enum name.
Rot127 Aug 18, 2024
5c9e94e
Remove dead code
Rot127 Aug 18, 2024
eaef91f
Fix const generator. First values in enums are not initialized as 0
Rot127 Aug 18, 2024
094ff19
More checks for compare.py
Rot127 Aug 18, 2024
33d64d7
Fix name of immediate range member
Rot127 Aug 18, 2024
6d548a8
Fix reg name list and group list comparison
Rot127 Aug 18, 2024
830060d
General fixup of detail testing
Rot127 Aug 18, 2024
5d5a3d9
Formatting
Rot127 Aug 18, 2024
ce15717
Fix conddition
Rot127 Aug 18, 2024
e4ef7e9
Fix: clone fields and free them
Rot127 Aug 18, 2024
7c9d1f2
Fix ARM test
Rot127 Aug 18, 2024
483b1bb
Fix inconsistencies between C and Python bindings.
Rot127 Aug 18, 2024
3f70223
Add ARM details
Rot127 Aug 18, 2024
4b77c46
Fix twos complement
Rot127 Aug 19, 2024
4351db8
Fix hex number replacement
Rot127 Aug 19, 2024
ea4d338
Ensure to check all non operand fields
Rot127 Aug 19, 2024
1439add
Add 0 value of prefix for cstest
Rot127 Aug 19, 2024
3ada30b
Handle ARM_OP_SYSM
Rot127 Aug 19, 2024
886cbce
Handle x86 details
Rot127 Aug 19, 2024
a056c13
Ensure regs are always strings
Rot127 Aug 19, 2024
ab9045d
Make PPC formats available through Python bindings.
Rot127 Aug 19, 2024
8d14e27
Print stac trace on exception
Rot127 Aug 19, 2024
ee31bc4
Handle PPC details
Rot127 Aug 19, 2024
92431cc
Initialze mode and options separately
Rot127 Aug 19, 2024
65191fd
Handle M680x details
Rot127 Aug 19, 2024
ceeb3b3
Ensure strings are not parsed as numbers
Rot127 Aug 20, 2024
c2c31b9
Remove not used code
Rot127 Aug 20, 2024
c04330b
Add all other details.
Rot127 Aug 20, 2024
709e4d6
Remove cstest build on Windows for now.
Rot127 Aug 20, 2024
10c3377
Fix mem leak
Rot127 Aug 20, 2024
582eae0
Fix CamelCase id
Rot127 Aug 20, 2024
5872bc6
Add missing type information for operand.
Rot127 Aug 20, 2024
e06a9f2
Always print input parameters as name
Rot127 Aug 20, 2024
51d3dad
Check for opcode and prefix fields before testing them.
Rot127 Aug 20, 2024
91db40e
Fix compatibility header.
Rot127 Aug 20, 2024
f9ffe7e
Add log message when enabling ASAN
Rot127 Aug 21, 2024
9c8bb14
Fix bounds check for strncpy
Rot127 Aug 21, 2024
dd0c5ec
Build debug variants of cmocka and libcyaml if debug is enabled.
Rot127 Aug 21, 2024
47411c5
Add missing END field
Rot127 Aug 21, 2024
e6a0d52
Add coverage option to build
Rot127 Aug 21, 2024
02142fc
Simplify NULL check
Rot127 Aug 21, 2024
04da3fb
Add bounds check in loop
Rot127 Aug 21, 2024
6aafb44
Remove cmake dependency
Rot127 Aug 21, 2024
6efd42c
Quote variable to ensure to compare strings.
Rot127 Aug 21, 2024
fe7282c
Re-add old regression tests for the fuzzer.
Rot127 Aug 22, 2024
bbe3e06
Document usage of suite/MC in readme
Rot127 Aug 22, 2024
6264091
Check for test_corpus build
Rot127 Aug 22, 2024
59ab947
Add workaround for hardcoded paths in OSSFuzz build script
Rot127 Aug 22, 2024
6708340
Add CI test for ubuntu-latest, 22.04, 24.04
Rot127 Aug 22, 2024
8535c70
Set clang-tidy job to use clang-tidy-18, Ubuntu 24.04 and upload arti…
Rot127 Aug 22, 2024
016d409
Also take runlines with disassembly in. And add command line for enco…
Rot127 Aug 22, 2024
f856822
Enable MCUpdater to generate test files for all mode combinations.
Rot127 Aug 23, 2024
a082ab4
Don't fix python to 3.11 and remove some latex docs
Rot127 Aug 23, 2024
dc407b0
Upload clang-tidy artifacts on failure.
Rot127 Aug 23, 2024
fc19afc
Remove checking set fields since it is not necessary.
Rot127 Aug 23, 2024
d8a275e
Bump checkout action version
Rot127 Aug 23, 2024
85d16cc
Create MCUpdater test out dir during runtime
Rot127 Aug 23, 2024
d94beef
Fix clang-tidy warnings.
Rot127 Aug 23, 2024
39e12f1
Bump clang-tidy version to 18 and print version of it to log file.
Rot127 Aug 23, 2024
1318b69
Add missing field check
Rot127 Aug 23, 2024
9fc41ed
Remove egg folder for py_cstest
Rot127 Aug 23, 2024
6b9309e
Attempt to fix va_list warning
Rot127 Aug 23, 2024
8f5a9ec
Install llvm-mc before running MCUpdater tests.
Rot127 Aug 23, 2024
76ecd79
Add two more AArch64 tests
Rot127 Aug 23, 2024
95add28
Remove test_basic (it is covered by the MC tests).
Rot127 Aug 24, 2024
2907871
Handle included and exlcuded files.
Rot127 Aug 24, 2024
8ce393c
Move legacy integration tests into their own dir
Rot127 Aug 24, 2024
665302f
Add unit test dir.
Rot127 Aug 24, 2024
aa0df20
Make cstest integration tests path insensitive
Rot127 Aug 24, 2024
debcf1c
Add CMakeLists.txt for unit test dir
Rot127 Aug 24, 2024
c73f05b
Handle invalid commands without exception
Rot127 Aug 24, 2024
78c3139
Document cstest.
Rot127 Aug 24, 2024
4e4a863
Add missing CMakeLists.txt for unit tests.
Rot127 Aug 24, 2024
6353661
Remove unused Makefile testing
Rot127 Aug 24, 2024
f7e0dd0
Fix build and linking for tests.
Rot127 Aug 24, 2024
d8afcef
Ensure Ubuntu 24.04 runner for Auto-Sync workflow
Rot127 Aug 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
87 changes: 53 additions & 34 deletions .github/workflows/CITest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- "docs/**"
- "ChangeLog"
- "CREDITS.TXT"
- "COMPILE.TXT"
- "COMPILE_MAKE.TXT"
- "COMPILE_MSVC.TXT"
- "COMPILE_CMAKE.TXT"
- "HACK.TXT"
Expand Down Expand Up @@ -34,41 +34,52 @@ jobs:
os: ubuntu-22.04,
arch: x64,
build-system: 'make',
diet-build: 'OFF',
enable-asan: 'OFF'
}
- {
name: 'ubuntu-latest x64 cmake',
os: ubuntu-latest,
arch: x64,
build-system: 'cmake',
diet-build: 'OFF',
enable-asan: 'OFF'
}
- {
name: 'ubuntu-22.04 x64 cmake',
os: ubuntu-22.04,
arch: x64,
build-system: 'cmake',
diet-build: 'OFF',
enable-asan: 'OFF'
}
- {
name: 'ubuntu-22.04 x64 ASAN',
os: ubuntu-latest,
name: 'ubuntu-24.04 x64 ASAN',
os: ubuntu-24.04,
arch: x64,
build-system: 'cmake',
diet-build: 'OFF',
enable-asan: 'ON'
}

steps:
- uses: actions/checkout@v3

- name: prepare
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.config.python-version }}

- name: Prepare fuzzing
run: |
export LD_LIBRARY_PATH=`pwd`/tests/:$LD_LIBRARY_PATH
wget https://github.com/groundx/capstonefuzz/raw/master/corpus/corpus-libFuzzer-capstone_fuzz_disasmnext-latest.zip
unzip -q corpus-libFuzzer-capstone_fuzz_disasmnext-latest.zip -d suite/fuzz
git clone https://git.cryptomilk.org/projects/cmocka.git suite/cstest/cmocka
chmod +x suite/cstest/build_cstest.sh

- name: make
if: startsWith(matrix.config.build-system, 'make')
run: |
./make.sh
make check
sudo make install
cp libcapstone.so.5 libcapstone.so.5.0

- name: cmake
if: startsWith(matrix.config.build-system, 'cmake')
Expand All @@ -82,47 +93,55 @@ jobs:
# build shared library
cmake -DCAPSTONE_INSTALL=1 -DBUILD_SHARED_LIBS=1 -DCMAKE_INSTALL_PREFIX=/usr -DCAPSTONE_BUILD_CSTEST=ON -DENABLE_ASAN=${asan} ..
sudo cmake --build . --config Release --target install
cp libcapstone.* ../
cp libcapstone.* ../tests/
cp test_* ../tests/

- name: Lower number of KASL randomized address bits
run: |
# Work-around ASAN bug https://github.com/google/sanitizers/issues/1716
sudo sysctl vm.mmap_rnd_bits=28

- name: "Compatibility header test build"
if: matrix.config.diet-build == 'OFF'
env:
asan: ${{ matrix.config.enable-asan }}
- name: "Compatibility header test"
if: startsWith(matrix.config.build-system, 'cmake') && matrix.config.diet-build == 'OFF'
run: |
cd "$(git rev-parse --show-toplevel)/suite/auto-sync/c_tests/"
if [ "$asan" = "ON" ]; then
clang -lcapstone -fsanitize=address src/test_arm64_compatibility_header.c -o test_arm64_compatibility_header
else
clang -lcapstone src/test_arm64_compatibility_header.c -o test_arm64_compatibility_header
fi
./test_arm64_compatibility_header
ctest --test-dir build --output-on-failure -R ASCompatibilityHeaderTest

- name: cstool - reaches disassembler engine
run: |
sh suite/run_invalid_cstool.sh

- name: cstest (cmake)
- name: cstest unit tests
if: startsWith(matrix.config.build-system, 'cmake')
run: |
python suite/cstest/cstest_report.py -D -d suite/MC
python suite/cstest/cstest_report.py -D -f suite/cstest/issues.cs
python suite/cstest/cstest_report.py -D -f tests/cs_details/issue.cs
ctest --test-dir build --output-on-failure -R UnitCSTest

- name: cstest (make)
if: startsWith(matrix.config.build-system, 'make')
- name: cstest integration tests
if: startsWith(matrix.config.build-system, 'cmake')
run: |
ctest --test-dir build --output-on-failure -R IntegrationCSTest

- name: cstest MC
if: startsWith(matrix.config.build-system, 'cmake')
run: |
ctest --test-dir build --output-on-failure -R MCTests

- name: cstest details
if: startsWith(matrix.config.build-system, 'cmake')
run: |
ctest --test-dir build --output-on-failure -R DetailTests

- name: cstest issues
if: startsWith(matrix.config.build-system, 'cmake')
run: |
ctest --test-dir build --output-on-failure -R IssueTests

- name: cstest features
if: startsWith(matrix.config.build-system, 'cmake')
run: |
ctest --test-dir build --output-on-failure -R FeaturesTests

- name: Legacy integration tests
if: startsWith(matrix.config.build-system, 'cmake')
run: |
cd suite/cstest && ./build_cstest.sh
python cstest_report.py -D -t build/cstest -d ../MC
python cstest_report.py -D -t build/cstest -f issues.cs
python cstest_report.py -D -t build/cstest -f ../../tests/cs_details/issue.cs
cd ../../
ctest --test-dir build --output-on-failure -R legacy*

Windows:
runs-on: ${{ matrix.config.os }}
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/auto-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
check:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
defaults:
run:
working-directory: suite/auto-sync/
Expand Down Expand Up @@ -63,6 +63,10 @@ jobs:
./src/autosync/ASUpdater.py --ci -d -a PPC -s Translate
./src/autosync/ASUpdater.py --ci -d -a LoongArch -s Translate

- name: Install llvm-mc
run: |
sudo apt install llvm-18

- name: Test Header patcher
run: |
python -m unittest src/autosync/Tests/test_header_patcher.py
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/clang-tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ on:

jobs:
analyze:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

name: clang-tidy
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install clang-tidy
Expand All @@ -26,13 +26,18 @@ jobs:
CC=clang sudo cmake --build . --config Release
cd ..

- name: Install clang-tidy-15
- name: Install clang-tidy-18
run: |
sudo apt install clang-tidy-15
sudo apt install clang-tidy-18

- name: Check for warnings
env:
base_sha: ${{ github.event.pull_request.base.sha }}
head_sha: ${{ github.event.pull_request.head.sha }}
run: |
./run-clang-tidy.sh build

- uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
path: ct-warnings.txt
27 changes: 26 additions & 1 deletion .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,30 @@ jobs:
- name: Build and install capstone
run: pip install ./bindings/python

- name: Run tests
- name: Install py_cstest
run: pip install ./bindings/python/py_cstest

- name: Run legacy tests
run: python ./bindings/python/tests/test_all.py

- name: py_cstest integration tests
run: |
cd suite/cstest/test/
python3 ./integration_tests.py py_cstest
cd ../../../

- name: py_cstest MC
run: |
py_cstest tests/MC/

- name: py_cstest details
run: |
py_cstest tests/details/

- name: py_cstest issues
run: |
py_cstest tests/issues/

- name: py_cstest features
run: |
py_cstest tests/features/
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
# python
bindings/python/build/
bindings/python/capstone.egg-info/
bindings/python/py_cstest/src/py_cstest.egg**
bindings/cython/capstone.egg-info/
*.pyc

Expand Down Expand Up @@ -133,7 +134,6 @@ fuzz_disasm
fuzz_decode_platform
capstone_get_setup
suite/fuzz/corpus
suite/cstest/cmocka/

*.s

Expand All @@ -147,3 +147,6 @@ android-ndk-*

# Auto-sync files
suite/auto-sync/src/autosync.egg-info

# clangd cache
/.cache
Loading
Loading