aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/test_by_xed.sh
blob: 6d820bd7557510f8bb96334efb4545dfe61b09f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh

set -e
XED=${XED:=xed}
CXX=${CXX:=g++}
PYTHON=${PYTHON:=python3}

if [ $# -ne 1 ]; then
  echo "./test_by_xed.sh <xbyak-cpp>"
  exit 1
fi

TARGET=$1

CFLAGS="-Wall -Wextra -I ../"

echo "test:" $TARGET
cp $TARGET cpp.txt
$CXX $CFLAGS test_by_xed.cpp -o test_by_xed
./test_by_xed
$XED -64 -ir bin > out.txt
$PYTHON test_by_xed.py cpp.txt out.txt