Skip to content
Permalink
9ba7664dd2
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
49 lines (39 sloc) 1.47 KB
#!/bin/bash
echo 'Preparing for testing ...'
cp config-comik.txt config-comik-test.txt
sed -i 's/OUTPUT_FOLDER=comik_run_simulated_dataset1/OUTPUT_FOLDER=test_comik_run_simulated_dataset1/g' config-comik-test.txt
sed -i 's/NUMBER_OF_CLUSTERS=\[2 5 7]/NUMBER_OF_CLUSTERS=\[7\]/g' config-comik-test.txt
sed -i 's/SIGMA_VALUES=10\.\^\[1\:1\:2\]/SIGMA_VALUES=10\.\^\[1\]/g' config-comik-test.txt
sed -i 's/COST_VALUES=10\.\^\[-3\:1\:3\]/COST_VALUES=10\.\^\[1\]/g' config-comik-test.txt
sed -i 's/NUMBER_OF_INNER_FOLDS=5/NUMBER_OF_INNER_FOLDS=2/g' config-comik-test.txt
sed -i 's/NUMBER_OF_OUTER_FOLDS=5/NUMBER_OF_OUTER_FOLDS=3/g' config-comik-test.txt
if [ "$1" = "executable" ]
then
echo "Only testing the executable ... this might take some time"
if [ "$3" = "v86" ];
then
if [ -f "run_CoMIK_v86.sh" ];
then
./run_CoMIK_v86.sh $2 config-comik-test.txt
fi
elif [ "$3" = "v90" ];
then
if [ -f "run_CoMIK_v90.sh" ];
then
./run_CoMIK_v90.sh $2 config-comik-test.txt
fi
else
echo 'No file to run.'
fi
elif [ "$1" = "matlab" ]
then
echo 'Only testing inside MATLAB ... this might take some time'
matlab -nodesktop -nodisplay -nosplash -r "comik_wrapper('config-comik-test.txt'); exit;"
else
echo 'Testing both executable and from inside matlab ... this might take some time'
fi
if [ -d "$test_comik_run_simulated_dataset1"]; then
rm -rf test_comik_run_simulated_dataset1/
rm config-comik-test.txt
fi
echo "Done."