Skip to content

Commit

Permalink
beakerlib 1.30 (new formula)
Browse files Browse the repository at this point in the history
Signed-off-by: Cristian Le <[email protected]>
  • Loading branch information
LecrisUT committed Mar 8, 2024
1 parent f4fcb83 commit ab39a17
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions Formula/b/beakerlib.rb
@@ -0,0 +1,39 @@
class Beakerlib < Formula
desc "Shell-level integration testing library"
homepage "https://github.com/beakerlib/beakerlib"
url "https://github.com/beakerlib/beakerlib/archive/refs/tags/1.30.tar.gz"
sha256 "bd06fc61b32d9caf4324587706a8363e37e771355da8297d0c5ba0023ae31098"
license "GPL-2.0-only"

uses_from_macos "gnu-getopt", since: :ventura
on_macos do
# Fix `readlink`
depends_on "coreutils"
end

def install

Check failure on line 14 in Formula/b/beakerlib.rb

View workflow job for this annotation

GitHub Actions / macOS 14-arm64

`brew install --verbose --build-bottle beakerlib` failed on macOS Sonoma (14) on Apple Silicon!

==> Fetching beakerlib ==> Downloading https://github.com/beakerlib/beakerlib/archive/refs/tags/1.30.tar.gz Already downloaded: /Users/brew/Library/Caches/Homebrew/downloads/02955c0d3c4b6f481e3a7b047097b7e06c9767ce61839902f2cbdb31bd538bf1--beakerlib-1.30.tar.gz ==> Verifying checksum for '02955c0d3c4b6f481e3a7b047097b7e06c9767ce61839902f2cbdb31bd538bf1--beakerlib-1.30.tar.gz' /usr/bin/env tar --extract --no-same-owner --file /Users/brew/Library/Caches/Homebrew/downloads/02955c0d3c4b6f481e3a7b047097b7e06c9767ce61839902f2cbdb31bd538bf1--beakerlib-1.30.tar.gz --directory /private/tmp/homebrew-unpack20240308-3530-a78dau /usr/bin/env cp -pR /private/tmp/homebrew-unpack20240308-3530-a78dau/beakerlib-1.30/. /private/tmp/beakerlib-20240308-3530-ho2ke5/beakerlib-1.30 ==> make DD=/opt/homebrew/Cellar/beakerlib/1.30 install for i in src; do /Applications/Xcode.app/Contents/Developer/usr/bin/make -C $i build; done cp yash/ya.sh ./ mkdir -p docs/man/man1 mkdir -p docs/pod patch < yash/yash.patch pod2man journal.sh >docs/man/man1/beakerlib-journal.1 pod2man logging.sh >docs/man/man1/beakerlib-logging.1 pod2man testing.sh >docs/man/man1/beakerlib-testing.1 patching file ya.sh pod2man rpms.sh >docs/man/man1/beakerlib-rpms.1 pod2man infrastructure.sh >docs/man/man1/beakerlib-infrastructure.1 pod2man performance.sh >docs/man/man1/beakerlib-performance.1 pod2man analyze.sh >docs/man/man1/beakerlib-analyze.1 pod2man libraries.sh >docs/man/man1/beakerlib-libraries.1 pod2man storage.sh >docs/man/man1/beakerlib-storage.1 pod2man synchronisation.sh >docs/man/man1/beakerlib-synchronisation.1 pod2man virtualX.sh >docs/man/man1/beakerlib-virtualX.1 pod2man ya.sh >docs/man/man1/beakerlib-ya.1 pod2man profiling.sh >docs/man/man1/beakerlib-profiling.1 perl/docsjoin journal.sh logging.sh testing.sh rpms.sh infrastructure.sh performance.sh analyze.sh libraries.sh storage.sh synchronisation.sh virtualX.sh ya.sh profiling.sh beakerlib.sh >docs/pod/beakerlib.pod BEAKERLIB=. bash -c ". beakerlib.sh ; declare -f | \ perl -e 'map { s/.*(obsolete|deprecate|^rlj).*//s; s/ .*/\n/s; print } \ (join \"\", <>) =~ m/^rl.*?^}/msg;' > dictionary.vim" gzip --force docs/man/man1/beakerlib-journal.1 gzip --force docs/man/man1/beakerlib-logging.1 gzip --force docs/man/man1/beakerlib-testing.1 gzip --force docs/man/man1/beakerlib-rpms.1 gzip --force docs/man/man1/beakerlib-infrastructure.1 gzip --force docs/man/man1/beakerlib-performance.1 gzip --force docs/man/man1/beakerlib-analyze.1 gzip --force docs/man/man1/beakerlib-libraries.1 gzip --force docs/man/man1/beakerlib-storage.1 gzip --force docs/man/man1/beakerlib-synchronisation.1 gzip --force docs/man/man1/beakerlib-virtualX.1 gzip --force docs/man/man1/beakerlib-ya.1 gzip --force docs/man/man1/beakerlib-profiling.1 -- ERROR: Non enhanced getopt version detected make[1]: *** [dictionary.vim] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [build] Error 2 ==> Formula Path: /opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/b/beakerlib.rb ==> Configuration HOMEBREW_VERSION: 4.2.11-94-g815db06 ORIGIN: https://github.com/Homebrew/brew HEAD: 815db0637a350db412fb951d74d2ad1c15906704 Last commit: 51 minutes ago Core tap HEAD: 9f08b9784d8b4754db0dd16f2e745b4afc3783f8 Core tap last commit: 4 minutes ago Core tap JSON: 08 Mar 09:38 UTC Core cask tap JSON: 08 Mar 09:38 UTC HOMEBREW_PREFIX: /opt/homebrew HOMEBREW_BOOTSNAP: set HOMEBREW_CACHE: /Users/brew/Library/Caches/Homebrew HOMEBREW_CASK_OPTS: [] HOMEBREW_COLOR: set HOMEBREW_CURL_PATH: /usr/bin/curl HOMEBREW_FAIL_LOG_LINES: 150 HOMEBREW_GIT_EMAIL: [email protected] HOMEBREW_GIT_NAME: BrewTestBot HOMEBREW_GIT_PATH: /usr/bin/git HOMEBREW_GITHUB_API_TOKEN: set HOMEBREW_LOGS: /Users/brew/actions-runner/_work/homebrew-core/homebrew-core/bottles/logs HOMEBREW_MAKE_JOBS: 4 HOMEBREW_NO_AUTO_UPDATE: set HOMEBREW_NO_EMOJI: set HOMEBREW_NO_ENV_HINTS: set HOMEBREW_NO_INSTALL_FROM_API: set HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: set HOMEBREW_SORBET_RUNTIME: set Homebrew Ruby: 3.1.4 => /opt/h

Check failure on line 14 in Formula/b/beakerlib.rb

View workflow job for this annotation

GitHub Actions / macOS 13-arm64

`brew install --verbose --build-bottle beakerlib` failed on macOS Ventura (13) on Apple Silicon!

==> Fetching beakerlib ==> Downloading https://github.com/beakerlib/beakerlib/archive/refs/tags/1.30.tar.gz Already downloaded: /Users/brew/Library/Caches/Homebrew/downloads/02955c0d3c4b6f481e3a7b047097b7e06c9767ce61839902f2cbdb31bd538bf1--beakerlib-1.30.tar.gz ==> Verifying checksum for '02955c0d3c4b6f481e3a7b047097b7e06c9767ce61839902f2cbdb31bd538bf1--beakerlib-1.30.tar.gz' /usr/bin/env tar --extract --no-same-owner --file /Users/brew/Library/Caches/Homebrew/downloads/02955c0d3c4b6f481e3a7b047097b7e06c9767ce61839902f2cbdb31bd538bf1--beakerlib-1.30.tar.gz --directory /private/tmp/homebrew-unpack20240308-3344-u5kw48 /usr/bin/env cp -pR /private/tmp/homebrew-unpack20240308-3344-u5kw48/beakerlib-1.30/. /private/tmp/beakerlib-20240308-3344-vwnd1z/beakerlib-1.30 ==> make DD=/opt/homebrew/Cellar/beakerlib/1.30 install for i in src; do /Applications/Xcode.app/Contents/Developer/usr/bin/make -C $i build; done cp yash/ya.sh ./ mkdir -p docs/man/man1 mkdir -p docs/pod patch < yash/yash.patch pod2man journal.sh >docs/man/man1/beakerlib-journal.1 pod2man logging.sh >docs/man/man1/beakerlib-logging.1 pod2man testing.sh >docs/man/man1/beakerlib-testing.1 patching file ya.sh pod2man rpms.sh >docs/man/man1/beakerlib-rpms.1 pod2man infrastructure.sh >docs/man/man1/beakerlib-infrastructure.1 pod2man performance.sh >docs/man/man1/beakerlib-performance.1 pod2man analyze.sh >docs/man/man1/beakerlib-analyze.1 pod2man libraries.sh >docs/man/man1/beakerlib-libraries.1 pod2man storage.sh >docs/man/man1/beakerlib-storage.1 pod2man synchronisation.sh >docs/man/man1/beakerlib-synchronisation.1 pod2man virtualX.sh >docs/man/man1/beakerlib-virtualX.1 pod2man ya.sh >docs/man/man1/beakerlib-ya.1 pod2man profiling.sh >docs/man/man1/beakerlib-profiling.1 perl/docsjoin journal.sh logging.sh testing.sh rpms.sh infrastructure.sh performance.sh analyze.sh libraries.sh storage.sh synchronisation.sh virtualX.sh ya.sh profiling.sh beakerlib.sh >docs/pod/beakerlib.pod BEAKERLIB=. bash -c ". beakerlib.sh ; declare -f | \ perl -e 'map { s/.*(obsolete|deprecate|^rlj).*//s; s/ .*/\n/s; print } \ (join \"\", <>) =~ m/^rl.*?^}/msg;' > dictionary.vim" gzip --force docs/man/man1/beakerlib-journal.1 gzip --force docs/man/man1/beakerlib-logging.1 gzip --force docs/man/man1/beakerlib-testing.1 gzip --force docs/man/man1/beakerlib-rpms.1 gzip --force docs/man/man1/beakerlib-infrastructure.1 gzip --force docs/man/man1/beakerlib-performance.1 gzip --force docs/man/man1/beakerlib-analyze.1 gzip --force docs/man/man1/beakerlib-libraries.1 gzip --force docs/man/man1/beakerlib-storage.1 gzip --force docs/man/man1/beakerlib-synchronisation.1 gzip --force docs/man/man1/beakerlib-virtualX.1 gzip --force docs/man/man1/beakerlib-ya.1 pod2man docs/pod/beakerlib.pod >docs/man/man1/beakerlib.1 gzip --force docs/man/man1/beakerlib-profiling.1 -- ERROR: Non enhanced getopt version detected make[1]: *** [dictionary.vim] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [build] Error 2 ==> Formula Path: /opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/b/beakerlib.rb ==> Configuration HOMEBREW_VERSION: 4.2.11-94-g815db06 ORIGIN: https://github.com/Homebrew/brew HEAD: 815db0637a350db412fb951d74d2ad1c15906704 Last commit: 51 minutes ago Core tap HEAD: 9f08b9784d8b4754db0dd16f2e745b4afc3783f8 Core tap last commit: 4 minutes ago Core tap JSON: 08 Mar 09:38 UTC Core cask tap JSON: 08 Mar 09:38 UTC HOMEBREW_PREFIX: /opt/homebrew HOMEBREW_BOOTSNAP: set HOMEBREW_CACHE: /Users/brew/Library/Caches/Homebrew HOMEBREW_CASK_OPTS: [] HOMEBREW_COLOR: set HOMEBREW_CURL_PATH: /usr/bin/curl HOMEBREW_FAIL_LOG_LINES: 150 HOMEBREW_GIT_EMAIL: [email protected] HOMEBREW_GIT_NAME: BrewTestBot HOMEBREW_GIT_PATH: /usr/bin/git HOMEBREW_GITHUB_API_TOKEN: set HOMEBREW_LOGS: /Users/brew/actions-runner/_work/homebrew-core/homebrew-core/bottles/logs HOMEBREW_MAKE_JOBS: 4 HOMEBREW_NO_AUTO_UPDATE: set HOMEBREW_NO_EMOJI: set HOMEBREW_NO_ENV_HINTS: set HOMEBREW_NO_INSTALL_FROM_API: set HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: set
system "make", "DD=#{prefix}", "install"
(prefix.glob "**/*.sh").each do |f|
inreplace f, "readlink", "#{Formula["coreutils"].opt_bin}/greadlink", false if OS.mac?
inreplace f, "getopt", "#{Formula["gnu-getopt"].opt_bin}/getopt", false if OS.mac?
end
end

test do
(testpath/"test.sh").write <<~EOS
#!/usr/bin/env bash
source #{share}/beakerlib/beakerlib.sh || exit 1
rlJournalStart
rlPhaseStartTest
rlPass "All works"
rlPhaseEnd
rlJournalEnd
EOS
expected_journal = /\[\s*PASS\s*\]\s*::\s*All works/
ENV["BEAKERLIB_DIR"] = testpath
system "bash", "#{testpath}/test.sh"
assert_match expected_journal, File.read(testpath/"journal.txt")
assert_match "TESTRESULT_STATE=complete", File.read(testpath/"TestResults")
assert_match "TESTRESULT_RESULT_STRING=PASS", File.read(testpath/"TestResults")
end
end

0 comments on commit ab39a17

Please sign in to comment.