capstone/suite/cstest
2019-05-11 11:52:43 +08:00
..
include RISCV support ISRV32/ISRV64 (#1401) 2019-03-09 08:41:12 +08:00
src merge next-arm64 to next 2019-04-10 17:46:07 +08:00
build_cstest.sh Integrate into travis cli (#1378) 2019-02-14 22:15:12 +08:00
cstest_report.py fix mode "c" in report_cstest (#1398) 2019-02-26 21:45:48 +08:00
issues.cs ppc: add JUMP group for some branch instructions 2019-05-11 11:52:43 +08:00
Makefile cstest: build with local libcapstone 2019-03-08 13:24:36 +08:00
README.md cstest: update README 2019-02-14 00:59:19 +08:00

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

  • 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