Skip to content

[2017-04][tests] Rework TypeBuilderTest SetUp/TearDown - #5061

Merged
lambdageek merged 2 commits into
mono:2017-04from
lambdageek:tbt-2017-04
Jun 19, 2017
Merged

lambdageek merged 2 commits into
mono:2017-04from
lambdageek:tbt-2017-04

Conversation

@lambdageek

Copy link
Copy Markdown
Member

This is #5059 for 2017-04


  • Create a unique temporary directory for each test in TypeBuilderTest and delete
    it on TearDown.

  • Change tests to use tempDir instead of Path.GetTempPath ()

  • Change IsSerializable () test to how it was 11 years ago and have it write to a
    file with a simple name (but now in a directory where noone else is writing)

  • Change FieldsWithSameName (), FieldsWithSameNameAndType () and
    MethodsWithSameNameAndSig () to use the default temp assembly (now in a
    unique tempDir) instead of using the CreateTempAssembly ()

  • Remove CreateTempAssembly function. It is dead code.

- Create a unique temporary directory for each test in TypeBuilderTest and delete
  it on TearDown.

- Change tests to use tempDir instead of Path.GetTempPath ()

- Change IsSerializable () test to how it was 11 years ago and have it write to a
  file with a simple name (but now in a directory where noone else is writing)

- Change FieldsWithSameName (), FieldsWithSameNameAndType () and
  MethodsWithSameNameAndSig () to use the default temp assembly (now in a
  unique tempDir) instead of using the CreateTempAssembly ()

- Remove CreateTempAssembly function. It is dead code.
Windows doesn't like deleting the file, and the original bug was a problem in
SRE, not in the AssemblyBuilder.Save ()
@lambdageek
lambdageek merged commit 30e73d4 into mono:2017-04 Jun 19, 2017
@lambdageek
lambdageek deleted the tbt-2017-04 branch June 20, 2017 15:39
lambdageek added a commit to lambdageek/xamarin-android that referenced this pull request Jun 20, 2017
Pick up mono/mono#5061 which fixes TypeBuilderTest
failures due to temp directory location.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants