@@ -11,17 +11,54 @@ task build_blake2, "Generate wrapper for BLAKE2 reference code":
1111 exec " nim r tools/ensure_env.nim -- --submodules --builddirs"
1212 exec " nim c -r nimAutoWrapper.nim testCRepos/repos/BLAKE2/ref/blake2.h testCRepos/builds/BLAKE2/blake2_wrapper.nim"
1313
14- task build_repos , " Generate wrappers for all test repos " :
14+ task build_openssl , " Build OpenSSL 3 and generate wrapper " :
1515 exec " nim r tools/ensure_env.nim -- --submodules --builddirs"
16- exec " nim c -r nimAutoWrapper.nim testCRepos/repos/tiny-AES-c/aes.h testCRepos/builds/tiny-AES-c/aes_wrapper.nim"
17- exec " nim c -r nimAutoWrapper.nim testCRepos/repos/BLAKE2/ref/blake2.h testCRepos/builds/BLAKE2/blake2_wrapper.nim"
16+ exec " nim r tools/build_openssl.nim"
17+ exec " nim c -r nimAutoWrapper.nim testCRepos/repos/openssl/include/openssl/sha.h testCRepos/builds/openssl/openssl_sha_wrapper.nim"
18+
19+ task build_libsodium, " Build libsodium and generate wrapper" :
20+ exec " nim r tools/ensure_env.nim -- --submodules --builddirs"
21+ exec " nim r tools/build_libsodium.nim"
22+ exec " nim r tools/prepare_libsodium_header.nim"
23+ exec " nim c -r nimAutoWrapper.nim testCRepos/builds/libsodium/sodium_combined.h testCRepos/builds/libsodium/libsodium_wrapper.nim"
24+
25+ task build_liboqs, " Build liboqs and generate wrapper" :
26+ exec " nim r tools/ensure_env.nim -- --submodules --builddirs"
27+ exec " nim r tools/build_liboqs.nim"
28+ exec " nim r tools/prepare_liboqs_header.nim"
29+ exec " nim c -r nimAutoWrapper.nim testCRepos/builds/liboqs/oqs_full_combined.h testCRepos/builds/liboqs/liboqs_wrapper.nim"
30+
31+ task build_c_repos_basic, " Build C test repos without OpenSSL" :
32+ exec " nim r tools/ensure_env.nim -- --submodules --builddirs"
33+ exec " nim r tools/build_libsodium.nim"
34+ exec " nim r tools/build_liboqs.nim"
35+
36+ task build_c_repos_all, " Build all C test repos" :
37+ exec " nim r tools/ensure_env.nim -- --submodules --builddirs"
38+ exec " nim r tools/build_openssl.nim"
39+ exec " nim r tools/build_libsodium.nim"
40+ exec " nim r tools/build_liboqs.nim"
41+
42+ task build_repos, " Generate wrappers for all test repos" :
43+ exec " nimble build_repos_basic"
44+
45+ task build_repos_basic, " Generate wrappers for test repos without OpenSSL" :
46+ exec " nimble build_aes"
47+ exec " nimble build_blake2"
48+ exec " nimble build_libsodium"
49+ exec " nimble build_liboqs"
50+
51+ task build_repos_all, " Generate wrappers for all test repos" :
52+ exec " nimble build_repos_basic"
53+ exec " nimble build_openssl"
1854
1955task setup, " Fetch submodules for test repos" :
2056 exec " nim r tools/ensure_env.nim -- --submodules"
2157
2258task start, " Fetch submodules and build test wrappers" :
2359 exec " nim r tools/ensure_env.nim -- --submodules --builddirs"
24- exec " nimble build_repos"
60+ exec " nimble build_c_repos_basic"
61+ exec " nimble build_repos_basic"
2562
2663task test_functionality, " Run tokenizer and utils tests" :
2764 exec " nim r tools/ensure_env.nim -- --submodules --builddirs"
@@ -30,14 +67,42 @@ task test_functionality, "Run tokenizer and utils tests":
3067
3168task test_realworld, " Run real-world wrapper tests" :
3269 exec " nim r tools/ensure_env.nim -- --submodules --builddirs"
33- exec " nimble build_repos"
70+ exec " nimble build_c_repos_basic"
71+ exec " nimble build_repos_basic"
72+ exec " nim c -r tests/realworld/tiny_aes_c_runner.nim"
73+ exec " nim c -r tests/realworld/blake2_ref_runner.nim"
74+ exec " nim c -r tests/realworld/libsodium_runner.nim"
75+ exec " nim c -r tests/realworld/liboqs_runner.nim"
76+
77+ task test_realworld_all, " Run all real-world wrapper tests" :
78+ exec " nim r tools/ensure_env.nim -- --submodules --builddirs"
79+ exec " nimble build_c_repos_all"
80+ exec " nimble build_repos_all"
3481 exec " nim c -r tests/realworld/tiny_aes_c_runner.nim"
3582 exec " nim c -r tests/realworld/blake2_ref_runner.nim"
83+ exec " nim c -r tests/realworld/openssl3_runner.nim"
84+ exec " nim c -r tests/realworld/libsodium_runner.nim"
85+ exec " nim c -r tests/realworld/liboqs_runner.nim"
3686
3787task test_all, " Run all tests" :
3888 exec " nim r tools/ensure_env.nim -- --submodules --builddirs"
39- exec " nimble build_repos"
89+ exec " nimble build_c_repos_basic"
90+ exec " nimble build_repos_basic"
91+ exec " nim c -r --path:. tests/functionality/test_tokenizer.nim"
92+ exec " nim c -r --path:. tests/functionality/test_utils.nim"
93+ exec " nim c -r tests/realworld/tiny_aes_c_runner.nim"
94+ exec " nim c -r tests/realworld/blake2_ref_runner.nim"
95+ exec " nim c -r tests/realworld/libsodium_runner.nim"
96+ exec " nim c -r tests/realworld/liboqs_runner.nim"
97+
98+ task test_all_full, " Run all tests including OpenSSL" :
99+ exec " nim r tools/ensure_env.nim -- --submodules --builddirs"
100+ exec " nimble build_c_repos_all"
101+ exec " nimble build_repos_all"
40102 exec " nim c -r --path:. tests/functionality/test_tokenizer.nim"
41103 exec " nim c -r --path:. tests/functionality/test_utils.nim"
42104 exec " nim c -r tests/realworld/tiny_aes_c_runner.nim"
43105 exec " nim c -r tests/realworld/blake2_ref_runner.nim"
106+ exec " nim c -r tests/realworld/openssl3_runner.nim"
107+ exec " nim c -r tests/realworld/libsodium_runner.nim"
108+ exec " nim c -r tests/realworld/liboqs_runner.nim"
0 commit comments