From 1ef70651ffc8ea5fd1beb10231feb7141dddd6c6 Mon Sep 17 00:00:00 2001 From: haberdashpi Date: Tue, 10 Dec 2019 11:21:39 -0500 Subject: [PATCH] fix: test LibSndFile only on supported julia versions. --- Project.toml | 6 +- test/Manifest.toml | 324 --------------------------------------------- test/Project.toml | 14 -- test/runtests.jl | 23 ++-- 4 files changed, 17 insertions(+), 350 deletions(-) delete mode 100644 test/Manifest.toml delete mode 100644 test/Project.toml diff --git a/Project.toml b/Project.toml index 09a7c6c..e799811 100644 --- a/Project.toml +++ b/Project.toml @@ -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"] \ No newline at end of file +test = ["BenchmarkTools", "FixedPointNumbers", "ProgressMeter", "SignalOperators", "Test", "WAV", "Pkg"] diff --git a/test/Manifest.toml b/test/Manifest.toml deleted file mode 100644 index f620250..0000000 --- a/test/Manifest.toml +++ /dev/null @@ -1,324 +0,0 @@ -# This file is machine-generated - editing it directly is not advised - -[[AbstractFFTs]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "051c95d6836228d120f5f4b984dd5aba1624f716" -uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" -version = "0.5.0" - -[[AxisArrays]] -deps = ["Dates", "IntervalSets", "IterTools", "RangeArrays"] -git-tree-sha1 = "d63ba0315a1d287c9467e61e932578f2fdd048e0" -uuid = "39de3d68-74b9-583c-8d2d-e117c070f3a9" -version = "0.3.3" - -[[Base64]] -uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" - -[[BenchmarkTools]] -deps = ["JSON", "Printf", "Statistics"] -git-tree-sha1 = "90b73db83791c5f83155016dd1cc1f684d4e1361" -uuid = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" -version = "0.4.3" - -[[BinaryProvider]] -deps = ["Libdl", "SHA"] -git-tree-sha1 = "5b08ed6036d9d3f0ee6369410b830f8873d4024c" -uuid = "b99e7846-7c00-51b0-8f62-c81ae34c0232" -version = "0.5.8" - -[[Compat]] -deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"] -git-tree-sha1 = "ed2c4abadf84c53d9e58510b5fc48912c2336fbb" -uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "2.2.0" - -[[Conda]] -deps = ["JSON", "VersionParsing"] -git-tree-sha1 = "9a11d428dcdc425072af4aea19ab1e8c3e01c032" -uuid = "8f4d0f93-b110-5947-807f-2305c1781a2d" -version = "1.3.0" - -[[DSP]] -deps = ["FFTW", "LinearAlgebra", "Polynomials", "Random", "Reexport", "SpecialFunctions", "Statistics"] -git-tree-sha1 = "fa9564dc41fb91716c2e3353fe447f268a08f14d" -uuid = "717857b8-e6f2-59f4-9121-6e50c889abd2" -version = "0.6.2" - -[[DataStructures]] -deps = ["InteractiveUtils", "OrderedCollections"] -git-tree-sha1 = "a1b652fb77ae8ca7ea328fa7ba5aa151036e5c10" -uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" -version = "0.17.6" - -[[Dates]] -deps = ["Printf"] -uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" - -[[DelimitedFiles]] -deps = ["Mmap"] -uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" - -[[Distributed]] -deps = ["Random", "Serialization", "Sockets"] -uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" - -[[FFTW]] -deps = ["AbstractFFTs", "BinaryProvider", "Conda", "Libdl", "LinearAlgebra", "Reexport"] -git-tree-sha1 = "4cfd3d43819228b9e73ab46600d0af0aa5cedceb" -uuid = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341" -version = "1.1.0" - -[[FLAC_jll]] -deps = ["Libdl", "Ogg_jll", "Pkg"] -git-tree-sha1 = "95538e15bb0328d76a1a886bbb5c8479a3d1edca" -uuid = "1d38b3a6-207b-531b-80e8-c83f48dafa73" -version = "1.3.3+0" - -[[FileIO]] -deps = ["Pkg"] -git-tree-sha1 = "6c976460b85527d22d979682222d36767d95e27f" -uuid = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549" -version = "1.1.0" - -[[FillArrays]] -deps = ["LinearAlgebra", "Random", "SparseArrays"] -git-tree-sha1 = "1a9fe4e1323f38de0ba4da49eafd15b25ec62298" -uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" -version = "0.8.2" - -[[FixedPointNumbers]] -git-tree-sha1 = "d14a6fa5890ea3a7e5dcab6811114f132fec2b4b" -uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93" -version = "0.6.1" - -[[InteractiveUtils]] -deps = ["Markdown"] -uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" - -[[IntervalSets]] -deps = ["Dates", "Statistics"] -git-tree-sha1 = "4214b48a62eb8f2c292b2ee34a508c256c0cdbc9" -uuid = "8197267c-284f-5f27-9208-e0e47529a953" -version = "0.3.2" - -[[IterTools]] -git-tree-sha1 = "05110a2ab1fc5f932622ffea2a003221f4782c18" -uuid = "c8e1da08-722c-5040-9ed9-7db0dc04731e" -version = "1.3.0" - -[[JSON]] -deps = ["Dates", "Mmap", "Parsers", "Unicode"] -git-tree-sha1 = "b34d7cef7b337321e97d22242c3c2b91f476748e" -uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" -version = "0.21.0" - -[[LambdaFn]] -deps = ["MacroTools", "Printf"] -git-tree-sha1 = "2a7d3e0970218915b42fc68a4976049cbfcc8438" -uuid = "fcefd6c4-8de0-11e9-0d15-03bc7c8ec982" -version = "0.3.0" - -[[LibGit2]] -uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" - -[[LibSndFile]] -deps = ["FileIO", "Libdl", "LinearAlgebra", "Printf", "SampledSignals", "libsndfile_jll"] -git-tree-sha1 = "04d5b9da8d9e8b16a0b639405b97c5fcd61e1b39" -uuid = "b13ce0c6-77b0-50c6-a2db-140568b8d1a5" -version = "2.2.0" - -[[Libdl]] -uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" - -[[LinearAlgebra]] -deps = ["Libdl"] -uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" - -[[Logging]] -uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" - -[[MacroTools]] -deps = ["DataStructures", "Markdown", "Random"] -git-tree-sha1 = "e2fc7a55bb2224e203bbd8b59f72b91323233458" -uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" -version = "0.5.3" - -[[Markdown]] -deps = ["Base64"] -uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" - -[[MetaArrays]] -deps = ["Requires"] -git-tree-sha1 = "416d7390ba7d02921608bc689e93c75e105590b4" -uuid = "36b8f3f0-b776-11e8-061f-1f20094e1fc8" -version = "0.2.7" - -[[Mmap]] -uuid = "a63ad114-7e13-5084-954f-fe012c677804" - -[[Ogg_jll]] -deps = ["Libdl", "Pkg"] -git-tree-sha1 = "f4d4d03c562f40652c0baabd3e4cb2e756e157b7" -uuid = "e7412a2a-1a6e-54c0-be00-318e2571c051" -version = "1.3.3+0" - -[[OpenSpecFun_jll]] -deps = ["Libdl", "Pkg"] -git-tree-sha1 = "65f672edebf3f4e613ddf37db9dcbd7a407e5e90" -uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" -version = "0.5.3+1" - -[[OrderedCollections]] -deps = ["Random", "Serialization", "Test"] -git-tree-sha1 = "c4c13474d23c60d20a67b217f1d7f22a40edf8f1" -uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" -version = "1.1.0" - -[[Parsers]] -deps = ["Dates", "Test"] -git-tree-sha1 = "0139ba59ce9bc680e2925aec5b7db79065d60556" -uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" -version = "0.3.10" - -[[Pkg]] -deps = ["Dates", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"] -uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" - -[[Polynomials]] -deps = ["LinearAlgebra", "RecipesBase"] -git-tree-sha1 = "ae71c2329790af97b7682b11241b3609e4d48626" -uuid = "f27b6e38-b328-58d1-80ce-0feddd5e7a45" -version = "0.6.0" - -[[PrettyPrinting]] -git-tree-sha1 = "cb3bd68c8e0fabf6e13c10bdf11713068e748a79" -uuid = "54e16d92-306c-5ea0-a30b-337be88ac337" -version = "0.2.0" - -[[Printf]] -deps = ["Unicode"] -uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" - -[[ProgressMeter]] -deps = ["Distributed", "Printf"] -git-tree-sha1 = "ea1f4fa0ff5e8b771bf130d87af5b7ef400760bd" -uuid = "92933f4c-e287-5a05-a399-4b506db050ca" -version = "1.2.0" - -[[REPL]] -deps = ["InteractiveUtils", "Markdown", "Sockets"] -uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" - -[[Random]] -deps = ["Serialization"] -uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" - -[[RangeArrays]] -deps = ["Compat"] -git-tree-sha1 = "d925adfd5b01cb46fde89dc9548d167b3b136f4a" -uuid = "b3c3ace0-ae52-54e7-9d0b-2c1406fd6b9d" -version = "0.3.1" - -[[RecipesBase]] -git-tree-sha1 = "7bdce29bc9b2f5660a6e5e64d64d91ec941f6aa2" -uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" -version = "0.7.0" - -[[Reexport]] -deps = ["Pkg"] -git-tree-sha1 = "7b1d07f411bc8ddb7977ec7f377b97b158514fe0" -uuid = "189a3867-3050-52da-a836-e630ba90ab69" -version = "0.2.0" - -[[Requires]] -deps = ["Test"] -git-tree-sha1 = "f6fbf4ba64d295e146e49e021207993b6b48c7d1" -uuid = "ae029012-a4dd-5104-9daa-d747884805df" -version = "0.5.2" - -[[SHA]] -uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" - -[[SampledSignals]] -deps = ["Compat", "DSP", "FFTW", "FixedPointNumbers", "IntervalSets", "LinearAlgebra", "TreeViews", "Unitful"] -git-tree-sha1 = "ce5705b342baa4a995ba6fa7ca9aa96e6647ac91" -uuid = "bd7594eb-a658-542f-9e75-4c4d8908c167" -version = "2.1.0" - -[[Serialization]] -uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" - -[[SharedArrays]] -deps = ["Distributed", "Mmap", "Random", "Serialization"] -uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" - -[[SignalOperators]] -deps = ["AxisArrays", "Compat", "DSP", "FileIO", "FillArrays", "LambdaFn", "MetaArrays", "PrettyPrinting", "Random", "Requires", "Statistics", "Unitful"] -git-tree-sha1 = "ca441337801a6ae71f75fe0548340e941916177d" -uuid = "4d633899-0529-4c96-b1ed-a77d049c39ef" -version = "0.2.0" - -[[Sockets]] -uuid = "6462fe0b-24de-5631-8697-dd941f90decc" - -[[SparseArrays]] -deps = ["LinearAlgebra", "Random"] -uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - -[[SpecialFunctions]] -deps = ["OpenSpecFun_jll"] -git-tree-sha1 = "268052ee908b2c086cc0011f528694f02f3e2408" -uuid = "276daf66-3868-5448-9aa4-cd146d93841b" -version = "0.9.0" - -[[Statistics]] -deps = ["LinearAlgebra", "SparseArrays"] -uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" - -[[Test]] -deps = ["Distributed", "InteractiveUtils", "Logging", "Random"] -uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - -[[TreeViews]] -deps = ["Test"] -git-tree-sha1 = "8d0d7a3fe2f30d6a7f833a5f19f7c7a5b396eae6" -uuid = "a2a6695c-b41b-5b7d-aed9-dbfdeacea5d7" -version = "0.3.0" - -[[UUIDs]] -deps = ["Random", "SHA"] -uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" - -[[Unicode]] -uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" - -[[Unitful]] -deps = ["LinearAlgebra", "Random"] -git-tree-sha1 = "92bdf0ccfa9612b167d0adaadef832a09971ceb0" -uuid = "1986cc42-f94f-5a68-af5c-568840ba703d" -version = "0.17.0" - -[[VersionParsing]] -deps = ["Compat"] -git-tree-sha1 = "c9d5aa108588b978bd859554660c8a5c4f2f7669" -uuid = "81def892-9a0e-5fdd-b105-ffc91e053289" -version = "1.1.3" - -[[WAV]] -deps = ["Base64", "FileIO", "Libdl", "Logging"] -git-tree-sha1 = "dfbbce73a5458898752a26ec945ef8f0b93e1dcf" -uuid = "8149f6b0-98f6-5db9-b78f-408fbbb8ef88" -version = "1.0.3" - -[[libsndfile_jll]] -deps = ["FLAC_jll", "Libdl", "Ogg_jll", "Pkg", "libvorbis_jll"] -git-tree-sha1 = "49d5e44ad9ae11866f456779eeea6d319eb77000" -uuid = "5bf562c0-5a39-5b4f-b979-f64ac885830c" -version = "1.0.28+0" - -[[libvorbis_jll]] -deps = ["Libdl", "Ogg_jll", "Pkg"] -git-tree-sha1 = "71e54fb89ac3e0344c7185d1876fd96b0f246952" -uuid = "f27f6e37-5d2b-51aa-960f-b287f2bc3b7a" -version = "1.3.6+2" diff --git a/test/Project.toml b/test/Project.toml deleted file mode 100644 index f6e263b..0000000 --- a/test/Project.toml +++ /dev/null @@ -1,14 +0,0 @@ -[deps] -AxisArrays = "39de3d68-74b9-583c-8d2d-e117c070f3a9" -BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" -DSP = "717857b8-e6f2-59f4-9121-6e50c889abd2" -FixedPointNumbers = "53c48c17-4a7d-5ca2-90c5-79b7896eea93" -LambdaFn = "fcefd6c4-8de0-11e9-0d15-03bc7c8ec982" -LibSndFile = "b13ce0c6-77b0-50c6-a2db-140568b8d1a5" -ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca" -SampledSignals = "bd7594eb-a658-542f-9e75-4c4d8908c167" -SignalOperators = "4d633899-0529-4c96-b1ed-a77d049c39ef" -Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" -Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" -WAV = "8149f6b0-98f6-5db9-b78f-408fbbb8ef88" diff --git a/test/runtests.jl b/test/runtests.jl index 7b37e26..58b64f2 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -10,6 +10,7 @@ using FixedPointNumbers using Unitful using ProgressMeter using BenchmarkTools +using Pkg using DSP dB = SignalOperators.Units.dB @@ -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)