From 2c829380b5ea18ed32595b89560b46b23887ce65 Mon Sep 17 00:00:00 2001 From: Lukas Oberhuber Date: Thu, 11 Aug 2022 10:54:18 -1000 Subject: [PATCH] Test that --debug-symbols succeeds Due to limitations of the test framework, this only tests that the command with the --debug-symbols flag succeeds and that on MacOS the `dsymutil` is run. --- Library/Homebrew/test/cmd/install_spec.rb | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/Library/Homebrew/test/cmd/install_spec.rb b/Library/Homebrew/test/cmd/install_spec.rb index 2eb96de51d..c7a4bba552 100644 --- a/Library/Homebrew/test/cmd/install_spec.rb +++ b/Library/Homebrew/test/cmd/install_spec.rb @@ -74,15 +74,7 @@ describe "brew install" do end it "installs formulae with debug symbols", :integration_test do - 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 + setup_test_formula "testball1" expect { brew "install", "testball1", "--debug-symbols", "--build-from-source" } .to output(%r{#{HOMEBREW_CELLAR}/testball1/0\.1}o).to_stdout @@ -90,11 +82,6 @@ describe "brew install" do .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/Contents/Resources/DWARF/test").to be_a_file if OS.mac? - if OS.linux? - # 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 end