capstone/suite/cstest
Đỗ Minh Tuấn e25a8a4cbf Add more features to CSTEST (#1376)
* fix crash

* MC: alias registers for Mips

* MC: alias registers for Mips - v1

* MC: alias registers for Mips

* MC: alias registers for Mips

* MC: more fix for Mips .cs

* MC: more fix for Mips .cs

* add comment feature

* free mem

* Done fixing

* Done

* rename report

* fix README
2019-02-14 01:29:07 +08:00
..
include Add more features to CSTEST (#1376) 2019-02-14 01:29:07 +08:00
src Add more features to CSTEST (#1376) 2019-02-14 01:29:07 +08:00
Makefile fix Makefile 2019-02-09 07:23:44 -08:00
README.md Add more features to CSTEST (#1376) 2019-02-14 01:29:07 +08:00
cstest_report.py Add more features to CSTEST (#1376) 2019-02-14 01:29:07 +08:00
issues.cs Add more features to CSTEST (#1376) 2019-02-14 01:29:07 +08:00

README.md

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

Using report tool

  • Usage python report.py [-Dc] -t <cstest_path> [-f <file_name.cs>] [-d <directory>]
    • -D : print details
    • -c : auto comment out failed test
  • Example:
./report.py -t build/cstest -d ../MC/PowerPC/
./report.py -t build/cstest -f issues.cs