Debian Codegraph @

suite/cstest/README.md

raw symbols SCIP
1 # Regression testing
2 This directory contains a tool for regression testing core of Capstone
3
4 ## Dependency
5
6 - MacOS users can install cmocka with:
7
8 ```
9 brew 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 ```
17 cd cmocka_dir
18 mkdir build
19 cd build
20 cmake ..
21 make
22 sudo make isntall
23 ```
24
25 ## Build
26
27 - Build `cstest`
28
29 ```
30 cd suite/cstest
31 make
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 ```
42 cd suite/cstest
43 ./build/cstest -f ./issues.cs
44 ```
45
46 - Test for some input from LLVM
47
48 ```
49 cd 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 ```
56 cd suite/cstest
57 ./build/cstest -d ../MC
58 ```
59
60 - Test all
61
62 ```
63 cd suite/cstest
64 make 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 ```