-
Notifications
You must be signed in to change notification settings - Fork 564
[Xamarin.Android.Build.Tests] Fix up an Error in the Designer Tests #807
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We made an assumption when the test was written that the old Resource.designer.cs was going to be deleted in projects when using `$(AndroidUseIntermediateDesignerFile)`. The decision was changed so it would jsut be ignored. So the existing check that is should not exist was wrong. That said it did not fail because we did not include the `Root` proeprty in the path so it always passed because that file did not exist in the location we were checking. The change to nunit3 changed that as because of the way the working directory is set that check now failed. Because the old incorrect path was not correct.. doh. So a better check is to make sure that the old file is just emtpy. We almost empty since the the project tools write the file we end up with a Unicode marker. We also update the XamarinAndroidApplicationProject so that we can override the `$(EmbedAssembliesIntoApk)`. This is required for various unit tests. The way it currently worked was that no matter what you set.. you always got the default. This worked for the OSS repo as we don't use the shared-runtime. But for the monodroid stuff, we need to be able to change that value. This was stopping the test projects doing that.
b5b25d3 to
eb6790f
Compare
jonpryor
reviewed
Sep 1, 2017
| "Resource.designer" + proj.Language.DefaultDesignerExtension)), | ||
| "{0} should not exists", designer); | ||
| var fi = new FileInfo (Path.Combine (Root, b.ProjectDirectory, designer)); | ||
| Assert.IsFalse (fi.Length > 3, |
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The designer file won't/can't contain <UTF-8 BOM><newline>? 5 might be a safer value, but new[]{0xef, 0xbb, 0xbf, 0x0d, 0x0a}.Length might be a more understandable value.
jonpryor
added a commit
to jonpryor/xamarin-android
that referenced
this pull request
Mar 18, 2021
Fixes: dotnet/java-interop#790 Changes: dotnet/java-interop@bba1f07...3824b97 * dotnet/java-interop@3824b974: [java-interop] Windows build system support (dotnet#816) * dotnet/java-interop@94c0c709: Bump to xamarin/xamarin-android-tools/main@554d45a (dotnet#813) * dotnet/java-interop@5c756b14: [Java.Interop-PerformanceTests] Support .NET Core 3.1 (dotnet#808) * dotnet/java-interop@daec07b6: [build] Fix various warnings (dotnet#812) * dotnet/java-interop@678c4bd2: [class-parse, generator] Allow showing Kotlin internals via metadata (dotnet#793) * dotnet/java-interop@cd4c8f80: [jnienv-gen] Generate a header file for the native functions (dotnet#809) * dotnet/java-interop@69767c1a: [param-name-importer] Fix NSE when updating JavaApi.AllPackages (dotnet#807) * dotnet/java-interop@a666a6f9: [Java.Runtime.Environment] Partial support for .NET Core (dotnet#804)
jonpryor
added a commit
to jonpryor/xamarin-android
that referenced
this pull request
Mar 18, 2021
Fixes: dotnet/java-interop#790 Changes: dotnet/java-interop@bba1f07...3824b97 * dotnet/java-interop@3824b974: [java-interop] Windows build system support (dotnet#816) * dotnet/java-interop@94c0c709: Bump to xamarin/xamarin-android-tools/main@554d45a (dotnet#813) * dotnet/java-interop@5c756b14: [Java.Interop-PerformanceTests] Support .NET Core 3.1 (dotnet#808) * dotnet/java-interop@daec07b6: [build] Fix various warnings (dotnet#812) * dotnet/java-interop@678c4bd2: [class-parse, generator] Allow showing Kotlin internals via metadata (dotnet#793) * dotnet/java-interop@cd4c8f80: [jnienv-gen] Generate a header file for the native functions (dotnet#809) * dotnet/java-interop@69767c1a: [param-name-importer] Fix NSE when updating JavaApi.AllPackages (dotnet#807) * dotnet/java-interop@a666a6f9: [Java.Runtime.Environment] Partial support for .NET Core (dotnet#804) Note: dotnet/java-interop@3824b974 updated Java.Interop/src/java-interop to use `_WINDOWS`, not `WINDOWS`. Define `_WINDOWS` when building for Windows as well.
jonpryor
added a commit
to jonpryor/xamarin-android
that referenced
this pull request
Mar 18, 2021
Fixes: dotnet/java-interop#790 Changes: dotnet/java-interop@bba1f07...3824b97 * dotnet/java-interop@3824b974: [java-interop] Windows build system support (dotnet#816) * dotnet/java-interop@94c0c709: Bump to xamarin/xamarin-android-tools/main@554d45a (dotnet#813) * dotnet/java-interop@5c756b14: [Java.Interop-PerformanceTests] Support .NET Core 3.1 (dotnet#808) * dotnet/java-interop@daec07b6: [build] Fix various warnings (dotnet#812) * dotnet/java-interop@678c4bd2: [class-parse, generator] Allow showing Kotlin internals via metadata (dotnet#793) * dotnet/java-interop@cd4c8f80: [jnienv-gen] Generate a header file for the native functions (dotnet#809) * dotnet/java-interop@69767c1a: [param-name-importer] Fix NSE when updating JavaApi.AllPackages (dotnet#807) * dotnet/java-interop@a666a6f9: [Java.Runtime.Environment] Partial support for .NET Core (dotnet#804) Note: dotnet/java-interop@3824b974 updated Java.Interop/src/java-interop to use `_WINDOWS`, not `WINDOWS`. Define `_WINDOWS` when building for Windows as well.
jonpryor
added a commit
to jonpryor/xamarin-android
that referenced
this pull request
Mar 18, 2021
Fixes: dotnet/java-interop#790 Changes: dotnet/java-interop@bba1f07...3824b97 * dotnet/java-interop@3824b974: [java-interop] Windows build system support (dotnet#816) * dotnet/java-interop@94c0c709: Bump to xamarin/xamarin-android-tools/main@554d45a (dotnet#813) * dotnet/java-interop@5c756b14: [Java.Interop-PerformanceTests] Support .NET Core 3.1 (dotnet#808) * dotnet/java-interop@daec07b6: [build] Fix various warnings (dotnet#812) * dotnet/java-interop@678c4bd2: [class-parse, generator] Allow showing Kotlin internals via metadata (dotnet#793) * dotnet/java-interop@cd4c8f80: [jnienv-gen] Generate a header file for the native functions (dotnet#809) * dotnet/java-interop@69767c1a: [param-name-importer] Fix NSE when updating JavaApi.AllPackages (dotnet#807) * dotnet/java-interop@a666a6f9: [Java.Runtime.Environment] Partial support for .NET Core (dotnet#804) Note: dotnet/java-interop@3824b974 updated Java.Interop/src/java-interop to use `_WINDOWS`, not `WINDOWS`. Define `_WINDOWS` when building for Windows as well.
jonpryor
added a commit
that referenced
this pull request
Mar 23, 2021
Fixes: dotnet/java-interop#790 Changes: dotnet/java-interop@bba1f07...a3de91e * dotnet/java-interop@a3de91ef: [ci] Make VC++ toolchain optional (#820) * dotnet/java-interop@3824b974: [java-interop] Windows build system support (#816) * dotnet/java-interop@94c0c709: Bump to xamarin/xamarin-android-tools/main@554d45a (#813) * dotnet/java-interop@5c756b14: [Java.Interop-PerformanceTests] Support .NET Core 3.1 (#808) * dotnet/java-interop@daec07b6: [build] Fix various warnings (#812) * dotnet/java-interop@678c4bd2: [class-parse, generator] Allow showing Kotlin internals via metadata (#793) * dotnet/java-interop@cd4c8f80: [jnienv-gen] Generate a header file for the native functions (#809) * dotnet/java-interop@69767c1a: [param-name-importer] Fix NSE when updating JavaApi.AllPackages (#807) * dotnet/java-interop@a666a6f9: [Java.Runtime.Environment] Partial support for .NET Core (#804) Note: dotnet/java-interop@3824b974 updated Java.Interop/src/java-interop to use `_WINDOWS`, not `WINDOWS`. Define `_WINDOWS` when building for Windows as well.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We made an assumption when the test was written that the
old Resource.designer.cs was going to be deleted in
projects when using
$(AndroidUseIntermediateDesignerFile).The decision was changed so it would jsut be ignored.
So the existing check that is should not exist was wrong.
That said it did not fail because we did not include the
Rootproeprty in the path so it always passed because that file
did not exist in the location we were checking.
The change to nunit3 changed that as because of the way the
working directory is set that check now failed. Because
the old incorrect path was not correct.. doh.
So a better check is to make sure that the old file is
just emtpy. We almost empty since the the project tools
write the file we end up with a Unicode marker.
We also update the XamarinAndroidApplicationProject so that
we can override the
$(EmbedAssembliesIntoApk). This isrequired for various unit tests. The way it currently worked
was that no matter what you set.. you always got the default.
This worked for the OSS repo as we don't use the shared-runtime.
But for the monodroid stuff, we need to be able to change that
value. This was stopping the test projects doing that.