moving projects

This commit is contained in:
ville rantanen
2013-09-03 10:04:14 +03:00
parent 3e36193fe4
commit 30cb1e6128
13 changed files with 570 additions and 0 deletions

48
anduril/testcasecopy.sh Executable file
View File

@@ -0,0 +1,48 @@
#!/bin/bash
if [ -z "$2" ]
then
echo "
Copies Anduril testcase results to the original source location.
Use it when testcases fail, but you know the results to be correct.
After copying you must commit the changes in the checkout.
Usage: testcasecopy executionfolder/ComponentFolder /path/to/bundle/root
example: testcasecopy results/CSVJoin ~/anduril/trunk/microarray/
Any extra arguments are given to the copy command: cp -a [args] source target
Recommended use: -i for prompt before overwrite and -v for verbose
"
exit 0
fi
IFS=$'\n'
component=$( basename "$1" )
execfolder=$( dirname "$1" )
source=$1
bundle=$2
shift 2
if [ ! -d "$source" ]
then echo "$source folder not found"
exit 1
fi
if [ ! -d "$bundle" ]
then echo "$bundle folder not found"
exit 1
fi
#echo $execfolder $component
cases=$( find "$source" -mindepth 1 -maxdepth 1 -type d )
for case in $cases
do
casebase=$( basename "$case" )
tgt="${bundle}/components/${component}/testcases/${casebase}/expected-output"
if [ -d "$tgt" ]
then
for output in $( ls "${case}/component" | grep -v ^_ )
do
cp -a $@ "${case}/component/${output}" "${tgt}/"
done
else
echo "$component $casebase does not have expected-output folder"
fi
done