Commit a9183e5
[tests] fix AndroidUpdateResourcesTest.Issue2205 on Windows (#2281)
Context: http://build.devdiv.io/2098745
The `AndroidUpdateResourcesTest.Issue2205()` test is failing on
Windows with:
Error message
System.ArgumentException : Illegal characters in path.
Stack trace
at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)
at System.IO.Path.Combine(String path1, String path2)
at Xamarin.ProjectTools.XamarinProject.UpdateProjectFiles(String directory, IEnumerable`1 projectFiles, Boolean doNotCleanup)
at Xamarin.ProjectTools.XamarinProject.Populate(String directory, IEnumerable`1 projectFiles)
at Xamarin.ProjectTools.ProjectBuilder.Save(XamarinProject project, Boolean doNotCleanupOnUpdate, Boolean saveProject)
at Xamarin.ProjectTools.ProjectBuilder.Build(XamarinProject project, Boolean doNotCleanupOnUpdate, String[] parameters, Boolean saveProject, Dictionary`2 environmentVariables)
at Xamarin.Android.Build.Tests.AndroidUpdateResourcesTest.Issue2205(Boolean useAapt2)
Looking at the test, the `@(GoogleServicesJson)` build item was
declaring JSON string contents as a filename. Whoops!
I guess that macOS was OK with a JSON filename, as the JSON contents
didn't contain a `/`, while Windows was certainly not, as the JSON
string contained `:`.
I changed the `BuildItem` to use the `TextContent` property, and used
a filename of `googleservices.json`. I also let VS format the method,
so it matches our code formatting standards.1 parent 608d950 commit a9183e5
File tree
1 file changed
+28
-27
lines changed- src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests
1 file changed
+28
-27
lines changedLines changed: 28 additions & 27 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1412 | 1412 | | |
1413 | 1413 | | |
1414 | 1414 | | |
1415 | | - | |
| 1415 | + | |
1416 | 1416 | | |
1417 | | - | |
1418 | | - | |
1419 | | - | |
1420 | | - | |
1421 | | - | |
1422 | | - | |
1423 | | - | |
1424 | | - | |
1425 | | - | |
1426 | | - | |
1427 | | - | |
1428 | | - | |
1429 | | - | |
1430 | | - | |
1431 | | - | |
1432 | | - | |
1433 | | - | |
1434 | | - | |
1435 | | - | |
1436 | | - | |
1437 | | - | |
1438 | | - | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
| 1436 | + | |
| 1437 | + | |
| 1438 | + | |
| 1439 | + | |
1439 | 1440 | | |
1440 | 1441 | | |
1441 | 1442 | | |
| |||
1474 | 1475 | | |
1475 | 1476 | | |
1476 | 1477 | | |
1477 | | - | |
1478 | | - | |
1479 | | - | |
1480 | | - | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
1481 | 1482 | | |
1482 | 1483 | | |
1483 | 1484 | | |
| |||
0 commit comments