System.Data.SQLite
Check-in [095c172f52]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add unit testing wrapper tool capable of testing multiple sets of binaries. Also, update all batch tools to reset the error level prior to checking it.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 095c172f5243dff475f6bca8e6bd7c1447f424ee
User & Date: mistachkin 2011-10-04 10:20:02
Context
2011-10-04
11:29
Update downloads page for version 1.0.76.0. check-in: dde757a625 user: mistachkin tags: trunk, release
10:20
Add unit testing wrapper tool capable of testing multiple sets of binaries. Also, update all batch tools to reset the error level prior to checking it. check-in: 095c172f52 user: mistachkin tags: trunk
09:15
Only add the vendor-specific package path to the process environment once. Also, remove unnecessary test constraints from the test for ticket [0d5b1ef362]. check-in: f502c8b48f user: mistachkin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to Setup/bake_all.bat.

    18     18   
    19     19   %_AECHO% Running %0 %*
    20     20   
    21     21   SET TOOLS=%~dp0
    22     22   SET TOOLS=%TOOLS:~0,-1%
    23     23   
    24     24   %_VECHO% Tools = '%TOOLS%'
           25  +
           26  +CALL :fn_ResetErrorLevel
    25     27   
    26     28   %_ECHO% CALL "%TOOLS%\vsSp.bat"
    27     29   
    28     30   IF ERRORLEVEL 1 (
    29     31     ECHO Could not detect Visual Studio.
    30     32     GOTO errors
    31     33   )

Changes to Setup/build_all.bat.

    18     18   
    19     19   %_AECHO% Running %0 %*
    20     20   
    21     21   SET TOOLS=%~dp0
    22     22   SET TOOLS=%TOOLS:~0,-1%
    23     23   
    24     24   %_VECHO% Tools = '%TOOLS%'
           25  +
           26  +CALL :fn_ResetErrorLevel
    25     27   
    26     28   %_ECHO% CALL "%TOOLS%\vsSp.bat"
    27     29   
    28     30   IF ERRORLEVEL 1 (
    29     31     ECHO Could not detect Visual Studio.
    30     32     GOTO errors
    31     33   )

Changes to Setup/build_ce.bat.

    25     25   
    26     26   SET BUILD_CONFIGURATIONS=Release
    27     27   SET BASE_CONFIGURATIONSUFFIX=Compact
    28     28   SET PLATFORMS="Pocket PC 2003 (ARMV4)"
    29     29   SET PROCESSORS=arm
    30     30   SET YEARS=2008
    31     31   SET BASE_PLATFORM=PocketPC
           32  +
           33  +CALL :fn_ResetErrorLevel
    32     34   
    33     35   %_ECHO% CALL "%TOOLS%\build_all.bat"
    34     36   
    35     37   IF ERRORLEVEL 1 (
    36     38     ECHO Failed to build PocketPC binaries.
    37     39     GOTO errors
    38     40   )

Changes to Setup/release.bat.

    75     75       SET TYPE=%TYPE_PREFIX%binary-bundle
    76     76     ) ELSE (
    77     77       SET TYPE=%TYPE_PREFIX%binary
    78     78     )
    79     79   )
    80     80   
    81     81   %_VECHO% Type = '%TYPE%'
           82  +
           83  +CALL :fn_ResetErrorLevel
    82     84   
    83     85   %_ECHO% CALL "%TOOLS%\set_common.bat"
    84     86   
    85     87   IF ERRORLEVEL 1 (
    86     88     ECHO Could not set common variables.
    87     89     GOTO errors
    88     90   )

Changes to Setup/release_all.bat.

    18     18   
    19     19   %_AECHO% Running %0 %*
    20     20   
    21     21   SET TOOLS=%~dp0
    22     22   SET TOOLS=%TOOLS:~0,-1%
    23     23   
    24     24   %_VECHO% Tools = '%TOOLS%'
           25  +
           26  +CALL :fn_ResetErrorLevel
    25     27   
    26     28   %_ECHO% CALL "%TOOLS%\vsSp.bat"
    27     29   
    28     30   IF ERRORLEVEL 1 (
    29     31     ECHO Could not detect Visual Studio.
    30     32     GOTO errors
    31     33   )

Changes to Setup/release_ce.bat.

    26     26   SET RELEASE_CONFIGURATIONS=Release
    27     27   SET BASE_CONFIGURATIONSUFFIX=Compact
    28     28   SET PLATFORMS="Pocket PC 2003 (ARMV4)"
    29     29   SET PROCESSORS=arm
    30     30   SET YEARS=2008
    31     31   SET BASE_PLATFORM=PocketPC
    32     32   SET TYPE=binary
           33  +
           34  +CALL :fn_ResetErrorLevel
    33     35   
    34     36   %_ECHO% CALL "%TOOLS%\release_all.bat"
    35     37   
    36     38   IF ERRORLEVEL 1 (
    37     39     ECHO Failed to build PocketPC release files.
    38     40     GOTO errors
    39     41   )

Changes to Setup/release_static.bat.

    21     21   SET TOOLS=%~dp0
    22     22   SET TOOLS=%TOOLS:~0,-1%
    23     23   
    24     24   %_VECHO% Tools = '%TOOLS%'
    25     25   
    26     26   SET CONFIGURATIONSUFFIX=Static
    27     27   SET TYPE_PREFIX=static-
           28  +
           29  +CALL :fn_ResetErrorLevel
    28     30   
    29     31   %_ECHO% CALL "%TOOLS%\release_all.bat"
    30     32   
    31     33   IF ERRORLEVEL 1 (
    32     34     ECHO Failed to build static release files.
    33     35     GOTO errors
    34     36   )

Added Setup/test_all.bat.

            1  +@ECHO OFF
            2  +
            3  +::
            4  +:: test_all.bat --
            5  +::
            6  +:: Multiplexing Wrapper Tool for Unit Tests
            7  +::
            8  +:: Written by Joe Mistachkin.
            9  +:: Released to the public domain, use at your own risk!
           10  +::
           11  +
           12  +SETLOCAL
           13  +
           14  +REM SET _ECHO=ECHO
           15  +IF NOT DEFINED _AECHO (SET _AECHO=REM)
           16  +IF NOT DEFINED _CECHO (SET _CECHO=REM)
           17  +IF NOT DEFINED _VECHO (SET _VECHO=REM)
           18  +
           19  +%_AECHO% Running %0 %*
           20  +
           21  +SET DUMMY2=%1
           22  +
           23  +IF DEFINED DUMMY2 (
           24  +  GOTO usage
           25  +)
           26  +
           27  +REM SET DFLAGS=/L
           28  +
           29  +%_VECHO% DFlags = '%DFLAGS%'
           30  +
           31  +SET FFLAGS=/V /F /G /H /I /R /Y /Z
           32  +
           33  +%_VECHO% FFlags = '%FFLAGS%'
           34  +
           35  +SET ROOT=%~dp0\..
           36  +SET ROOT=%ROOT:\\=\%
           37  +
           38  +%_VECHO% Root = '%ROOT%'
           39  +
           40  +SET TOOLS=%~dp0
           41  +SET TOOLS=%TOOLS:~0,-1%
           42  +
           43  +%_VECHO% Tools = '%TOOLS%'
           44  +
           45  +CALL :fn_ResetErrorLevel
           46  +
           47  +%_ECHO% CALL "%TOOLS%\vsSp.bat"
           48  +
           49  +IF ERRORLEVEL 1 (
           50  +  ECHO Could not detect Visual Studio.
           51  +  GOTO errors
           52  +)
           53  +
           54  +%_ECHO% CALL "%TOOLS%\set_common.bat"
           55  +
           56  +IF ERRORLEVEL 1 (
           57  +  ECHO Could not set common variables.
           58  +  GOTO errors
           59  +)
           60  +
           61  +IF NOT DEFINED YEARS (
           62  +  SET YEARS=2008
           63  +)
           64  +
           65  +%_VECHO% Years = '%YEARS%'
           66  +
           67  +IF "%PROCESSOR_ARCHITECTURE%" == "x86" (
           68  +  SET PLATFORM=Win32
           69  +)
           70  +
           71  +IF "%PROCESSOR_ARCHITECTURE%" == "amd64" (
           72  +  SET PLATFORM=x64
           73  +)
           74  +
           75  +IF NOT DEFINED PLATFORM (
           76  +  ECHO Unsupported platform.
           77  +  GOTO errors
           78  +)
           79  +
           80  +%_VECHO% Platform = '%PLATFORM%'
           81  +
           82  +%_ECHO% PUSHD "%ROOT%"
           83  +
           84  +IF ERRORLEVEL 1 (
           85  +  ECHO Could not change directory to "%ROOT%".
           86  +  GOTO errors
           87  +)
           88  +
           89  +FOR %%Y IN (%YEARS%) DO (
           90  +  %_ECHO% Externals\Eagle\bin\EagleShell.exe -preInitialize "set test_year {%%Y}" -file Tests\all.eagle
           91  +
           92  +  IF ERRORLEVEL 1 (
           93  +    ECHO Testing of "%%Y" managed-only assembly failed.
           94  +    GOTO errors
           95  +  )
           96  +
           97  +  %_ECHO% XCOPY "bin\%%Y\Release\bin\test.*" "bin\%%Y\%PLATFORM%\Release" %FFLAGS% %DFLAGS%
           98  +
           99  +  IF ERRORLEVEL 1 (
          100  +    ECHO Failed to copy "bin\%%Y\Release\bin\test.*" to "bin\%%Y\%PLATFORM%\Release".
          101  +    GOTO errors
          102  +  )
          103  +
          104  +  %_ECHO% XCOPY "bin\%%Y\Release\bin\System.Data.SQLite.Linq.*" "bin\%%Y\%PLATFORM%\Release" %FFLAGS% %DFLAGS%
          105  +
          106  +  IF ERRORLEVEL 1 (
          107  +    ECHO Failed to copy "bin\%%Y\Release\bin\System.Data.SQLite.Linq.*" to "bin\%%Y\%PLATFORM%\Release".
          108  +    GOTO errors
          109  +  )
          110  +
          111  +  %_ECHO% XCOPY "bin\%%Y\Release\bin\testlinq.*" "bin\%%Y\%PLATFORM%\Release" %FFLAGS% %DFLAGS%
          112  +
          113  +  IF ERRORLEVEL 1 (
          114  +    ECHO Failed to copy "bin\%%Y\Release\bin\testlinq.*" to "bin\%%Y\%PLATFORM%\Release".
          115  +    GOTO errors
          116  +  )
          117  +
          118  +  %_ECHO% XCOPY "bin\%%Y\Release\bin\northwindEF.db" "bin\%%Y\%PLATFORM%\Release" %FFLAGS% %DFLAGS%
          119  +
          120  +  IF ERRORLEVEL 1 (
          121  +    ECHO Failed to copy "bin\%%Y\Release\bin\northwindEF.db" to "bin\%%Y\%PLATFORM%\Release".
          122  +    GOTO errors
          123  +  )
          124  +
          125  +  %_ECHO% Externals\Eagle\bin\EagleShell.exe -preInitialize "set test_year {%%Y}" -initialize -runtimeOption native -file Tests\all.eagle
          126  +
          127  +  IF ERRORLEVEL 1 (
          128  +    ECHO Testing of "%%Y" mixed-mode assembly failed.
          129  +    GOTO errors
          130  +  )
          131  +)
          132  +
          133  +%_ECHO% POPD
          134  +
          135  +IF ERRORLEVEL 1 (
          136  +  ECHO Could not restore directory.
          137  +  GOTO errors
          138  +)
          139  +
          140  +GOTO no_errors
          141  +
          142  +:fn_ResetErrorLevel
          143  +  VERIFY > NUL
          144  +  GOTO :EOF
          145  +
          146  +:fn_SetErrorLevel
          147  +  VERIFY MAYBE 2> NUL
          148  +  GOTO :EOF
          149  +
          150  +:usage
          151  +  ECHO.
          152  +  ECHO Usage: %~nx0
          153  +  GOTO errors
          154  +
          155  +:errors
          156  +  CALL :fn_SetErrorLevel
          157  +  ENDLOCAL
          158  +  ECHO.
          159  +  ECHO Test failure, errors were encountered.
          160  +  GOTO end_of_file
          161  +
          162  +:no_errors
          163  +  CALL :fn_ResetErrorLevel
          164  +  ENDLOCAL
          165  +  ECHO.
          166  +  ECHO Test success, no errors were encountered.
          167  +  GOTO end_of_file
          168  +
          169  +:end_of_file
          170  +%_ECHO% EXIT /B %ERRORLEVEL%