From 563cb21d836e0b5be645c18b941e381e237465e9 Mon Sep 17 00:00:00 2001 From: andreas hilti Date: Mon, 20 May 2024 11:56:27 +0200 Subject: [PATCH] try fixing macos --- .github/workflows/dotnetcore.yml | 6 +++++- tests/cyclonedx.tests/ConvertTests.cs | 10 +++++++++- tests/cyclonedx.tests/cyclonedx.tests.csproj | 8 ++++++++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml index 4c00063..a070ca3 100644 --- a/.github/workflows/dotnetcore.yml +++ b/.github/workflows/dotnetcore.yml @@ -57,7 +57,11 @@ jobs: - uses: actions/setup-dotnet@v3.0.2 with: dotnet-version: '6.0' - + - name: SnapshooterHotfixSymlinkMac + if: matrix.os == 'macos-latest' + run: ls -l -a / + shell: bash + - name: Tests run: | dotnet restore diff --git a/tests/cyclonedx.tests/ConvertTests.cs b/tests/cyclonedx.tests/ConvertTests.cs index ea55e84..9b67705 100644 --- a/tests/cyclonedx.tests/ConvertTests.cs +++ b/tests/cyclonedx.tests/ConvertTests.cs @@ -1,4 +1,4 @@ -// This file is part of CycloneDX CLI Tool +// This file is part of CycloneDX CLI Tool // // Licensed under the Apache License, Version 2.0 (the “License”); // you may not use this file except in compliance with the License. @@ -22,6 +22,7 @@ using Snapshooter; using Snapshooter.Xunit; using CycloneDX.Cli.Commands; +using System.Diagnostics; namespace CycloneDX.Cli.Tests { @@ -146,6 +147,13 @@ public async Task ConvertFromSpdxJson(ConvertFormat inputFormat) Assert.Equal(0, exitCode); var bom = File.ReadAllText(outputFilename); bom = Regex.Replace(bom, @"Created"": .*\n", ""); + StackFrame[] stackFrames = new StackTrace(true).GetFrames(); + Console.Write(stackFrames); + foreach(var frame in stackFrames) + { + var filename = frame.GetFileName(); + Console.WriteLine(frame.GetMethod().Name + " " + (filename==null?"null":filename) + " " + frame.GetFileLineNumber()); + } Snapshot.Match(bom, SnapshotNameExtension.Create(inputFormat)); } } diff --git a/tests/cyclonedx.tests/cyclonedx.tests.csproj b/tests/cyclonedx.tests/cyclonedx.tests.csproj index 55c5b2a..b31f760 100644 --- a/tests/cyclonedx.tests/cyclonedx.tests.csproj +++ b/tests/cyclonedx.tests/cyclonedx.tests.csproj @@ -6,6 +6,14 @@ false + + embedded + + + + embedded + +