This repository has been archived by the owner on Oct 23, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a script to check that all binaries exist on the system, for all …
…languages we handle.
- Loading branch information
Showing
2 changed files
with
45 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/usr/bin/env ruby | ||
# Goes through all languages and makes sure that all needed binaries exist to | ||
# evaluate code in it. | ||
|
||
$LOAD_PATH.unshift File.dirname(__FILE__) | ||
require 'eval/eval' | ||
require 'eval/config' | ||
require 'eval/languages' | ||
|
||
missing_binaries = [] | ||
|
||
Language.languages.each do |language, values| | ||
if values[:special] | ||
missing_binaries << "[special] #{language}" | ||
next | ||
end | ||
|
||
sandbox = Sandbox.new(Language.by_name(language)) | ||
if sandbox.binaries_all_exist? | ||
print '.' | ||
sleep 0.005 | ||
else | ||
print '!' | ||
sleep 0.05 | ||
missing_binaries << language | ||
end | ||
end | ||
|
||
puts | ||
|
||
puts "Languages missing binaries:" | ||
puts missing_binaries.join("\n") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters