From 3cd869651beb0114580016aba46d2eda4a094523 Mon Sep 17 00:00:00 2001 From: Bob W. Hogg Date: Tue, 14 Mar 2017 22:38:43 -0700 Subject: Add test fixtures for ELF executables Add test/support/fixtures/elf/ and test/support/fixtures/tarballs/testball-0.1-linux.tbz --- Library/Homebrew/test/support/fixtures/elf/hello | Bin 0 -> 6312 bytes Library/Homebrew/test/support/fixtures/elf/libhello.so.0 | Bin 0 -> 6312 bytes .../support/fixtures/tarballs/testball-0.1-linux.tbz | Bin 0 -> 3253 bytes .../helper/spec/shared_context/integration_test.rb | 9 +++++++-- Library/Homebrew/test/support/lib/config.rb | 1 - 5 files changed, 7 insertions(+), 3 deletions(-) create mode 100755 Library/Homebrew/test/support/fixtures/elf/hello create mode 100755 Library/Homebrew/test/support/fixtures/elf/libhello.so.0 create mode 100644 Library/Homebrew/test/support/fixtures/tarballs/testball-0.1-linux.tbz (limited to 'Library/Homebrew/test/support') diff --git a/Library/Homebrew/test/support/fixtures/elf/hello b/Library/Homebrew/test/support/fixtures/elf/hello new file mode 100755 index 000000000..76b86f02d Binary files /dev/null and b/Library/Homebrew/test/support/fixtures/elf/hello differ diff --git a/Library/Homebrew/test/support/fixtures/elf/libhello.so.0 b/Library/Homebrew/test/support/fixtures/elf/libhello.so.0 new file mode 100755 index 000000000..e85b7184f Binary files /dev/null and b/Library/Homebrew/test/support/fixtures/elf/libhello.so.0 differ diff --git a/Library/Homebrew/test/support/fixtures/tarballs/testball-0.1-linux.tbz b/Library/Homebrew/test/support/fixtures/tarballs/testball-0.1-linux.tbz new file mode 100644 index 000000000..5ca2be071 Binary files /dev/null and b/Library/Homebrew/test/support/fixtures/tarballs/testball-0.1-linux.tbz differ diff --git a/Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb b/Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb index da01580c2..6ee6a3345 100644 --- a/Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb +++ b/Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb @@ -123,11 +123,16 @@ RSpec.shared_context "integration test" do def setup_test_formula(name, content = nil) case name when /^testball/ + tarball = if OS.linux? + TEST_FIXTURE_DIR/"tarballs/testball-0.1-linux.tbz" + else + TEST_FIXTURE_DIR/"tarballs/testball-0.1.tbz" + end content = <<~EOS desc "Some test" homepage "https://example.com/#{name}" - url "file://#{TEST_FIXTURE_DIR}/tarballs/testball-0.1.tbz" - sha256 "#{TESTBALL_SHA256}" + url "file://#{tarball}" + sha256 "#{tarball.sha256}" option "with-foo", "Build with foo" diff --git a/Library/Homebrew/test/support/lib/config.rb b/Library/Homebrew/test/support/lib/config.rb index 3a0a76722..e54fc111f 100644 --- a/Library/Homebrew/test/support/lib/config.rb +++ b/Library/Homebrew/test/support/lib/config.rb @@ -35,7 +35,6 @@ HOMEBREW_TEMP = HOMEBREW_PREFIX.parent+"temp" TEST_FIXTURE_DIR = HOMEBREW_LIBRARY_PATH.join("test", "support", "fixtures") -TESTBALL_SHA1 = "be478fd8a80fe7f29196d6400326ac91dad68c37".freeze TESTBALL_SHA256 = "91e3f7930c98d7ccfb288e115ed52d06b0e5bc16fec7dce8bdda86530027067b".freeze TESTBALL_PATCHES_SHA256 = "799c2d551ac5c3a5759bea7796631a7906a6a24435b52261a317133a0bfb34d9".freeze PATCH_A_SHA256 = "83404f4936d3257e65f176c4ffb5a5b8d6edd644a21c8d8dcc73e22a6d28fcfa".freeze -- cgit v1.2.3