Skip to content

Commit

Permalink
Merge pull request #179416 from Homebrew/i-bin-audit-followup
Browse files Browse the repository at this point in the history
i*: Stop interpolating `bin`
  • Loading branch information
BrewTestBot authored Aug 2, 2024
2 parents b00797a + 3d53acb commit 17ff71c
Show file tree
Hide file tree
Showing 13 changed files with 25 additions and 26 deletions.
3 changes: 2 additions & 1 deletion Formula/i/i686-elf-binutils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ def install
movl $4, %ebx
int $0x80
EOS
system "#{bin}/i686-elf-as", "--32", "-o", "test-s.o", "test-s.s"

system bin/"i686-elf-as", "--32", "-o", "test-s.o", "test-s.s"
assert_match "file format elf32-i386",
shell_output("#{bin}/i686-elf-objdump -a test-s.o")
end
Expand Down
3 changes: 2 additions & 1 deletion Formula/i/icdiff.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ def install
test do
(testpath/"file1").write "test1"
(testpath/"file2").write "test1"

system bin/"icdiff", "file1", "file2"
system "git", "init"
system "#{bin}/git-icdiff"
system bin/"git-icdiff"
end
end
4 changes: 2 additions & 2 deletions Formula/i/icu4c.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ def install

test do
if File.exist? "/usr/share/dict/words"
system "#{bin}/gendict", "--uchars", "/usr/share/dict/words", "dict"
system bin/"gendict", "--uchars", "/usr/share/dict/words", "dict"
else
(testpath/"hello").write "hello\nworld\n"
system "#{bin}/gendict", "--uchars", "hello", "dict"
system bin/"gendict", "--uchars", "hello", "dict"
end
end
end
9 changes: 5 additions & 4 deletions Formula/i/id3tool.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@ def install
end

test do
mp3 = "#{testpath}/test.mp3"
cp test_fixtures("test.mp3"), mp3
test_mp3 = testpath/"test.mp3"
# needs to write the file to set the tags
cp test_fixtures("test.mp3"), test_mp3

system bin/"id3tool", "-t", "Homebrew", mp3
system bin/"id3tool", "-t", "Homebrew", test_mp3
assert_match(/Song Title:\s+Homebrew/,
shell_output("#{bin}/id3tool #{mp3}").chomp)
shell_output("#{bin}/id3tool #{test_mp3}").chomp)
end
end
2 changes: 1 addition & 1 deletion Formula/i/ideviceinstaller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ def install
end

test do
system "#{bin}/ideviceinstaller --help |grep -q ^Usage"
assert_match "Manage apps on iOS devices", shell_output("#{bin}/ideviceinstaller --help")
end
end
6 changes: 1 addition & 5 deletions Formula/i/imessage-ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ def install
end

test do
if build.head?
system "#{bin}/imessage", "--version"
else
assert_match "imessage v#{version}", shell_output("#{bin}/imessage --version")
end
assert_match "imessage v#{version}", shell_output("#{bin}/imessage --version")
end
end
2 changes: 1 addition & 1 deletion Formula/i/imlib2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ def install
end

test do
system "#{bin}/imlib2_conv", test_fixtures("test.png"), "imlib2_test.png"
system bin/"imlib2_conv", test_fixtures("test.png"), "imlib2_test.png"
end
end
2 changes: 1 addition & 1 deletion Formula/i/influxdb-cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def install
assert_match "OK", shell_output("#{bin}/influx ping")

# Perform initial DB setup.
system "#{bin}/influx", "setup", "-u", "usr", "-p", "fakepassword", "-b", "bkt", "-o", "org", "-f"
system bin/"influx", "setup", "-u", "usr", "-p", "fakepassword", "-b", "bkt", "-o", "org", "-f"

# Assert that initial resources show in CLI output.
assert_match "usr", shell_output("#{bin}/influx user list")
Expand Down
12 changes: 6 additions & 6 deletions Formula/i/inform6.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,20 @@ class Inform6 < Formula
sha256 cellar: :any_skip_relocation, x86_64_linux: "ef7742bbf2854576904ccb28655b7af1fea66086ce33e305f6bc946510038b12"
end

resource "homebrew-test_resource" do
url "https://inform-fiction.org/examples/Adventureland/Adventureland.inf"
sha256 "3961388ff00b5dfd1ccc1bb0d2a5c01a44af99bdcf763868979fa43ba3393ae7"
end

def install
# Parallel install fails because of: https://gitlab.com/DavidGriffith/inform6unix/-/issues/26
ENV.deparallelize
system "make", "PREFIX=#{prefix}", "MAN_PREFIX=#{man}", "MANDIR=#{man1}", "install"
end

test do
resource "homebrew-test_resource" do
url "https://inform-fiction.org/examples/Adventureland/Adventureland.inf"
sha256 "3961388ff00b5dfd1ccc1bb0d2a5c01a44af99bdcf763868979fa43ba3393ae7"
end

resource("homebrew-test_resource").stage do
system "#{bin}/inform", "Adventureland.inf"
system bin/"inform", "Adventureland.inf"
assert_predicate Pathname.pwd/"Adventureland.z5", :exist?
end
end
Expand Down
2 changes: 1 addition & 1 deletion Formula/i/ipv6toolkit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ def install
end

test do
system "#{bin}/addr6", "-a", "fc00::1"
system bin/"addr6", "-a", "fc00::1"
end
end
2 changes: 1 addition & 1 deletion Formula/i/ircd-hybrid.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ def caveats
end

test do
system "#{bin}/ircd", "-version"
system bin/"ircd", "-version"
end
end
2 changes: 1 addition & 1 deletion Formula/i/irrtoolset.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ def install
end

test do
system "#{bin}/peval", "ANY"
system bin/"peval", "ANY"
end
end
2 changes: 1 addition & 1 deletion Formula/i/ivtools.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ def install
end

test do
system "#{bin}/comterp", "exit(0)"
system bin/"comterp", "exit(0)"
end
end

0 comments on commit 17ff71c

Please sign in to comment.