From 3f0b77fa933f2f43b05d8ec9258153a9a4e0e0b5 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Fri, 28 Oct 2022 22:17:01 +0200 Subject: [PATCH] add pip , cd directory when building and adding large release test script --- docker/kali/Dockerfile | 4 ++++ docker/kali/README.md | 18 +++++++++++++++--- docker/kali/docker_run.sh | 2 +- docker/kali/run_tests.sh | 7 ++----- 4 files changed, 22 insertions(+), 9 deletions(-) diff --git a/docker/kali/Dockerfile b/docker/kali/Dockerfile index 72916c7b5..63dc3c841 100644 --- a/docker/kali/Dockerfile +++ b/docker/kali/Dockerfile @@ -8,6 +8,10 @@ RUN apt-get update && \ apt-get install -y --no-install-recommends git ca-certificates build-essential cmake pkg-config libreadline-dev gcc-arm-none-eabi libnewlib-dev libbz2-dev libbluetooth-dev libpython3-dev libssl-dev sudo && \ apt-get clean +RUN apt install -y python3-minimal +RUN apt install -y python3-pip +RUN python3 -m pip install ansicolors sslcrypto + # Create rrg user RUN useradd -ms /bin/bash rrg RUN passwd -d rrg diff --git a/docker/kali/README.md b/docker/kali/README.md index f586fe064..e76d73ae2 100644 --- a/docker/kali/README.md +++ b/docker/kali/README.md @@ -1,9 +1,21 @@ +# 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. + + # Notes to run tests +The script is to be run in proxmark root folder inside the docker env. +``` +docker/kali/run_tests.sh; +``` + +Or if you want to run single test, ``` sudo apt update -sudo apt install -y python3-minimal -sudo apt install -y python3-pip -python3 -m pip install ansicolors sslcrypto +make clean; make -j tools/pm3_tests.sh --long ``` diff --git a/docker/kali/docker_run.sh b/docker/kali/docker_run.sh index 5d9dcf13d..7124fe5b5 100755 --- a/docker/kali/docker_run.sh +++ b/docker/kali/docker_run.sh @@ -1,3 +1,3 @@ #!/bin/bash -docker run --volume=$(pwd)/../..:/home/rrg/proxmark3 -it pm3-kali:1.0 +docker run --volume=$(pwd)/../..:/home/rrg/proxmark3 -w /home/rrg/proxmark3 -it pm3-kali:1.0 diff --git a/docker/kali/run_tests.sh b/docker/kali/run_tests.sh index ccb111082..27b1c608f 100755 --- a/docker/kali/run_tests.sh +++ b/docker/kali/run_tests.sh @@ -15,13 +15,10 @@ # cmake client builds # of the different possible PLATFORM (PM3RDV4 / PM3GENERIC) and BTADDON combos -sudo apt update -sudo apt install -y python3-minimal -sudo apt install -y python3-pip -python3 -m pip install ansicolors sslcrypto +sudo apt update && sudo apt upgrade -y # replace egrep to silence warning -#sed -i 's/egrep/grep -E/g' tools/pm3_tests.sh +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