Skip to content
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

Add SDK Symbols tests #19528

Merged

Conversation

NikolaMilosavljevic
Copy link
Member

Fixes: dotnet/source-build#4330
Fixes: dotnet/source-build#3769

Changes:

  • add symbols tests - one for now, for missing SDK Pdbs
  • refactor debug info detection, out of CreateSdkSymbolsLayout task so it can be used by both task and the new test
  • exclude SDK content under packs/ from missing Pdb detection
  • the task will continue to log warnings for missing Pdbs

Note that dotnet/source-build#3686 was closed in favor of dotnet/source-build#4330

Copy link
Member

@MichaelSimons MichaelSimons left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good, I just have minor comments to consider.

OutputHelper);

string sdkRoot = Directory.CreateDirectory(Path.Combine(SymbolsTestsRoot, "sdk")).FullName;
Utilities.ExtractTarball(Config.SdkTarballPath!, sdkRoot, OutputHelper);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This already exists at Config.DotNetDirectory once DotNetHelper has been instantiated. Consider using it to avoid extracting this tarball again.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed with e431f11

}
}
}

return filesWithoutPDBs;
}


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem necessary/intentional.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unintentional - will fix.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed with e431f11

}

// Checks if a file has debug data indicating an external companion Pdb.
public static bool FileHasCompanionPdbInfo(string file, out string guid)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to be public? I don't find any references to it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't need to. I'll update it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed with e431f11

}

// Checks if a file in Sdk layout requires an external Pdb.
public static bool FileInSdkLayoutRequiresAPdb(string file, out string guid)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{Minor suggestion} Consider putting this in a PdbUtilities method and leave FileUtilities as it was. It avoids the class collision in the tests.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed with e431f11

}

// Checks if a file in Sdk layout requires an external Pdb.
public static bool FileInSdkLayoutRequiresAPdb(string file, out string guid)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The out guid is not intuitive as to what it is for. Please document.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed with e431f11

@NikolaMilosavljevic
Copy link
Member Author

Changes look good, I just have minor comments to consider.

Thanks - will fix these.

NikolaMilosavljevic and others added 4 commits April 19, 2024 07:40
…eTests/Microsoft.DotNet.SourceBuild.SmokeTests.csproj

Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
@NikolaMilosavljevic NikolaMilosavljevic merged commit 94d9faf into dotnet:main Apr 21, 2024
22 checks passed
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.

Add a test for missing PDBs Symbols SDK package - remove content under packs as it is not useful
3 participants