2023-07-17 14:14:16 +01:00
|
|
|
require "rake/testtask"
|
|
|
|
|
2023-07-21 09:34:26 +01:00
|
|
|
HERE = __dir__
|
|
|
|
|
2023-08-10 14:43:34 +01:00
|
|
|
desc "Creates the base :test task"
|
2023-08-28 00:34:21 +01:00
|
|
|
Rake::TestTask.new do |t|
|
|
|
|
t.pattern = "test/test_*.rb"
|
2023-07-17 14:14:16 +01:00
|
|
|
end
|
2023-07-21 09:34:26 +01:00
|
|
|
|
2023-08-28 00:34:21 +01:00
|
|
|
namespace :t do
|
|
|
|
desc "Runs Voicemeeter basic tests"
|
|
|
|
task :basic do
|
|
|
|
ENV["KIND"] = "basic"
|
|
|
|
Rake::Task[:test].invoke
|
|
|
|
end
|
|
|
|
|
|
|
|
desc "Runs Voicemeeter banana tests"
|
|
|
|
task :banana do
|
|
|
|
ENV["KIND"] = "banana"
|
|
|
|
Rake::Task[:test].invoke
|
|
|
|
end
|
|
|
|
|
|
|
|
desc "Runs Voicemeeter potato tests"
|
|
|
|
task :potato do
|
|
|
|
ENV["KIND"] = "potato"
|
|
|
|
Rake::Task[:test].invoke
|
|
|
|
end
|
2023-08-10 14:43:34 +01:00
|
|
|
end
|
|
|
|
|
2023-08-28 00:34:21 +01:00
|
|
|
task default: ["t:potato"]
|
|
|
|
task basic: ["t:basic"]
|
|
|
|
task banana: ["t:banana"]
|
|
|
|
task potato: ["t:potato"]
|
|
|
|
task :all do
|
|
|
|
Rake.application.in_namespace(:t) { |namespace| namespace.tasks.each { |t| t.invoke and Rake::Task[:test].reenable } }
|
|
|
|
end
|
2023-08-10 14:43:34 +01:00
|
|
|
|
|
|
|
namespace :e do
|
|
|
|
desc "Runs the events example"
|
|
|
|
task :events do
|
|
|
|
filepath = File.join(HERE, "examples", "events", "main.rb")
|
|
|
|
ruby filepath
|
|
|
|
end
|
|
|
|
|
|
|
|
desc "Runs the midi example"
|
|
|
|
task :midi do
|
|
|
|
filepath = File.join(HERE, "examples", "midi", "main.rb")
|
|
|
|
ruby filepath
|
|
|
|
end
|
|
|
|
|
|
|
|
desc "Runs the obs example"
|
|
|
|
task :obs do
|
2023-08-11 00:50:10 +01:00
|
|
|
filepath = File.join(HERE, "examples", "obs", "main.rb")
|
|
|
|
ruby filepath
|
2023-08-10 14:43:34 +01:00
|
|
|
end
|
2023-07-21 09:34:26 +01:00
|
|
|
end
|