• Home
Name Date Size #Lines LOC

..--

include/03-May-2024-12590

src/03-May-2024-2,4041,983

MakefileD03-May-2024230 1412

README.mdD03-May-20241.1 KiB7955

build_cstest.shD03-May-2024261 107

cstest_report.pyD03-May-20242.7 KiB10386

issues.csD03-May-202423.3 KiB437327

README.md

1# Regression testing
2This directory contains a tool for regression testing core of Capstone
3
4## Dependency
5
6- MacOS users can install cmocka with:
7
8```
9brew install cmocka
10```
11
12- Or download & build from source code [Cmocka](https://git.cryptomilk.org/projects/cmocka.git)
13
14- Build Cmocka
15
16```
17cd cmocka_dir
18mkdir build
19cd build
20cmake ..
21make
22sudo make isntall
23```
24
25## Build
26
27- Build `cstest`
28
29```
30cd suite/cstest
31make
32```
33
34## Usage
35
36- Usage: `cstest [-e] [-f <file_name.cs>] [-d <directory>]`
37	- `-e` : test all commented test
38
39- Test for all closed issues
40
41```
42cd suite/cstest
43./build/cstest -f ./issues.cs
44```
45
46- Test for some input from LLVM
47
48```
49cd suite/cstest
50./build/cstest -f ../MC/AArch64/basic-a64-instructions.s.cs
51```
52
53- Test for all cs file in a folder
54
55```
56cd suite/cstest
57./build/cstest -d ../MC
58```
59
60- Test all
61
62```
63cd suite/cstest
64make cstest
65```
66
67## Report tool
68
69- Usage `cstest_report.py [-Dc] -t <cstest_path> [-f <file_name.cs>] [-d <directory>]`
70	- `-D` : print details
71	- `-c` : auto comment out failed test
72
73- Example:
74
75```
76./cstest_report.py -t build/cstest -d ../MC/PowerPC/
77./cstest_report.py -t build/cstest -f issues.cs
78```
79