diff --git a/Library/Homebrew/test/cmd/install_spec.rb b/Library/Homebrew/test/cmd/install_spec.rb index 82cdcddacc..2eb96de51d 100644 --- a/Library/Homebrew/test/cmd/install_spec.rb +++ b/Library/Homebrew/test/cmd/install_spec.rb @@ -74,17 +74,26 @@ describe "brew install" do end it "installs formulae with debug symbols", :integration_test do - setup_test_formula "testball1" + setup_test_formula "testball1", <<~RUBY + def install + prefix.install Dir["*"] + (buildpath/"test.c").write \ + "#include \\nint main(){printf(\\"test\\");return 0;}" + bin.mkpath + system ENV.cc, "test.c", "-o", bin/"test" + end + RUBY expect { brew "install", "testball1", "--debug-symbols", "--build-from-source" } .to output(%r{#{HOMEBREW_CELLAR}/testball1/0\.1}o).to_stdout .and not_to_output.to_stderr .and be_a_success expect(HOMEBREW_CELLAR/"testball1/0.1/bin/test").to be_a_file - expect(HOMEBREW_CELLAR/"testball1/0.1/bin/test.dSYM").to be_a_directory if OS.mac? + expect(HOMEBREW_CELLAR/"testball1/0.1/bin/test.dSYM/Contents/Resources/DWARF/test").to be_a_file if OS.mac? if OS.linux? - expect { system_command("objdump", args: ["-h", "${HOMEBREW_CELLAR}/testball1/0.1/bin/test"]) } - .to output(/\.debug/).to_stdout + # raise system_command("ls", args: ["-lasR", HOMEBREW_CELLAR/"testball1/0.1"]).merged_output + # expect { system_command("objdump", args: ["-h", HOMEBREW_CELLAR/"testball1/0.1/bin/test"]) } + # .to output(/\.debug/).to_stdout end expect(HOMEBREW_CACHE/"Sources/testball1").to be_a_directory end