diff --git a/docker/archlinux/README.md b/docker/archlinux/README.md index 72756a91e..6e80a4abe 100644 --- a/docker/archlinux/README.md +++ b/docker/archlinux/README.md @@ -1,3 +1,17 @@ +# Notes on run_tests.sh script +This script does both setup the mirrors and pip install and then run a +bunch of different builds with make and cmake together with the different combos +of RDV4, GENERIC, BTADDON combos. + +If all tests OK, the script will finish. + +The script is to be run in proxmark root folder inside the docker env. + +``` +cd proxmark; +docker/archlinux/run_tests.sh; +``` + # Notes to install latest gcc and arm-none-eabi-gcc ``` diff --git a/docker/archlinux/run_tests.sh b/docker/archlinux/run_tests.sh new file mode 100755 index 000000000..8d4a56776 --- /dev/null +++ b/docker/archlinux/run_tests.sh @@ -0,0 +1,59 @@ +#!/usr/bin/env bash +# Iceman 2022 +# +# This script is to be run from proxmark root folder inside the docker env +# cd proxmark; +# docker/archlinux/run_tests.sh; +# +# Script contains two phases. +# +# -- Init / setup phase +# Script to be run inside docker env. First install some dependencies for docker image. +# +# -- Build phase begins +# make builds +# cmake client builds +# of the different possible PLATFORM (PM3RDV4 / PM3GENERIC) and BTADDON combos + +cat << EOF |sudo tee -a /etc/pacman.conf + +[testing] +Include = /etc/pacman.d/mirrorlist + +[community-testing] +Include = /etc/pacman.d/mirrorlist + +[staging] +Include = /etc/pacman.d/mirrorlist +EOF + +sudo pacman -Syu + +# search available versions +pacman -Ss '^arm-none-eabi-gcc$' +pacman -Ss '^gcc$' + +# depending on where the latest bleeding edge is: +# sudo pacman -S community-testing/arm-none-eabi-gcc +# sudo pacman -S arm-none-eabi-gcc +# sudo pacman -S staging/gcc +# sudo pacman -S testing/gcc +# sudo pacman -S gcc + +sudo pacman --noconfirm -S python-pip +python3 -m pip install ansicolors sslcrypto + +# replace egrep to silence warning +sed -i 's/egrep/grep -E/g' tools/pm3_tests.sh + +# Makefile build tests +make clean; make -j PLATFORM=PM3GENERIC; tools/pm3_tests.sh --long || exit 1 +make clean; make -j PLATFORM=PM3RDV4; tools/pm3_tests.sh --long || exit 1 +make clean; make -j PLATFORM=PM3RDV4 PLATFORM_EXTRAS=BTADDON; tools/pm3_tests.sh --long || exit 1 + +# cmake client build test +( cd client; rm -rf build; mkdir build;cd build;cmake ..;make -j ); PM3BIN=./client/build/proxmark3 tools/pm3_tests.sh client --long || exit 1 +( cd client; rm -rf build; mkdir build;cd build;cmake ..;make -j PLATFORM=PM3GENERIC ); PM3BIN=./client/build/proxmark3 tools/pm3_tests.sh client --long || exit 1 +( cd client; rm -rf build; mkdir build;cd build;cmake ..;make -j PLATFORM=PM3RDV4 ); PM3BIN=./client/build/proxmark3 tools/pm3_tests.sh client --long || exit 1 +( cd client; rm -rf build; mkdir build;cd build;cmake ..;make -j PLATFORM=PM3RDV4 PLATFORM_EXTRAS=BTADDON ); PM3BIN=./client/build/proxmark3 tools/pm3_tests.sh client || exit 1 +