radare2/test/Makefile

84 lines
1.7 KiB
Makefile
Raw Normal View History

-include ../config-user.mk
2022-11-02 04:15:08 +00:00
RUNTEST=r2r -L -o results.json
all: r2r-tests
arm.v35:
${RUNTEST} db/extras/asm/arm.v35_64
bins:
git clone --depth 1 https://github.com/radareorg/radare2-testbins bins
2022-01-19 14:29:56 +00:00
evm:
${RUNTEST} db/extras/asm/evm
fuzz/targets:
git clone --depth 1 https://github.com/radareorg/radare2-fuzztargets fuzz/targets
r2r-tests: bins
2022-11-02 04:15:08 +00:00
$(MAKE) unit-tests
${RUNTEST}
2020-04-07 11:27:19 +00:00
fuzz-tests: bins
r2r -LF bins/fuzzed @fuzz
keystone: bins
${RUNTEST} db/extras/asm/x86.ks_*
swf: bins
2020-04-10 17:04:40 +00:00
${RUNTEST} db/extras/cmd/swf
m68k-extras: bins
${RUNTEST} db/extras/asm/m68k
mc6809: bins
${RUNTEST} db/extras/asm/mc6809
microblaze: bins
${RUNTEST} db/extras/asm/microblaze.gnu
udis86: bins
${RUNTEST} db/extras/asm/x86.udis_*
olly-extras: bins
${RUNTEST} db/extras/asm/x86.olly
dwarf: bins
${RUNTEST} db/extras/asm/dwarf
vc4: bins
${RUNTEST} db/extras/asm/vc4
2020-03-02 10:34:43 +00:00
yara: bins
${RUNTEST} db/extras/cmd/yara
clean:
$(MAKE) -C unit clean
rm -rf tmp
rc:
echo q | r2 -c '?V' -
echo q12 | r2 -c '?V' - ; if [ $$? = 12 ]; then echo "Test q12" OK ; exit 0 ; else exit 1 ; fi
echo q2 | r2 - ; if [ $$? = 2 ]; then echo "Test - q2 OK" ; exit 0 ; else exit 1 ; fi
echo q2 | r2 -cq - ; if [ $$? = 2 ]; then echo "Test -cq q2 OK" ; exit 0 ; else exit 1 ; fi
2022-06-27 22:14:14 +00:00
echo q | r2 /bin/ls # bins/fuzzed/pe12
r2 -qcq2 - ; if [ $$? = 2 ]; then echo "Test q2 OK" ; exit 0 ; else exit 1 ; fi
r2 -qcq -
r2 -qqcq -
echo q2 | r2 -qqcq - # input is ignored
symstall:
2020-03-31 01:15:59 +00:00
install:
uninstall:
2022-11-02 04:15:08 +00:00
unit unit-tests: bins
PATH="$(BINDIR):$(PATH)" $(MAKE) rc
PKG_CONFIG_PATH=$(PREFIX)/lib/pkgconfig \
LD_LIBRARY_PATH=$(PREFIX)/lib \
PATH="$(BINDIR):$(PATH)" \
$(MAKE) -C unit run
2022-11-02 04:15:08 +00:00
.PHONY: all clean unit install uninstall r2r-tests fuzz-tests keystone swf dwarf yara unit-tests