Attempt to run testcases more easily
This commit is contained in:
49
anduril/testing/run-component-docs
Executable file
49
anduril/testing/run-component-docs
Executable file
@@ -0,0 +1,49 @@
|
||||
#!/bin/bash
|
||||
|
||||
function return_error {
|
||||
echo "$1"
|
||||
exit 1
|
||||
}
|
||||
|
||||
if [ -f "$HOME/Documents/anduril_environment.sh" ]
|
||||
then . "$HOME/Documents/anduril_environment.sh"
|
||||
echo Read HOME/Documents/anduril_environment.sh
|
||||
fi
|
||||
|
||||
[ -d "$ANDURIL_HOME" ] || return_error "ANDURIL_HOME is not set!"
|
||||
[ -d "$ANDURIL_BUNDLES" ] || return_error "ANDURIL_BUNDLES is not set! (folder of bundles, may also be same as ANDURIL_HOME)"
|
||||
|
||||
echo ANDURIL_HOME="$ANDURIL_HOME"
|
||||
echo ANDURIL_BUNDLES="$ANDURIL_BUNDLES"
|
||||
|
||||
if [ ! -z "$1" ]
|
||||
then search=$( echo $1 | tr A-Z a-z )
|
||||
fi
|
||||
|
||||
MICROHOME="$ANDURIL_HOME/microarray"
|
||||
bundles=( )
|
||||
echo -n "Looking for bundles: "
|
||||
for e in $( ls $ANDURIL_BUNDLES )
|
||||
do [[ -e ${ANDURIL_BUNDLES}/$e/bundle.xml ]] || continue
|
||||
bname=$( cat ${ANDURIL_BUNDLES}/$e/bundle.xml | tr -d [:cntrl:] | grep '<name>' | sed 's/.*<name>\(.*\)<\/name>.*/\1/' | tr A-Z a-z )
|
||||
bundles+=( $bname )
|
||||
echo -n "$bname "
|
||||
if [ "$search" = "$bname" ]
|
||||
then BUNDLESTRING="-b ${ANDURIL_BUNDLES}/$e"
|
||||
fi
|
||||
if [ "$bname" = "microarray" ]
|
||||
then MICROHOME="${ANDURIL_BUNDLES}/$e"
|
||||
fi
|
||||
done
|
||||
echo ""
|
||||
|
||||
if [ -z "$1" ]
|
||||
then return_error "Give bundle name to create component docs!"
|
||||
fi
|
||||
|
||||
[ -d "$MICROHOME" ] || return_error "Could not find Microarray bundle home: $MICROHOME"
|
||||
[ -z "$BUNDLESTRING" ] && return_error "Could not find given bundle: $search"
|
||||
|
||||
|
||||
echo $ANDURIL_HOME/bin/anduril build-doc doc_${search} --log log_doc "$BUNDLESTRING" -t $MICROHOME/datatypes.xml
|
||||
eval $ANDURIL_HOME/bin/anduril build-doc doc_${search} --log log_doc "$BUNDLESTRING" -t $MICROHOME/datatypes.xml
|
||||
Reference in New Issue
Block a user