diff test-data.sh @ 10:ea3197d16843 draft

"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit f5fcdd54599554099fb00b1973cc91a766ad246a"
author galaxyp
date Wed, 23 Sep 2020 15:04:23 +0000
parents ccfc3e189087
children 910f1fdf039a
line wrap: on
line diff
--- a/test-data.sh	Wed Sep 09 20:13:29 2020 +0000
+++ b/test-data.sh	Wed Sep 23 15:04:23 2020 +0000
@@ -18,6 +18,11 @@
 export OPENMSENV="$tmp/OpenMS$VERSION-env"
 export CTDCONVERTER="$tmp/CTDConverter"
 
+if [[ -z "$1" ]]; then
+	autotests="/dev/null"
+else
+	autotests="$1"
+fi
 
 if type conda > /dev/null; then  
 	true
@@ -28,11 +33,6 @@
 fi
 eval "$(conda shell.bash hook)"
 
-if [[ -z "$1" ]]; then
-	autotests="/dev/null"
-else
-	autotests="$1"
-fi
 
 ###############################################################################
 ## get 
@@ -88,7 +88,7 @@
 	git pull origin topic/cdata
 	cd -
 fi
-export PYTHONPATH=$(pwd)/CTDopts
+# export PYTHONPATH=$(pwd)/CTDopts
 
 ###############################################################################
 ## copy all the test data files to test-data
@@ -96,6 +96,8 @@
 ## prepare_test_data
 ###############################################################################
 echo "Get test data"
+find test-data -type f,l,d ! -name "*fa"  ! -name "*loc" -delete
+
 cp $(find $OPENMSGIT/src/tests/topp/ -type f | grep -Ev "third_party_tests.cmake|CMakeLists.txt|check_ini") test-data/
 cp -r $OPENMSGIT/share/OpenMS/MAPPING/ test-data/
 cp -r $OPENMSGIT/share/OpenMS/CHEMISTRY test-data/
@@ -211,20 +213,17 @@
 cd - || exit
 
 
-# # # exit
-
 ###############################################################################
 ## auto generate tests
 ###############################################################################
-
-echo "Write test macros to "$autotests
-echo "<macros>" > $autotests
+echo "Write test macros to $autotests"
+echo "<macros>" > "$autotests"
 for i in $(ls *xml |grep -v macros)
 do
 	b=$(basename "$i" .xml)
-	get_tests2 "$b" >> $autotests 
+	get_tests2 "$b" >> "$autotests"
 done
-echo "</macros>" >> $autotests
+echo "</macros>" >> "$autotests"
 
 echo "Create test data links"
 link_tmp_files
@@ -232,9 +231,16 @@
 # tests for tools using output_prefix parameters can not be auto generated
 # hence we output the tests for manual curation in macros_test.xml
 # and remove them from the autotests
+# -> OpenSwathFileSplitter IDRipper MzMLSplitter
+#
+# Furthermore we remove tests for tools without binaries in conda
+# -> MSFragger MaRaClusterAdapter NovorAdapter 
+#
+# not able to specify composite test data  
+# -> SpectraSTSearchAdapter 
 if [[ ! -z "$1" ]]; then
 	echo "" > macros_discarded_auto.xml
-	for i in OpenSwathFileSplitter IDRipper MzMLSplitter
+	for i in OpenSwathFileSplitter IDRipper MzMLSplitter MSFraggerAdapter MaRaClusterAdapter NovorAdapter SpectraSTSearchAdapter
 	do
 		echo "<xml name=\"manutest_$i\">" >>  macros_discarded_auto.xml
 		xmlstarlet sel -t -c "/macros/xml[@name='autotest_$i']/test" macros_autotest.xml >>  macros_discarded_auto.xml
@@ -242,7 +248,7 @@
 		xmlstarlet ed -d "/macros/xml[@name='autotest_$i']/test" macros_autotest.xml > tmp
 		mv tmp macros_autotest.xml
 	done
-	>&2 "discarded autogenerated macros for curation in macros_discarded_auto.xml"
+	>&2 echo "discarded autogenerated macros for curation in macros_discarded_auto.xml"
 fi
 conda deactivate