1@echo off 2 3REM ========================================================================== 4REM SeqAn MinGW Fix Test Batch 5REM ========================================================================== 6REM Copyright (c) 2006-2016, Knut Reinert, FU Berlin 7REM All rights reserved. 8REM 9REM Redistribution and use in source and binary forms, with or without 10REM modification, are permitted provided that the following conditions are met: 11Rem 12REM * Redistributions of source code must retain the above copyright 13REM notice, this list of conditions and the following disclaimer. 14REM * Redistributions in binary form must reproduce the above copyright 15REM notice, this list of conditions and the following disclaimer in the 16REM documentation and/or other materials provided with the distribution. 17REM * Neither the name of Knut Reinert or the FU Berlin nor the names of 18REM its contributors may be used to endorse or promote products derived 19REM from this software without specific prior written permission. 20REM 21REM THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22REM AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23REM IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24REM ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE 25REM FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26REM DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 27REM SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 28REM CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29REM LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30REM OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 31REM DAMAGE. 32REM 33REM ========================================================================== 34REM Author: Rene Rahn <rene.rahn@fu-berlin.de> 35REM ========================================================================== 36REM This script generates different test scenarios and runs the test mode of 37REM the corresponding program seqan_mingw_fix.exe. 38REM ========================================================================== 39 40REM Test structure generation tool 41 42REM create test path environment containing one path 43set currentDir=%~dp0 44echo %currentDir% 45 46mkdir %currentDir%test 47 48REM ### no eplicite test scenario necessary for 1st test case ### 49 50REM ### create test scenario for 2nd test case: one path 51mkdir %currentDir%test\test2 52echo "" > %currentDir%test\test2\sh.exe 53set PATH_TEST_2=%currentDir%test\test2 54REM ### 55 56REM ### create test scenario for 3rd test case: two paths, separated by ; 57mkdir %currentDir%test\test3 58mkdir %currentDir%test\test3\test3_a 59mkdir %currentDir%test\test3\test3_b 60 61echo "" > %currentDir%test\test3\test3_b\sh.exe 62set PATH_TEST_3=%currentDir%test\test3\test3_a;%currentDir%test\test3\test3_b 63REM ### 64 65REM ### create test scenario for 4th test case: two paths, leading ; 66mkdir %currentDir%test\test4 67mkdir %currentDir%test\test4\test4_a 68mkdir %currentDir%test\test4\test4_b 69 70echo "" > %currentDir%test\test4\test4_a\sh.exe 71set PATH_TEST_4=;%currentDir%test\test4\test4_a;%currentDir%test\test4\test4_b 72REM ### 73 74REM ### create test scenario for 5th test case: two paths, trailing ; 75mkdir %currentDir%test\test5 76mkdir %currentDir%test\test5\test5_a 77mkdir %currentDir%test\test5\test5_b 78 79echo "" > %currentDir%test\test5\test5_a\sh.exe 80set PATH_TEST_5=%currentDir%test\test5\test5_a;%currentDir%test\test5\test5_b; 81REM ### 82 83REM ### create test scenario for 6th test case: two paths, leading ; 84mkdir "%currentDir%test\test6" 85mkdir "%currentDir%test\test6\test6 a" 86mkdir "%currentDir%test\test6\test6_b" 87 88echo "" > "%currentDir%test\test6\test6 a\sh.exe" 89set PATH_TEST_6=%currentDir%test\test6\test6 a;%currentDir%test\test6\test6_b 90REM ### 91 92REM ### create test scenario for 7th test case: two paths, trailing ; 93mkdir %currentDir%test\test7 94mkdir %currentDir%test\test7\test7_a 95mkdir "%currentDir%test\test7\test7 b" 96 97echo "" > %currentDir%test\test7\test7_a\sh.exe 98set PATH_TEST_7=%currentDir%test\test7\test7_a;%currentDir%test\test7\test7 b 99REM ### 100 101REM ### create test scenario for 8th test case: path without \ 102mkdir %currentDir%test\test8 103mkdir %currentDir%test\test8\test8_a 104mkdir %currentDir%test\test8\test8_b 105 106echo "" > %currentDir%test\test8\test8_b\sh.exe 107set PATH_TEST_8=;%currentDir%test\test8\test8_a;PathWithoutBackslash;%currentDir%test\test8\test8_b 108REM ### 109 110REM call program in test mode and wait until it is finished. 111START /WAIT %currentDir%seqan_mingw_fix.exe -t %currentDir% 112 113REM remove test structures 114rmdir %currentDir%test /S /Q 115