Skip to content

Commit

Permalink
ci: run windows tests
Browse files Browse the repository at this point in the history
  • Loading branch information
res0nance committed Sep 20, 2023
1 parent 122d838 commit 32cb587
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,8 @@ jobs:
run: cmake -B build --toolchain ${{ matrix.toolchain }} .
- name: Build Project
run: cmake --build build
- name: Test dependencies
run: pip.exe install pytest pytest-xdist pyyaml
- name: Run tests
run: |
python -m pytest --numprocesses=auto -vv --maxfail=10 --ignore=tests/test_code_conventions.py --junitxml=build\test-results\pytest\test-results.xml
3 changes: 3 additions & 0 deletions tests/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ def path_to_executable(program_name):
if 'APPVEYOR_BUILD_FOLDER' not in os.environ: os.environ['APPVEYOR_BUILD_FOLDER'] = "."
path = os.path.join(path, os.environ['APPVEYOR_BUILD_FOLDER'])
path = os.path.join(path, get_current_build_dir_name(), "tests")
if sys.platform.startswith("win"):
if 'GITHUB_ACTIONS' in os.environ:
path = os.path.join(path, "Debug")
for executable in [
os.path.join(path, program_name),
os.path.join(path, program_name + ".EXE"),
Expand Down
10 changes: 9 additions & 1 deletion tests/tmp_store.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,19 @@
#define MAXPATHLEN 128

#if (defined(_WIN32) || defined(__WIN32__))
#define mkdir(A, B) mkdir(A)
#include <windows.h>
#endif

static OQS_STATUS oqs_fstore_init(void) {
#ifndef _WIN32
return mkdir(OQS_STORE_DIR, 0755);
#else
if (CreateDirectory(OQS_STORE_DIR, NULL)) {
return OQS_SUCCESS;
} else {
return OQS_ERROR;
}
#endif
}

static OQS_STATUS oqs_fstore(const char *fname, const char *mname, uint8_t *data, size_t len) {
Expand Down

0 comments on commit 32cb587

Please sign in to comment.