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