Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Cristian Le <[email protected]>
- Loading branch information
Showing
1 changed file
with
118 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
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.29.3.tar.gz" | ||
sha256 "f792b86bac8be1a4593dd096c32c1a061102c802c6f5760259a5753b13f6caa1" | ||
license "GPL-2.0-only" | ||
|
||
# Fix install path | ||
# https://github.com/beakerlib/beakerlib/pull/170 | ||
patch :DATA | ||
|
||
def install | ||
system "make", "DD=#{prefix}", "install" | ||
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 | ||
|
||
__END__ | ||
Subject: [PATCH] Fix install location | ||
--- | ||
Index: Makefile | ||
IDEA additional info: | ||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | ||
<+>UTF-8 | ||
=================================================================== | ||
diff --git a/Makefile b/Makefile | ||
--- a/Makefile (revision 89675cb871516f96690e7f2c503a5c4aa714e40b) | ||
+++ b/Makefile (revision 305a7c46643e135de77761273379c638042c361d) | ||
@@ -5,11 +5,11 @@ | ||
export PKGVERSION := $(shell cat VERSION ) | ||
export TAG := ${PKGVERSION} | ||
ifndef DD | ||
- DD:=/ | ||
+ DD:=/usr | ||
endif | ||
|
||
ifndef PKGDOCDIR | ||
- export PKGDOCDIR := /usr/share/doc/$(PKGNAME)/ | ||
+ export PKGDOCDIR := /share/doc/$(PKGNAME)/ | ||
endif | ||
|
||
export DESTDIR := $(shell readlink -f -n $(DD)) | ||
Index: src/Makefile | ||
IDEA additional info: | ||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | ||
<+>UTF-8 | ||
=================================================================== | ||
diff --git a/src/Makefile b/src/Makefile | ||
--- a/src/Makefile (revision 89675cb871516f96690e7f2c503a5c4aa714e40b) | ||
+++ b/src/Makefile (revision 305a7c46643e135de77761273379c638042c361d) | ||
@@ -54,31 +54,31 @@ | ||
@for i in $(SUBDIRS); do $(MAKE) -C $$i $(MAKECMDGOALS); done | ||
|
||
install: build | ||
- mkdir -p $(DESTDIR)/usr/share/beakerlib | ||
- mkdir -p $(DESTDIR)/usr/share/beakerlib/xslt-templates | ||
- mkdir -p $(DESTDIR)/usr/share/man/man1 | ||
- mkdir -p $(DESTDIR)/usr/bin | ||
- mkdir -p $(DESTDIR)/usr/share/vim/vimfiles/after/ftdetect | ||
- mkdir -p $(DESTDIR)/usr/share/vim/vimfiles/after/syntax | ||
+ mkdir -p $(DESTDIR)/share/beakerlib | ||
+ mkdir -p $(DESTDIR)/share/beakerlib/xslt-templates | ||
+ mkdir -p $(DESTDIR)/share/man/man1 | ||
+ mkdir -p $(DESTDIR)/bin | ||
+ mkdir -p $(DESTDIR)/share/vim/vimfiles/after/ftdetect | ||
+ mkdir -p $(DESTDIR)/share/vim/vimfiles/after/syntax | ||
|
||
- install -p -m 644 $(FILES) $(DESTDIR)/usr/share/beakerlib | ||
- install -p profiling.sh $(DESTDIR)/usr/share/beakerlib | ||
- install -p -m 644 dictionary.vim $(DESTDIR)/usr/share/beakerlib | ||
+ install -p -m 644 $(FILES) $(DESTDIR)/share/beakerlib | ||
+ install -p profiling.sh $(DESTDIR)/share/beakerlib | ||
+ install -p -m 644 dictionary.vim $(DESTDIR)/share/beakerlib | ||
|
||
- install -p -m 644 xslt-templates/* $(DESTDIR)/usr/share/beakerlib/xslt-templates | ||
+ install -p -m 644 xslt-templates/* $(DESTDIR)/share/beakerlib/xslt-templates | ||
|
||
- install -p -m 644 vim/ftdetect/beakerlib.vim $(DESTDIR)/usr/share/vim/vimfiles/after/ftdetect | ||
- install -p -m 644 vim/syntax/beakerlib.vim $(DESTDIR)/usr/share/vim/vimfiles/after/syntax | ||
+ install -p -m 644 vim/ftdetect/beakerlib.vim $(DESTDIR)/share/vim/vimfiles/after/ftdetect | ||
+ install -p -m 644 vim/syntax/beakerlib.vim $(DESTDIR)/share/vim/vimfiles/after/syntax | ||
|
||
- install -p python/rlMemAvg.py $(DESTDIR)/usr/bin/beakerlib-rlMemAvg | ||
- install -p python/rlMemPeak.py $(DESTDIR)/usr/bin/beakerlib-rlMemPeak | ||
- install -p python/journalling.py $(DESTDIR)/usr/bin/beakerlib-journalling | ||
- install -p python/journal-compare.py $(DESTDIR)/usr/bin/beakerlib-journalcmp | ||
- install -p python/testwatcher.py $(DESTDIR)/usr/bin/beakerlib-testwatcher | ||
- install -p perl/deja-summarize $(DESTDIR)/usr/bin/beakerlib-deja-summarize | ||
- install -p lsb_release $(DESTDIR)/usr/bin/beakerlib-lsb_release | ||
+ install -p python/rlMemAvg.py $(DESTDIR)/bin/beakerlib-rlMemAvg | ||
+ install -p python/rlMemPeak.py $(DESTDIR)/bin/beakerlib-rlMemPeak | ||
+ install -p python/journalling.py $(DESTDIR)/bin/beakerlib-journalling | ||
+ install -p python/journal-compare.py $(DESTDIR)/bin/beakerlib-journalcmp | ||
+ install -p python/testwatcher.py $(DESTDIR)/bin/beakerlib-testwatcher | ||
+ install -p perl/deja-summarize $(DESTDIR)/bin/beakerlib-deja-summarize | ||
+ install -p lsb_release $(DESTDIR)/bin/beakerlib-lsb_release | ||
|
||
- install -p -m 644 $(MANDIR1)/* $(DESTDIR)/usr/share/man/man1 | ||
+ install -p -m 644 $(MANDIR1)/* $(DESTDIR)/share/man/man1 | ||
|
||
@for i in $(SUBDIRS); do $(MAKE) -C $$i $(MAKECMDGOALS); done |