aboutsummaryrefslogtreecommitdiff
path: root/Module.Taskfile.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'Module.Taskfile.yaml')
-rw-r--r--Module.Taskfile.yaml34
1 files changed, 26 insertions, 8 deletions
diff --git a/Module.Taskfile.yaml b/Module.Taskfile.yaml
index f5906aa..db5f6dd 100644
--- a/Module.Taskfile.yaml
+++ b/Module.Taskfile.yaml
@@ -18,22 +18,40 @@ tasks:
- git reset --hard
- git remote update
- git pull origin {{ .BRANCH_NAME }} --verify-signatures
-
- #updates the project versions for all inlcuded .NET projects
- - dotnet-gitversion.exe /updateprojectfiles
test:
desc: 'Builds and runs noscrypt unit tests for vnbuild CI systems'
cmds:
- - cmd: task test -- -DNC_ENABLE_UTILS=ON
+ #ensure the debug library has been built for the current system before project tests are executed
+ - cmd: task build-debug -- -DNC_ENABLE_UTILS=ON
+ - task: test-dotnet
+
+ #runs the test suite inside wsl linux environment
+ - cmd: echo 'Running WSL tests {{ if eq OS "windows" }}TRUE{{ else }}FALSE{{ end }}'
+ silent: true
- cmd: wsl task test -- -DNC_ENABLE_UTILS=ON
- - cmd: wsl task memcheck
+ platforms: [ windows ]
-#called by build pipeline to build module
- build:
+ test-dotnet:
+ vars:
+ LIB_NAME: '{{ if eq OS "windows" }}noscrypt.dll{{ else }}libnoscrypt{{ end }}'
+ LIB_PATH: '{{ .USER_WORKING_DIR }}/build/{{ OS }}/{{ if eq OS "windows" }}debug/{{ end }}{{ .LIB_NAME }}'
+
cmds:
- - echo "building module {{.MODULE_NAME}}"
+ - cmd: echo "running tests for {{ .PROJECT_NAME }}"
+ silent: true
+ - cmd: dotnet test
+ {{ .CLI_ARGS }}
+ --logger "console;verbosity=detailed"
+ --framework {{ .FRAMEWORK | default "net8.0" }}
+ --configuration {{ .CONFIGURATION | default "Debug" }}
+ --environment VNLIB_SHARED_HEAP_DIAGNOSTICS="1"
+ --environment 'NOSCRYPT_DLL_PATH="{{ osClean .LIB_PATH }}"'
+#called by build pipeline to build module
+ build:
+ cmds: []
+
publish:
cmds:
#git archive in the module directory