Skip to content

Commit

Permalink
Include a VB proj in testing (#81)
Browse files Browse the repository at this point in the history
* Include a VB proj in testing

* Make uploads unique

* unique dir

---------

Co-authored-by: Jared Parsons <jared@popcornbear.org>
  • Loading branch information
jaredpar and Jared Parsons authored Nov 28, 2023
1 parent e034e6f commit 5ef1ead
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions src/Basic.CompilerLog.UnitTests/CompilerLogFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ public sealed class CompilerLogFixture : IDisposable
/// </summary>
internal Lazy<string> ClassLibMultiComplogPath { get; }

internal Lazy<string> ConsoleVisualBasicComplogPath { get; }

internal Lazy<string>? WpfAppComplogPath { get; }

/// <summary>
Expand All @@ -65,10 +67,10 @@ public CompilerLogFixture(IMessageSink messageSink)
ComplogDirectory = Path.Combine(StorageDirectory, "logs");
Directory.CreateDirectory(ComplogDirectory);

var testArtifactsDir = Environment.GetEnvironmentVariable("TEST_ARTIFACTS_DIR");
var testArtifactsDir = Environment.GetEnvironmentVariable("TEST_ARTIFACTS_PATH");
if (testArtifactsDir is not null)
{
testArtifactsDir = Path.Combine(testArtifactsDir, RuntimeInformation.FrameworkDescription);
testArtifactsDir = Path.Combine(testArtifactsDir, Guid.NewGuid().ToString("N"));
Directory.CreateDirectory(testArtifactsDir);
}

Expand Down Expand Up @@ -150,6 +152,12 @@ partial class Util {
RunDotnetCommand($"new console --name example-no-generator --output .", scratchPath);
RunDotnetCommand("build -bl -nr:false", scratchPath);
});

ConsoleVisualBasicComplogPath = WithBuild("console-vb.complog", void (string scratchPath) =>
{
RunDotnetCommand($"new console --name console-vb --language VB --output .", scratchPath);
RunDotnetCommand("build -bl -nr:false", scratchPath);
});

ConsoleComplexComplogPath = WithBuild("console-complex.complog", void (string scratchPath) =>
{
Expand Down
2 changes: 1 addition & 1 deletion src/Basic.CompilerLog.Util/Serialize/MessagePackUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ internal static VisualBasicParseOptions CreateVisualBasicParseOptions(ParseOptio
{
return new VisualBasicParseOptions
(
languageVersion: basicPack.LanguageVersion,
languageVersion: basicPack.SpecifiedLanguageVersion,
documentationMode: optionsPack.DocumentationMode,
kind: optionsPack.Kind,
preprocessorSymbols: basicPack.PreprocessorSymbols
Expand Down

0 comments on commit 5ef1ead

Please sign in to comment.