Sync
This commit is contained in:
parent
b0ca946840
commit
abf522a1be
2 changed files with 36 additions and 0 deletions
22
test/show_all.sh
Normal file
22
test/show_all.sh
Normal file
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
# Directory paths
|
||||
DATA_DIR='../data'
|
||||
OUT_DIR='../out'
|
||||
|
||||
IMG_TYPES=('depth' 'rgb')
|
||||
|
||||
mkdir -p "${OUT_DIR}"
|
||||
|
||||
for json_file in ${DATA_DIR}/*.json; do
|
||||
base_name=$(basename "${json_file}" '.json')
|
||||
echo "Testing ${base_name}..."
|
||||
|
||||
../cmake-build-release/raytracing "${json_file}" > /dev/null
|
||||
|
||||
for img_type in "${IMG_TYPES[@]}"; do
|
||||
mv "${img_type}.png" "${OUT_DIR}/${base_name}-${img_type}.png"
|
||||
done
|
||||
done
|
14
test/test_all.sh
Normal file
14
test/test_all.sh
Normal file
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
# Directory paths
|
||||
TEST_DIR='../out'
|
||||
CORRECT_DIR='../correct_results'
|
||||
|
||||
for file in ${CORRECT_DIR}/*.png; do
|
||||
base_name=$(basename "${file}" '.png')
|
||||
echo "Testing ${base_name}..."
|
||||
|
||||
diff "${file}" "${TEST_DIR}/${base_name}-rgb.png"
|
||||
done
|
Reference in a new issue