Skip to content

Commit

Permalink
fix: test LibSndFile only on supported julia versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
haberdashPI committed Dec 10, 2019
1 parent 3f126a3 commit 1ef7065
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 350 deletions.
6 changes: 2 additions & 4 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,11 @@ julia = "1"
[extras]
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
FixedPointNumbers = "53c48c17-4a7d-5ca2-90c5-79b7896eea93"
LibSndFile = "b13ce0c6-77b0-50c6-a2db-140568b8d1a5"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
SampledSignals = "bd7594eb-a658-542f-9e75-4c4d8908c167"
SignalOperators = "4d633899-0529-4c96-b1ed-a77d049c39ef"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
WAV = "8149f6b0-98f6-5db9-b78f-408fbbb8ef88"

[targets]
test = [ "BenchmarkTools", "FixedPointNumbers", "LibSndFile", "ProgressMeter",
"SampledSignals", "SignalOperators", "Test", "WAV"]
test = ["BenchmarkTools", "FixedPointNumbers", "ProgressMeter", "SignalOperators", "Test", "WAV", "Pkg"]
324 changes: 0 additions & 324 deletions test/Manifest.toml

This file was deleted.

14 changes: 0 additions & 14 deletions test/Project.toml

This file was deleted.

23 changes: 15 additions & 8 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ using FixedPointNumbers
using Unitful
using ProgressMeter
using BenchmarkTools
using Pkg

using DSP
dB = SignalOperators.Units.dB
Expand Down Expand Up @@ -843,14 +844,20 @@ progress = Progress(total_test_groups,desc="Running tests...")
next!(progress)

# test LibSndFile and SampleBuf
@testset "Testing LibSndFile" begin
using LibSndFile
using SampledSignals

randn |> until(2s) |> normpower |> sink(example_ogg,samplerate=4kHz)
x = example_ogg |> sink(SampleBuf)
example_ogg |> sink(AxisArray)
@test SignalOperators.samplerate(x) == 4000
# (only supported for Julia versions 1.3 or higher)
@static if VERSION v"1.3"
Pkg.activate(mktempdir(@__DIR__))
Pkg.add("LibSndFile")
Pkg.add("SampledSignals")
@testset "Testing LibSndFile" begin
using LibSndFile
using SampledSignals

randn |> until(2s) |> normpower |> sink(example_ogg,samplerate=4kHz)
x = example_ogg |> sink(SampleBuf)
example_ogg |> sink(AxisArray)
@test SignalOperators.samplerate(x) == 4000
end
end
next!(progress)

Expand Down

2 comments on commit 1ef7065

@haberdashPI
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/6513

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if Julia TagBot is installed, or can be done manually through the github interface, or via:

git tag -a v0.2.1 -m "<description of version>" 1ef70651ffc8ea5fd1beb10231feb7141dddd6c6
git push origin v0.2.1

Please sign in to comment.