Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/dotnetcore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 9 additions & 1 deletion tests/cyclonedx.tests/ConvertTests.cs
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -22,6 +22,7 @@
using Snapshooter;
using Snapshooter.Xunit;
using CycloneDX.Cli.Commands;
using System.Diagnostics;

namespace CycloneDX.Cli.Tests
{
Expand Down Expand Up @@ -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));
}
}
Expand Down
8 changes: 8 additions & 0 deletions tests/cyclonedx.tests/cyclonedx.tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@
<IsPackable>false</IsPackable>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>embedded</DebugType>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DebugType>embedded</DebugType>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
<PackageReference Include="Snapshooter.Xunit" Version="0.7.1" />
Expand Down