mirror of https://github.com/CIRCL/Circlean
Rework the way we select which partition types to test and introduce the concept of file test sets. Remove redundant old-style partition data sources.
parent
6b6d7df247
commit
c4879f99b6
6 changed files with 139 additions and 35 deletions
@ -1,11 +1,22 @@ |
||||
#!/bin/bash |
||||
|
||||
TEST_PART_TYPE=${1} |
||||
TEST_SOURCE_TYPE=${2} |
||||
|
||||
if [ -z "$1" ]; then |
||||
TEST_PART_TYPE="VFAT_NORM" |
||||
fi |
||||
if [ -z "$2" ]; then |
||||
TEST_SOURCE_TYPE="t_images1" |
||||
fi |
||||
|
||||
set -e |
||||
|
||||
./mount_image.sh ./copy_to_final.sh |
||||
|
||||
pushd tests/ |
||||
|
||||
./run.sh |
||||
./run.sh ${TEST_PART_TYPE} ${TEST_SOURCE_TYPE} |
||||
./check_results.sh ${TEST_SOURCE_TYPE} |
||||
|
||||
popd |
||||
|
@ -0,0 +1,47 @@ |
||||
#!/bin/bash |
||||
|
||||
# To make debugging easier |
||||
echo "KittenGroomer: in tests/check_results.sh" 1>&2 |
||||
|
||||
OFFSET_VFAT_NORM=$((8192 * 512)) |
||||
IMAGE_DEST="testcase_dest.vfat" |
||||
|
||||
if [ "$(id -u)" != "0" ]; then |
||||
echo "This script must be run as root" 1>&2 |
||||
exit 1 |
||||
fi |
||||
|
||||
if [ -z "$1" ]; then |
||||
echo "Please tell me which file type to test." |
||||
echo "t_images1" |
||||
exit |
||||
fi |
||||
TEST_SOURCE_TYPE=${2} |
||||
|
||||
set -e |
||||
set -x |
||||
|
||||
RESULTS_DIR="results" |
||||
|
||||
# To make debugging easier |
||||
echo "Removing results from previous run." 1>&2 |
||||
rm -rf actualResults/* |
||||
|
||||
clean(){ |
||||
umount ${RESULTS_DIR} |
||||
rm -rf ${RESULTS_DIR} |
||||
} |
||||
|
||||
trap clean EXIT TERM INT |
||||
|
||||
mkdir -p ${RESULTS_DIR} |
||||
|
||||
# Get the run results |
||||
mount -o loop,offset=${OFFSET_VFAT_NORM} ${IMAGE_DEST} ${RESULTS_DIR} |
||||
cp -rf ${RESULTS_DIR}/* actualResults |
||||
umount ${RESULTS_DIR} |
||||
|
||||
|
||||
|
||||
# To make debugging easier |
||||
echo "KittenGroomer: done with tests/check_results.sh" 1>&2 |
Loading…
Reference in new issue