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

Clean up the cstest documentation and build instructions. #2580

Merged
merged 1 commit into from
Dec 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,14 @@ X86_REDUCE, run "cmake" with: `-DCAPSTONE_USE_SYS_DYN_MEM=0`, `-DCAPSTONE_BUILD_
- `ENABLE_ASAN`: Compiles Capstone with the address sanitizer.
- `ENABLE_COVERAGE`: Generate coverage files.
- `CAPSTONE_BUILD_LEGACY_TESTS`: Build some legacy integration tests.

## Building cstest

`cstest` is build together with Capstone by adding the flag `-DCAPSTONE_BUILD_CSTEST`.

The build requires `libyaml`. It is a fairly common package and should be provided by your package manager.

_Note:_ Currently `cstest` us only supported on Linux.

If you run another operation system, please install `cstest_py`.
See `bindings/python/BUILDING.md` for instructions.
14 changes: 13 additions & 1 deletion bindings/python/BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,19 @@
pip install bindings/python/
```

2. The tests directory contains some test code to show how to use the Capstone API.
2. Building cstest_py

To run the disassembler tests you can install `cstest_py` as alternative to the normal `cstest`.
In contrast to `cstest`, `cstest_py` also runs on Windows and Mac.

Install with:
```
pip install bindings/python/cstest_py/
```

It requires the bindings of course.

3. The tests directory contains some test code to show how to use the Capstone API.

- test_lite.py
Similarly to test_basic.py, but this code shows how to use disasm_lite(), a lighter
Expand Down
10 changes: 1 addition & 9 deletions suite/cstest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,6 @@ Copyright © 2024 Rot127 <unisono@quyllur.org>
SPDX-License-Identifier: BSD-3
-->

## Building

`cstest` is build together with Capstone by adding the flag `-DCAPSTONE_BUILD_CSTEST`.

The build requires `libyaml`. It is a fairly common package and should be provided by your package manager.

## Testing
## Testing cstest

Files to test `cstest` itself are located in `suite/cstest/test`.
And yes, testing with a shell script is not nice. But I have time constraints, and
for integration testing it does pretty much exactly what it should.
Loading