test-identical.sh (611B)
1 dd if=/dev/urandom of=tests/artifacts/random_file.bin bs=1M count=1 2 hash=$(sha256sum tests/artifacts/random_file.bin) 3 ./build/debugEncode.out tests/artifacts/random_file.bin tests/artifacts/random_file.bin 7680 4320 4 mv tests/artifacts/random_file.bin tests/artifacts/original.bin 5 ./build/debugDecode.out tests/artifacts/random_file0.pbm 6 res_hash=$(sha256sum tests/artifacts/random_file.bin) 7 8 echo $res_hash 9 echo $hash 10 11 if [[ "$res_hash" == "$hash" ]]; then 12 echo 13 echo "Hashes match" 14 else 15 echo 16 echo "Hashes do not match!!!!" 17 echo "res_hash: $res_hash" 18 echo "hash: $hash" 19 exit 1 20 fi