mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
add test script
This commit is contained in:
parent
1c880d8915
commit
fb6d2fdee8
2 changed files with 41 additions and 1 deletions
|
@ -50,5 +50,5 @@ script:
|
|||
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||
proxmark3 -h ;
|
||||
elif [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
||||
./client/proxmark3 -h ;
|
||||
./pm3test.sh;
|
||||
fi
|
40
pm3test.sh
Normal file
40
pm3test.sh
Normal file
|
@ -0,0 +1,40 @@
|
|||
#!/bin/bash
|
||||
|
||||
PM3PATH=$(dirname "$0")
|
||||
cd "$PM3PATH" || exit 1
|
||||
|
||||
C_RED='\033[0;31m'
|
||||
C_GREEN='\033[0;32m'
|
||||
C_BLUE='\033[0;34m'
|
||||
C_NC='\033[0m' # No Color
|
||||
|
||||
function CheckFileExist() {
|
||||
|
||||
if [ -f "$2" ]; then
|
||||
echo "$1 [OK]"
|
||||
return 0
|
||||
fi
|
||||
|
||||
if ls $2 1> /dev/null 2>&1; then
|
||||
echo "$1 [OK]"
|
||||
return 0
|
||||
fi
|
||||
|
||||
echo "$1 [Fail]"
|
||||
return 1
|
||||
}
|
||||
|
||||
printf "\n${C_BLUE}RRG Proxmark3 test tool ${C_NC}\n\n"
|
||||
|
||||
while true; do
|
||||
if ! CheckFileExist "proxmark3 exists" "client/proxmark3"; then break; fi
|
||||
if ! CheckFileExist "arm image exists" "armsrc/obj/fullimage.elf"; then break; fi
|
||||
if ! CheckFileExist "bootrom exists" "bootrom/obj/bootrom.elf"; then break; fi
|
||||
if ! CheckFileExist "hardnested tables exists" "client/hardnested/tables/*.z"; then break; fi
|
||||
|
||||
printf "\n${C_GREEN}Tests [OK]${C_NC}\n\n"
|
||||
exit 0
|
||||
done
|
||||
|
||||
printf "\n${C_RED}Tests [FAIL]${C_NC}\n\n"
|
||||
exit 1
|
Loading…
Add table
Add a link
Reference in a new issue