2024-05-12 00:19:22 +00:00
|
|
|
-include ../config-user.mk
|
2022-11-02 04:15:08 +00:00
|
|
|
RUNTEST=r2r -L -o results.json
|
|
|
|
|
|
|
|
all: r2r-tests
|
2019-12-08 14:31:14 +00:00
|
|
|
|
2021-02-09 21:28:45 +00:00
|
|
|
arm.v35:
|
|
|
|
${RUNTEST} db/extras/asm/arm.v35_64
|
|
|
|
|
2019-12-08 14:31:14 +00:00
|
|
|
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
|
|
|
|
|
2019-12-08 14:31:14 +00:00
|
|
|
fuzz/targets:
|
|
|
|
git clone --depth 1 https://github.com/radareorg/radare2-fuzztargets fuzz/targets
|
|
|
|
|
2020-04-01 21:16:02 +00:00
|
|
|
r2r-tests: bins
|
2022-11-02 04:15:08 +00:00
|
|
|
$(MAKE) unit-tests
|
2019-12-29 18:26:15 +00:00
|
|
|
${RUNTEST}
|
2019-12-08 14:31:14 +00:00
|
|
|
|
2020-04-07 11:27:19 +00:00
|
|
|
fuzz-tests: bins
|
|
|
|
r2r -LF bins/fuzzed @fuzz
|
|
|
|
|
2019-12-08 14:31:14 +00:00
|
|
|
keystone: bins
|
2021-02-11 21:58:08 +00:00
|
|
|
${RUNTEST} db/extras/asm/x86.ks_*
|
2019-12-08 14:31:14 +00:00
|
|
|
|
|
|
|
swf: bins
|
2020-04-10 17:04:40 +00:00
|
|
|
${RUNTEST} db/extras/cmd/swf
|
2019-12-08 14:31:14 +00:00
|
|
|
|
|
|
|
m68k-extras: bins
|
2019-12-29 18:26:15 +00:00
|
|
|
${RUNTEST} db/extras/asm/m68k
|
2019-12-08 14:31:14 +00:00
|
|
|
|
|
|
|
mc6809: bins
|
2021-02-09 21:28:45 +00:00
|
|
|
${RUNTEST} db/extras/asm/mc6809
|
2019-12-08 14:31:14 +00:00
|
|
|
|
|
|
|
microblaze: bins
|
2019-12-29 18:26:15 +00:00
|
|
|
${RUNTEST} db/extras/asm/microblaze.gnu
|
2019-12-08 14:31:14 +00:00
|
|
|
|
|
|
|
udis86: bins
|
2021-02-09 21:28:45 +00:00
|
|
|
${RUNTEST} db/extras/asm/x86.udis_*
|
2019-12-08 14:31:14 +00:00
|
|
|
|
|
|
|
olly-extras: bins
|
2019-12-29 18:26:15 +00:00
|
|
|
${RUNTEST} db/extras/asm/x86.olly
|
2019-12-08 14:31:14 +00:00
|
|
|
|
|
|
|
dwarf: bins
|
2019-12-29 18:26:15 +00:00
|
|
|
${RUNTEST} db/extras/asm/dwarf
|
|
|
|
|
2021-10-23 22:16:21 +00:00
|
|
|
vc4: bins
|
|
|
|
${RUNTEST} db/extras/asm/vc4
|
|
|
|
|
2020-03-02 10:34:43 +00:00
|
|
|
yara: bins
|
|
|
|
${RUNTEST} db/extras/cmd/yara
|
|
|
|
|
2019-12-08 14:31:14 +00:00
|
|
|
clean:
|
2022-11-19 00:05:18 +00:00
|
|
|
$(MAKE) -C unit clean
|
2019-12-08 14:31:14 +00:00
|
|
|
rm -rf tmp
|
|
|
|
|
2022-05-26 10:41:49 +00:00
|
|
|
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
|
2022-05-26 10:41:49 +00:00
|
|
|
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
|
|
|
|
|
2019-12-08 14:31:14 +00:00
|
|
|
symstall:
|
2020-03-31 01:15:59 +00:00
|
|
|
|
|
|
|
install:
|
2019-12-08 14:31:14 +00:00
|
|
|
|
|
|
|
uninstall:
|
|
|
|
|
2022-11-02 04:15:08 +00:00
|
|
|
unit unit-tests: bins
|
2024-05-11 21:20:07 +00:00
|
|
|
PATH="$(BINDIR):$(PATH)" $(MAKE) rc
|
|
|
|
PKG_CONFIG_PATH=$(PREFIX)/lib/pkgconfig \
|
|
|
|
LD_LIBRARY_PATH=$(PREFIX)/lib \
|
|
|
|
PATH="$(BINDIR):$(PATH)" \
|
|
|
|
$(MAKE) -C unit run
|
2019-12-08 14:31:14 +00:00
|
|
|
|
2022-11-02 04:15:08 +00:00
|
|
|
.PHONY: all clean unit install uninstall r2r-tests fuzz-tests keystone swf dwarf yara unit-tests
|