diff options
author | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
---|---|---|
committer | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
commit | af1a266670d040d2f4083ff309d732d648afba2a (patch) | |
tree | 2fc46203448ddcc6f81546d379abfaeb323575e9 /capstone/suite/cstest/README.md | |
parent | e02cda008591317b1625707ff8e115a4841aa889 (diff) |
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'capstone/suite/cstest/README.md')
-rw-r--r-- | capstone/suite/cstest/README.md | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/capstone/suite/cstest/README.md b/capstone/suite/cstest/README.md new file mode 100644 index 000000000..a9880dadf --- /dev/null +++ b/capstone/suite/cstest/README.md @@ -0,0 +1,78 @@ +# Regression testing +This directory contains a tool for regression testing core of Capstone + +## Dependency + +- MacOS users can install cmocka with: + +``` +brew install cmocka +``` + +- Or download & build from source code [Cmocka](https://git.cryptomilk.org/projects/cmocka.git) + +- Build Cmocka + +``` +cd cmocka_dir +mkdir build +cd build +cmake .. +make +sudo make isntall +``` + +## Build + +- Build `cstest` + +``` +cd suite/cstest +make +``` + +## Usage + +- Usage: `cstest [-e] [-f <file_name.cs>] [-d <directory>]` + - `-e` : test all commented test + +- Test for all closed issues + +``` +cd suite/cstest +./build/cstest -f ./issues.cs +``` + +- Test for some input from LLVM + +``` +cd suite/cstest +./build/cstest -f ../MC/AArch64/basic-a64-instructions.s.cs +``` + +- Test for all cs file in a folder + +``` +cd suite/cstest +./build/cstest -d ../MC +``` + +- Test all + +``` +cd suite/cstest +make cstest +``` + +## Report tool + +- Usage `cstest_report.py [-Dc] -t <cstest_path> [-f <file_name.cs>] [-d <directory>]` + - `-D` : print details + - `-c` : auto comment out failed test + +- Example: + +``` +./cstest_report.py -t build/cstest -d ../MC/PowerPC/ +./cstest_report.py -t build/cstest -f issues.cs +``` |