Skip to content

Commit

Permalink
fix paths + add diagnostic output on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
Konrad Jamrozik committed Jan 9, 2023
1 parent d01f239 commit 846e620
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Describe "Platform Matrix nonSparse" -Tag "UnitTest", "nonsparse" {
$matrixJson = @'
{
"matrix": {
"$IMPORT": "./eng/common/scripts/job-matrix/tests/test-import-matrix.json",
"$IMPORT": "./matrix-generator/tests/test-import-matrix.json",
"TestField1": "test1"
},
"exclude": [ { "Baz": "importedBaz" } ]
Expand Down Expand Up @@ -130,7 +130,7 @@ Describe "Platform Matrix Import" -Tag "UnitTest", "import" {
$matrixJson = @'
{
"matrix": {
"$IMPORT": "./eng/common/scripts/job-matrix/tests/test-import-matrix.json"
"$IMPORT": "./matrix-generator/tests/test-import-matrix.json"
},
"include": [
{
Expand Down Expand Up @@ -173,7 +173,7 @@ Describe "Platform Matrix Import" -Tag "UnitTest", "import" {
$matrixJson = @'
{
"matrix": {
"$IMPORT": "./eng/common/scripts/job-matrix/tests/test-import-matrix.json",
"$IMPORT": "./matrix-generator/tests/test-import-matrix.json",
"TestField1": "test1",
"TestField2": "test2"
},
Expand Down Expand Up @@ -206,7 +206,7 @@ Describe "Platform Matrix Import" -Tag "UnitTest", "import" {
$matrixJson = @'
{
"matrix": {
"$IMPORT": "./eng/common/scripts/job-matrix/tests/test-import-matrix.json",
"$IMPORT": "./matrix-generator/tests/test-import-matrix.json",
"testField": [ "test1", "test2" ]
}
}
Expand Down Expand Up @@ -235,7 +235,7 @@ Describe "Platform Matrix Import" -Tag "UnitTest", "import" {
"importedBaz": "importedBazNameOverride"
},
"matrix": {
"$IMPORT": "./eng/common/scripts/job-matrix/tests/test-import-matrix.json",
"$IMPORT": "./matrix-generator/tests/test-import-matrix.json",
"testField": [ "test1", "test2" ]
}
}
Expand All @@ -251,7 +251,7 @@ Describe "Platform Matrix Import" -Tag "UnitTest", "import" {
$matrixJson = @'
{
"matrix": {
"$IMPORT": "./eng/common/scripts/job-matrix/tests/test-import-matrix.json",
"$IMPORT": "./matrix-generator/tests/test-import-matrix.json",
"testField1": [ "test11", "test12" ],
"testField2": [ "test21", "test22" ]
}
Expand Down Expand Up @@ -299,7 +299,7 @@ Describe "Platform Matrix Import" -Tag "UnitTest", "import" {
$matrixJson = @'
{
"matrix": {
"$IMPORT": "./eng/common/scripts/job-matrix/tests/test-import-matrix.json",
"$IMPORT": "./matrix-generator/tests/test-import-matrix.json",
"testField": [ "test1", "test2", "test3" ],
},
"include": [
Expand Down Expand Up @@ -364,7 +364,7 @@ Describe "Platform Matrix Import" -Tag "UnitTest", "import" {
$matrixJson = @'
{
"matrix": {
"$IMPORT": "./eng/common/scripts/job-matrix/tests/test-import-matrix.json",
"$IMPORT": "./matrix-generator/tests/test-import-matrix.json",
"Foo": [ "fooOverride1", "fooOverride2" ],
}
}
Expand Down Expand Up @@ -450,7 +450,7 @@ Describe "Platform Matrix Replace" -Tag "UnitTest", "replace" {
$matrixJson = @'
{
"matrix": {
"$IMPORT": "./eng/common/scripts/job-matrix/tests/test-import-matrix.json",
"$IMPORT": "./matrix-generator/tests/test-import-matrix.json",
"testField": [ "test1", "test2" ]
}
}
Expand Down Expand Up @@ -550,7 +550,7 @@ Describe "Platform Matrix Replace" -Tag "UnitTest", "replace" {
"replaceme": ""
},
"matrix": {
"$IMPORT": "./eng/common/scripts/job-matrix/tests/test-import-matrix.json",
"$IMPORT": "./matrix-generator/tests/test-import-matrix.json",
"replaceme": "replaceme"
}
}
Expand Down
2 changes: 1 addition & 1 deletion eng/common/scripts/job-matrix/job-matrix-functions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ function ProcessImport([MatrixParameter[]]$matrix, [String]$selection, [Array]$n
}

if (!(Test-Path $importPath)) {
Write-Error "`$IMPORT path '$importPath' does not exist."
Write-Error "`$IMPORT path '$importPath' does not exist. Current dir: $(Get-Location)"
exit 1
}
$importedMatrixConfig = GetMatrixConfigFromFile (Get-Content -Raw $importPath)
Expand Down

0 comments on commit 846e620

Please sign in to comment.