cpy_tests.bat 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. @echo off
  2. rem Batch file to copy OpenSSL stuff to a NetWare server for testing
  3. rem This batch file will create an "opensssl" directory at the root of the
  4. rem specified NetWare drive and copy the required files to run the tests.
  5. rem It should be run from inside the "openssl\netware" subdirectory.
  6. rem Usage:
  7. rem cpy_tests.bat <test subdirectory> <NetWare drive>
  8. rem <test subdirectory> - out_nw.dbg | out_nw
  9. rem <NetWare drive> - any mapped drive letter
  10. rem
  11. rem example ( copy from debug build to m: dirve ):
  12. rem cpy_tests.bat out_nw.dbg m:
  13. rem
  14. rem CAUTION: If a directory named OpenSSL exists on the target drive
  15. rem it will be deleted first.
  16. if "%1" == "" goto usage
  17. if "%2" == "" goto usage
  18. rem Assume running in \openssl directory unless cpy_tests.bat exists then
  19. rem it must be the \openssl\netware directory
  20. set loc=.
  21. if exist cpy_tests.bat set loc=..
  22. rem make sure the local build subdirectory specified is valid
  23. if not exist %loc%\%1\NUL goto invalid_dir
  24. rem make sure target drive is valid
  25. if not exist %2\NUL goto invalid_drive
  26. rem If an OpenSSL directory exists on the target drive, remove it
  27. if exist %2\openssl\NUL goto remove_openssl
  28. goto do_copy
  29. :remove_openssl
  30. echo .
  31. echo OpenSSL directory exists on %2 - it will be removed!
  32. pause
  33. rmdir %2\openssl /s /q
  34. :do_copy
  35. rem make an "openssl" directory and others at the root of the NetWare drive
  36. mkdir %2\openssl
  37. mkdir %2\openssl\test_out
  38. mkdir %2\openssl\apps
  39. mkdir %2\openssl\certs
  40. mkdir %2\openssl\test
  41. rem copy the test nlms
  42. copy %loc%\%1\*.nlm %2\openssl\
  43. rem copy the test perl script
  44. copy %loc%\netware\do_tests.pl %2\openssl\
  45. rem copy the certs directory stuff
  46. xcopy %loc%\certs\*.* %2\openssl\certs\ /s
  47. rem copy the test directory stuff
  48. copy %loc%\test\CAss.cnf %2\openssl\test\
  49. copy %loc%\test\Uss.cnf %2\openssl\test\
  50. copy %loc%\test\pkcs7.pem %2\openssl\test\
  51. copy %loc%\test\pkcs7-1.pem %2\openssl\test\
  52. copy %loc%\test\testcrl.pem %2\openssl\test\
  53. copy %loc%\test\testp7.pem %2\openssl\test\
  54. copy %loc%\test\testreq2.pem %2\openssl\test\
  55. copy %loc%\test\testrsa.pem %2\openssl\test\
  56. copy %loc%\test\testsid.pem %2\openssl\test\
  57. copy %loc%\test\testx509.pem %2\openssl\test\
  58. copy %loc%\test\v3-cert1.pem %2\openssl\test\
  59. copy %loc%\test\v3-cert2.pem %2\openssl\test\
  60. copy %loc%\crypto\evp\evptests.txt %2\openssl\test\
  61. rem copy the apps directory stuff
  62. copy %loc%\apps\client.pem %2\openssl\apps\
  63. copy %loc%\apps\server.pem %2\openssl\apps\
  64. copy %loc%\apps\openssl.cnf %2\openssl\apps\
  65. echo .
  66. echo Tests copied
  67. echo Run the test script at the console by typing:
  68. echo "Perl \openssl\do_tests.pl"
  69. echo .
  70. echo Make sure the Search path includes the OpenSSL subdirectory
  71. goto end
  72. :invalid_dir
  73. echo.
  74. echo Invalid build directory specified: %1
  75. echo.
  76. goto usage
  77. :invalid_drive
  78. echo.
  79. echo Invalid drive: %2
  80. echo.
  81. goto usage
  82. :usage
  83. echo.
  84. echo usage: cpy_tests.bat [test subdirectory] [NetWare drive]
  85. echo [test subdirectory] - out_nw_clib.dbg, out_nw_libc.dbg, etc.
  86. echo [NetWare drive] - any mapped drive letter
  87. echo.
  88. echo example: cpy_test out_nw_clib.dbg M:
  89. echo (copy from clib debug build area to M: drive)
  90. :end