diff test-data.sh @ 12:f918cb7aefd5 draft

"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
author galaxyp
date Thu, 24 Sep 2020 12:27:04 +0000
parents 65be0674bb70
children 31bc4129f589
line wrap: on
line diff
--- a/test-data.sh	Wed Sep 09 20:06:18 2020 +0000
+++ b/test-data.sh	Thu Sep 24 12:27:04 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