Skip to content

Commit

Permalink
Rename build_data dir to test-artifacts (#2618)
Browse files Browse the repository at this point in the history
Co-authored-by: Rajkumar Rangaraj <[email protected]>
  • Loading branch information
pjanotti and rajkumar-rangaraj authored Jun 8, 2023
1 parent 5ab8818 commit dc39cd3
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ jobs:
if: always()
with:
name: test-logs-${{ matrix.machine }}-${{ matrix.test-tfm }}-containers-${{ matrix.containers }}
path: build_data/
path: test-artifacts/
- name: Delete SQL Server MSI
if: ${{ runner.os == 'Windows' }}
shell: bash
Expand Down Expand Up @@ -307,7 +307,7 @@ jobs:
if: always()
with:
name: test-logs-${{ matrix.machine }}-containers-${{ matrix.containers }}
path: build_data/
path: test-artifacts/

test-build-container:
needs: build-container
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/verify-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ jobs:
if: always()
with:
name: logs-${{ matrix.machine }}
path: build_data/
path: test-artifacts/
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,8 @@ src/OpenTelemetry.AutoInstrumentation.Native/cmake_install.cmake
# ignore verify .received files
*.received.*

# profiler and test logs
/build_data
# ignore logs and test results
/test-artifacts

# install.sh downloaded artifacts
/otel-dotnet-auto/
10 changes: 5 additions & 5 deletions build/Build.Steps.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ partial class Build
AbsolutePath TestsDirectory => RootDirectory / "test";

AbsolutePath TracerHomeDirectory => TracerHome ?? (OutputDirectory / "tracer-home");
AbsolutePath BuildDataDirectory => RootDirectory / "build_data";
AbsolutePath ProfilerTestLogs => BuildDataDirectory / "profiler-logs";
AbsolutePath TestArtifactsDirectory => RootDirectory / "test-artifacts";
AbsolutePath ProfilerTestLogs => TestArtifactsDirectory / "profiler-logs";
AbsolutePath AdditionalDepsDirectory => TracerHomeDirectory / "AdditionalDeps";
AbsolutePath StoreDirectory => TracerHomeDirectory / "store";

Expand Down Expand Up @@ -58,7 +58,7 @@ partial class Build
{
TracerHomeDirectory.CreateDirectory();
NuGetArtifactsDirectory.CreateDirectory();
BuildDataDirectory.CreateDirectory();
TestArtifactsDirectory.CreateDirectory();
ProfilerTestLogs.CreateDirectory();
});

Expand Down Expand Up @@ -356,7 +356,7 @@ DotNetBuildSettings BuildTestApplication(DotNetBuildSettings x) =>

Target RunManagedTests => _ => _
.Unlisted()
.Produces(BuildDataDirectory / "profiler-logs" / "*")
.Produces(TestArtifactsDirectory / "profiler-logs" / "*")
.After(BuildTracer)
.After(CompileManagedTests)
.After(PublishMocks)
Expand Down Expand Up @@ -615,7 +615,7 @@ DotNetBuildSettings BuildTestApplication(DotNetBuildSettings x) =>
.DependsOn(MarkdownLint)
.DependsOn(SpellcheckDocumentation);

private AbsolutePath GetResultsDirectory(Project proj) => BuildDataDirectory / "results" / proj.Name;
private AbsolutePath GetResultsDirectory(Project proj) => TestArtifactsDirectory / "results" / proj.Name;

/// <summary>
/// Bootstrapping tests require every single test to be run in a separate process
Expand Down
2 changes: 1 addition & 1 deletion build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ partial class Build : NukeBuild
NuGetArtifactsDirectory.CreateOrCleanDirectory();
(NativeProfilerProject.Directory / "build").CreateOrCleanDirectory();
(NativeProfilerProject.Directory / "deps").CreateOrCleanDirectory();
BuildDataDirectory.CreateOrCleanDirectory();
TestArtifactsDirectory.CreateOrCleanDirectory();

void DeleteReparsePoints(string path)
{
Expand Down
2 changes: 1 addition & 1 deletion test/IntegrationTests/AspNetTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ private async Task<IContainer> StartContainerAsync(int webPort, string? appPoolM
string networkId = await DockerNetworkHelper.SetupIntegrationTestsNetworkAsync();

string logPath = EnvironmentHelper.IsRunningOnCI()
? Path.Combine(Environment.GetEnvironmentVariable("GITHUB_WORKSPACE"), "build_data", "profiler-logs")
? Path.Combine(Environment.GetEnvironmentVariable("GITHUB_WORKSPACE"), "test-artifacts", "profiler-logs")
: Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), @"OpenTelemetry .NET AutoInstrumentation", "logs");
Directory.CreateDirectory(logPath);
Output.WriteLine("Collecting docker logs to: " + logPath);
Expand Down
2 changes: 1 addition & 1 deletion test/IntegrationTests/Helpers/EnvironmentHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ private void SetDefaultEnvironmentVariables()
CustomEnvironmentVariables["COR_PROFILER_PATH"] = profilerPath;

CustomEnvironmentVariables["OTEL_LOG_LEVEL"] = "debug";
CustomEnvironmentVariables["OTEL_DOTNET_AUTO_LOG_DIRECTORY"] = Path.Combine(EnvironmentTools.GetSolutionDirectory(), "build_data", "profiler-logs");
CustomEnvironmentVariables["OTEL_DOTNET_AUTO_LOG_DIRECTORY"] = Path.Combine(EnvironmentTools.GetSolutionDirectory(), "test-artifacts", "profiler-logs");
CustomEnvironmentVariables["OTEL_DOTNET_AUTO_HOME"] = GetNukeBuildOutput();
CustomEnvironmentVariables["OTEL_DOTNET_AUTO_TRACES_ADDITIONAL_SOURCES"] = "TestApplication.*";

Expand Down
2 changes: 1 addition & 1 deletion test/IntegrationTests/WcfIISTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ private async Task<IContainer> StartContainerAsync(int netTcpPort, int httpPort)
var networkId = await DockerNetworkHelper.SetupIntegrationTestsNetworkAsync();

var logPath = EnvironmentHelper.IsRunningOnCI()
? Path.Combine(Environment.GetEnvironmentVariable("GITHUB_WORKSPACE"), "build_data", "profiler-logs")
? Path.Combine(Environment.GetEnvironmentVariable("GITHUB_WORKSPACE"), "test-artifacts", "profiler-logs")
: Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), @"OpenTelemetry .NET AutoInstrumentation", "logs");

Directory.CreateDirectory(logPath);
Expand Down

0 comments on commit dc39cd3

Please sign in to comment.