bsdcontrol.rb/Rakefile.rb

26 lines
528 B
Ruby
Raw Normal View History

2024-05-12 05:59:38 +02:00
# frozen_string_literal: true
require 'bundler/setup'
require 'rake/extensiontask'
Rake::ExtensionTask.new('bsdcontrol.rb')
2024-03-01 02:29:43 +01:00
task default: %w[clobber compile test]
2024-03-07 05:34:34 +01:00
namespace :clang do
2024-05-12 05:59:38 +02:00
desc 'Run clang-format'
task :format do
2024-05-12 05:59:38 +02:00
sh 'clang-format -style=file:.clang-format -i ext/bsdcontrol.rb/*.c'
end
2024-03-07 05:34:34 +01:00
end
2024-03-08 00:27:20 +01:00
namespace :test do
2024-05-12 05:59:38 +02:00
desc 'Run unprivileged tests'
2024-03-08 00:27:20 +01:00
task :unprivileged do
2024-05-12 05:59:38 +02:00
sh './bin/run-unprivileged-tests'
2024-03-08 00:27:20 +01:00
end
2024-05-12 05:59:38 +02:00
desc 'Run superuser tests'
2024-03-08 00:27:20 +01:00
task :superuser do
2024-05-12 05:59:38 +02:00
sh './bin/run-superuser-tests'
2024-03-08 00:27:20 +01:00
end
end