• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..29-Apr-2021-

include/H29-Apr-2021-12489

src/H29-Apr-2021-2,5722,126

MakefileH A D29-Apr-2021245 1412

README.mdH A D29-Apr-20211.1 KiB7955

build_cstest.shH A D29-Apr-2021261 107

cstest_report.pyH A D29-Apr-20212.7 KiB10386

issues.csH A D29-Apr-202132.7 KiB771571

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