Rework utils
parent
0802adca1c
commit
0824b0ecaa
@ -1,12 +1,18 @@
|
|||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
|
|
||||||
crates = Dir["*/Cargo.toml"]
|
def clippy_all
|
||||||
crates.delete_if { |x| x.include?('bareminimum') }
|
crates = Dir["*/Cargo.toml"].sort!
|
||||||
|
crates.delete_if { |x| x.include?('bareminimum') }
|
||||||
|
|
||||||
crates.each do |x|
|
crates.each do |x|
|
||||||
x = File.dirname(x)
|
x = File.dirname(x)
|
||||||
|
|
||||||
Dir.chdir(x) do
|
Dir.chdir(x) do
|
||||||
`make clippy`
|
system('make clippy')
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if __FILE__ == $0
|
||||||
|
clippy_all()
|
||||||
|
end
|
||||||
|
@ -1,11 +1,17 @@
|
|||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
|
|
||||||
crates = Dir["**/Cargo.toml"]
|
def fmt_all
|
||||||
|
crates = Dir["**/Cargo.toml"].sort!
|
||||||
|
|
||||||
crates.each do |x|
|
crates.each do |x|
|
||||||
x = File.dirname(x)
|
x = File.dirname(x)
|
||||||
|
|
||||||
Dir.chdir(x) do
|
Dir.chdir(x) do
|
||||||
`cargo fmt`
|
system('cargo fmt')
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if __FILE__ == $0
|
||||||
|
fmt_all()
|
||||||
|
end
|
||||||
|
@ -1,16 +1,22 @@
|
|||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
|
|
||||||
crates = Dir["**/Cargo.toml"].sort!
|
def make_all
|
||||||
|
crates = Dir["**/Cargo.toml"].sort!
|
||||||
|
|
||||||
crates.each do |x|
|
crates.each do |x|
|
||||||
next if x.include?('raspi3_boot')
|
next if x.include?('raspi3_boot')
|
||||||
|
|
||||||
x = File.dirname(x)
|
x = File.dirname(x)
|
||||||
puts "\n\n" + x.to_s + "\n\n"
|
puts "\n\n" + x.to_s + "\n\n"
|
||||||
Dir.chdir(x) do
|
Dir.chdir(x) do
|
||||||
unless system('make')
|
unless system('make')
|
||||||
puts "\n\nBuild failed!"
|
puts "\n\nBuild failed!"
|
||||||
exit(1) # Exit with error code
|
exit(1) # Exit with error code
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if __FILE__ == $0
|
||||||
|
make_all()
|
||||||
|
end
|
||||||
|
@ -1,13 +1,19 @@
|
|||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
|
|
||||||
crates = Dir["**/Cargo.toml"].sort!
|
def make_panic_test
|
||||||
|
crates = Dir["**/Cargo.toml"].sort!
|
||||||
|
|
||||||
crates.each do |x|
|
crates.each do |x|
|
||||||
next if x.include?('raspi3_boot')
|
next if x.include?('raspi3_boot')
|
||||||
|
|
||||||
x = File.dirname(x)
|
x = File.dirname(x)
|
||||||
puts "\n" + x.to_s + ':'
|
puts "\n" + x.to_s + ':'
|
||||||
Dir.chdir(x) do
|
Dir.chdir(x) do
|
||||||
system('make nm | grep panic_fmt')
|
system('make nm | grep panic_fmt')
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if __FILE__ == $0
|
||||||
|
make_panic_test()
|
||||||
|
end
|
||||||
|
@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env ruby
|
||||||
|
|
||||||
|
require_relative 'clean_all'
|
||||||
|
require_relative 'clippy_all'
|
||||||
|
require_relative 'fmt_all'
|
||||||
|
require_relative 'make_all'
|
||||||
|
require_relative 'make_panic_test'
|
||||||
|
require_relative 'sanity_checks'
|
||||||
|
|
||||||
|
clean_all()
|
||||||
|
clippy_all()
|
||||||
|
|
||||||
|
clean_all()
|
||||||
|
fmt_all()
|
||||||
|
make_all()
|
||||||
|
make_panic_test()
|
||||||
|
sanity_checks()
|
@ -0,0 +1,16 @@
|
|||||||
|
#!/usr/bin/env ruby
|
||||||
|
|
||||||
|
def sanity_checks
|
||||||
|
crates = Dir["**/Cargo.toml"].sort!
|
||||||
|
|
||||||
|
crates.each do |x|
|
||||||
|
if File.readlines(x).grep(/patch.crates-io/).size > 0
|
||||||
|
puts "#{x} contains patch.crates-io!"
|
||||||
|
exit(1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if __FILE__ == $0
|
||||||
|
sanity_checks()
|
||||||
|
end
|
Loading…
Reference in New Issue