spice-protocol: add test
This commit is contained in:
parent
4140e231a0
commit
e5229d7a06
|
@ -3,10 +3,24 @@ class SpiceProtocol < Formula
|
||||||
homepage "https://www.spice-space.org/"
|
homepage "https://www.spice-space.org/"
|
||||||
url "https://www.spice-space.org/download/releases/spice-protocol-0.12.14.tar.bz2"
|
url "https://www.spice-space.org/download/releases/spice-protocol-0.12.14.tar.bz2"
|
||||||
sha256 "20350bc4309039fdf0d29ee4fd0033cde27bccf33501e13b3c1befafde9d0c9c"
|
sha256 "20350bc4309039fdf0d29ee4fd0033cde27bccf33501e13b3c1befafde9d0c9c"
|
||||||
|
revision 1
|
||||||
|
|
||||||
def install
|
def install
|
||||||
system "./configure", "--disable-silent-rules",
|
system "./configure", "--disable-silent-rules",
|
||||||
"--prefix=#{prefix}"
|
"--prefix=#{prefix}"
|
||||||
system "make", "install"
|
system "make", "install"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
test do
|
||||||
|
(testpath/"test.cpp").write <<~EOS
|
||||||
|
#include <spice/protocol.h>
|
||||||
|
int main() {
|
||||||
|
return (SPICE_LINK_ERR_OK == 0) ? 0 : 1;
|
||||||
|
}
|
||||||
|
EOS
|
||||||
|
system ENV.cc, "test.cpp",
|
||||||
|
"-I#{include}/spice-1",
|
||||||
|
"-o", "test"
|
||||||
|
system "./test"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue