diff options
author | Don <don.j.olmstead@gmail.com> | 2018-03-20 15:55:41 -0700 |
---|---|---|
committer | Don <don.j.olmstead@gmail.com> | 2018-03-20 16:44:41 -0700 |
commit | 644c1097a8402d170603f5a0ff17efb37360dac7 (patch) | |
tree | 473b3aae687b1aa1a30bd68559035162bc0600cc /tests/testenc.bat | |
parent | 0263e69a9346e2a3c3bcbbed8f12a9749da63900 (diff) | |
download | portable-644c1097a8402d170603f5a0ff17efb37360dac7.tar.gz portable-644c1097a8402d170603f5a0ff17efb37360dac7.tar.bz2 portable-644c1097a8402d170603f5a0ff17efb37360dac7.zip |
Fix Windows tests within CMake
Diffstat (limited to 'tests/testenc.bat')
-rw-r--r-- | tests/testenc.bat | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/testenc.bat b/tests/testenc.bat index a925ec3..93dfc0c 100644 --- a/tests/testenc.bat +++ b/tests/testenc.bat | |||
@@ -3,16 +3,16 @@ setlocal enabledelayedexpansion | |||
3 | REM testenc.bat | 3 | REM testenc.bat |
4 | 4 | ||
5 | set test=p | 5 | set test=p |
6 | set cmd=..\apps\openssl\Debug\openssl.exe | ||
7 | if not exist %cmd% exit /b 1 | ||
8 | 6 | ||
9 | set srcdir=..\..\tests | 7 | set openssl_bin=%1 |
8 | set openssl_bin=%openssl_bin:/=\% | ||
9 | if not exist %openssl_bin% exit /b 1 | ||
10 | 10 | ||
11 | copy %srcdir%\openssl.cnf %test% | 11 | copy %srcdir%\openssl.cnf %test% |
12 | 12 | ||
13 | echo cat | 13 | echo cat |
14 | %cmd% enc -in %test% -out %test%.cipher | 14 | %openssl_bin% enc -in %test% -out %test%.cipher |
15 | %cmd% enc -in %test%.cipher -out %test%.clear | 15 | %openssl_bin% enc -in %test%.cipher -out %test%.clear |
16 | fc /b %test% %test%.clear | 16 | fc /b %test% %test%.clear |
17 | if !errorlevel! neq 0 ( | 17 | if !errorlevel! neq 0 ( |
18 | exit /b 1 | 18 | exit /b 1 |
@@ -21,8 +21,8 @@ if !errorlevel! neq 0 ( | |||
21 | ) | 21 | ) |
22 | 22 | ||
23 | echo base64 | 23 | echo base64 |
24 | %cmd% enc -a -e -in %test% -out %test%.cipher | 24 | %openssl_bin% enc -a -e -in %test% -out %test%.cipher |
25 | %cmd% enc -a -d -in %test%.cipher -out %test%.clear | 25 | %openssl_bin% enc -a -d -in %test%.cipher -out %test%.clear |
26 | fc /b %test% %test%.clear | 26 | fc /b %test% %test%.clear |
27 | if !errorlevel! neq 0 ( | 27 | if !errorlevel! neq 0 ( |
28 | exit /b 1 | 28 | exit /b 1 |
@@ -45,8 +45,8 @@ for %%i in ( | |||
45 | rc4 rc4-40 | 45 | rc4 rc4-40 |
46 | ) do ( | 46 | ) do ( |
47 | echo %%i | 47 | echo %%i |
48 | %cmd% %%i -e -k test -in %test% -out %test%.%%i.cipher | 48 | %openssl_bin% %%i -e -k test -in %test% -out %test%.%%i.cipher |
49 | %cmd% %%i -d -k test -in %test%.%%i.cipher -out %test%.%%i.clear | 49 | %openssl_bin% %%i -d -k test -in %test%.%%i.cipher -out %test%.%%i.clear |
50 | fc /b %test% %test%.%%i.clear | 50 | fc /b %test% %test%.%%i.clear |
51 | if !errorlevel! neq 0 ( | 51 | if !errorlevel! neq 0 ( |
52 | exit /b 1 | 52 | exit /b 1 |
@@ -55,8 +55,8 @@ for %%i in ( | |||
55 | ) | 55 | ) |
56 | 56 | ||
57 | echo %%i base64 | 57 | echo %%i base64 |
58 | %cmd% %%i -a -e -k test -in %test% -out %test%.%%i.cipher | 58 | %openssl_bin% %%i -a -e -k test -in %test% -out %test%.%%i.cipher |
59 | %cmd% %%i -a -d -k test -in %test%.%%i.cipher -out %test%.%%i.clear | 59 | %openssl_bin% %%i -a -d -k test -in %test%.%%i.cipher -out %test%.%%i.clear |
60 | fc /b %test% %test%.%%i.clear | 60 | fc /b %test% %test%.%%i.clear |
61 | if !errorlevel! neq 0 ( | 61 | if !errorlevel! neq 0 ( |
62 | exit /b 1 | 62 | exit /b 1 |