Skip to content

Commit

Permalink
Minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuraiAku committed Oct 14, 2023
1 parent 677233e commit f4d1816
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ using Test
using UUIDs

@testset "PkgToSoftwareBOM.jl" begin
testdir= mktempdir()
@testset "README.md examples: Environment" begin
sbom = generateSPDX()
path = mktempdir() * "myEnvironmentSBOM.spdx.json"
path = joinpath(testdir , "myEnvironmentSBOM.spdx.json")
writespdx(sbom, path)
rt_sbom = readspdx(path)

Expand All @@ -24,7 +25,7 @@ using UUIDs
rootpackages = filter(p -> !(p.first in ["PkgToSoftwareBOM", "SPDX"]),
Pkg.project().dependencies)
sbom_with_exclusions = generateSPDX(spdxCreationData(; rootpackages))
path2 = mktempdir() * "myEnvironmentSBOM.spdx.json"
path2 = joinpath(testdir, "myEnvironmentSBOM.spdx.json")
writespdx(sbom_with_exclusions, path2)
rt_sbom_with_exclusions = readspdx(path2)

Expand Down Expand Up @@ -63,7 +64,7 @@ using UUIDs
spdxPackageInstructions}(active_pkgs[myPackage_instr.name] => myPackage_instr))

sbom = generateSPDX(SPDX_docCreation)
path = mktempdir() * "myEnvironmentSBOM.spdx.json"
path = joinpath(testdir, "myEnvironmentSBOM.spdx.json")
writespdx(sbom, path)
rt_sbom = readspdx(path)
@test SPDX.compare(rt_sbom, sbom; skipproperties=[:DocumentComment]).bval
Expand Down

0 comments on commit f4d1816

Please sign in to comment.