Skip to content

Commit

Permalink
wa: Skip sql test in case -S argument is passed to the run.ps1
Browse files Browse the repository at this point in the history
Change-Id: I25bcb1300d2fc8e0486b538e7f71845cf1559e2b
  • Loading branch information
DavDiva committed Feb 12, 2025
1 parent 3406f9e commit 86cbbd3
Showing 1 changed file with 21 additions and 14 deletions.
35 changes: 21 additions & 14 deletions agents/wnx/run.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ $argOhm = $false
$argExt = $false
$argSql = $false
$argDetach = $false
$argSkipSqlTest = $false

$msbuild_exe = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" `
-latest `
Expand Down Expand Up @@ -58,19 +59,20 @@ function Write-Help() {
Write-Host "$name [arguments]"
Write-Host ""
Write-Host "Available arguments:"
Write-Host " -?, -h, --help display help and exit"
Write-Host " -A, --all shortcut to -B -C -O -T -M -E -Q: build, ctl, ohm, unit, msi, extensions, mk-sql"
Write-Host " --clean-all clean literally all, use with care"
Write-Host " --clean-artifacts clean artifacts"
Write-Host " -C, --ctl build controller"
Write-Host " -Q, --mk-sql build mk-sql"
Write-Host " -B, --build build agent"
Write-Host " -M, --msi build msi"
Write-Host " -O, --ohm build ohm"
Write-Host " -E, --extensions build extensions"
Write-Host " -T, --test run agent component tests using binary in repo_root/artefacts"
Write-Host " --detach detach USB before running"
Write-Host " --sign sign controller using Yubikey based Code Certificate"
Write-Host " -?, -h, --help display help and exit"
Write-Host " -A, --all shortcut to -B -C -O -T -M -E -Q: build, ctl, ohm, unit, msi, extensions, mk-sql"
Write-Host " --clean-all clean literally all, use with care"
Write-Host " --clean-artifacts clean artifacts"
Write-Host " -C, --ctl build controller"
Write-Host " -Q, --mk-sql build mk-sql"
Write-Host " -B, --build build agent"
Write-Host " -M, --msi build msi"
Write-Host " -O, --ohm build ohm"
Write-Host " -E, --extensions build extensions"
Write-Host " -T, --test run agent component tests using binary in repo_root/artefacts"
Write-Host " -S, --skip-mk-sql-test skip sql test to be able to build msi in case sql is not configured"
Write-Host " --detach detach USB before running"
Write-Host " --sign sign controller using Yubikey based Code Certificate"
Write-Host ""
Write-Host "Examples:"
Write-Host ""
Expand Down Expand Up @@ -98,6 +100,7 @@ else {
{ $("-Q", "--mk-sql") -contains $_ } { $argSql = $true }
{ $("-E", "--extensions") -contains $_ } { $argExt = $true }
{ $("-T", "--test") -contains $_ } { $argTest = $true }
{ $("-S", "--skip-mk-sql-test") -contains $_ } { $argSkipSqlTest = $true }
"--clean-all" { $argClean = $true; $argCleanArtifacts = $true }
"--clean-artifacts" { $argCleanArtifacts = $true }
"--detach" { $argDetach = $true }
Expand Down Expand Up @@ -546,7 +549,11 @@ try {
Clear-All
Build-Agent
Build-Package $argCtl "host/cmk-agent-ctl" "Controller"
Build-Package $argSql "host/mk-sql" "MK-SQL"
if ($argSkipSqlTest -ne $true) {
Build-Package $argSql "host/mk-sql" "MK-SQL"
} else {
Build-Package $argSql "host/mk-sql" "MK-SQL" --build
}
Build-Ohm
Build-Ext
Build-MSI
Expand Down

0 comments on commit 86cbbd3

Please sign in to comment.