Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
include/ | 03-May-2024 | - | 125 | 90 | ||
src/ | 03-May-2024 | - | 2,404 | 1,983 | ||
Makefile | D | 03-May-2024 | 230 | 14 | 12 | |
README.md | D | 03-May-2024 | 1.1 KiB | 79 | 55 | |
build_cstest.sh | D | 03-May-2024 | 261 | 10 | 7 | |
cstest_report.py | D | 03-May-2024 | 2.7 KiB | 103 | 86 | |
issues.cs | D | 03-May-2024 | 23.3 KiB | 437 | 327 |
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