summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2018-03-15 23:32:58 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2018-03-15 23:33:14 +0000
commit775d10604baa00e1ffd0d5bf232348c3990ec4e9 (patch)
tree082df1cb6fa69b35da5275a8c8c983035c378eaa /dev-lang
parentsci-biology/abyss: bump up to 2.0.3 (diff)
downloadgentoo-775d10604baa00e1ffd0d5bf232348c3990ec4e9.tar.gz
gentoo-775d10604baa00e1ffd0d5bf232348c3990ec4e9.tar.bz2
gentoo-775d10604baa00e1ffd0d5bf232348c3990ec4e9.zip
dev-lang/crystal: disable tests that interfere with gentoo's sandbox
Package-Manager: Portage-2.3.24, Repoman-2.3.6
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/crystal/crystal-0.24.2.ebuild2
-rw-r--r--dev-lang/crystal/files/crystal-0.24.2-gentoo-tests-network-sandbox.patch33
-rw-r--r--dev-lang/crystal/files/crystal-0.24.2-gentoo-tests-sandbox.patch37
3 files changed, 72 insertions, 0 deletions
diff --git a/dev-lang/crystal/crystal-0.24.2.ebuild b/dev-lang/crystal/crystal-0.24.2.ebuild
index 4a403f10264a..84884cb69fb6 100644
--- a/dev-lang/crystal/crystal-0.24.2.ebuild
+++ b/dev-lang/crystal/crystal-0.24.2.ebuild
@@ -40,6 +40,8 @@ RDEPEND="${DEPEND}
PATCHES=(
"${FILESDIR}"/${PN}-0.24.0-verbose-LDFLAGS.patch
+ "${FILESDIR}"/${PN}-0.24.2-gentoo-tests-sandbox.patch
+ "${FILESDIR}"/${PN}-0.24.2-gentoo-tests-network-sandbox.patch
)
src_prepare() {
diff --git a/dev-lang/crystal/files/crystal-0.24.2-gentoo-tests-network-sandbox.patch b/dev-lang/crystal/files/crystal-0.24.2-gentoo-tests-network-sandbox.patch
new file mode 100644
index 000000000000..12565c1d8390
--- /dev/null
+++ b/dev-lang/crystal/files/crystal-0.24.2-gentoo-tests-network-sandbox.patch
@@ -0,0 +1,33 @@
+diff --git a/spec/std/socket_spec.cr b/spec/std/socket_spec.cr
+index 0caa51a..f21b3b3 100644
+--- a/spec/std/socket_spec.cr
++++ b/spec/std/socket_spec.cr
+@@ -537,13 +537,15 @@ describe TCPSocket do
+ end
+ end
+
+- it "fails when host doesn't exist" do
++ # gentoo's FEATURES=network-sandbox blocks DNS
++ pending "fails when host doesn't exist" do
+ expect_raises(Socket::Error, /No address/i) do
+ TCPSocket.new("doesnotexist.example.org.", 12345)
+ end
+ end
+
+- it "fails (rather than segfault on darwin) when host doesn't exist and port is 0" do
++ # gentoo's FEATURES=network-sandbox blocks DNS
++ pending "fails (rather than segfault on darwin) when host doesn't exist and port is 0" do
+ expect_raises(Socket::Error, /No address/i) do
+ TCPSocket.new("doesnotexist.example.org.", 0)
+ end
+@@ -634,7 +636,9 @@ describe UDPSocket do
+ client.close
+ end
+
+- it "broadcasts messages" do
++ # gentoo's FEATURES=network-sandbox blocks external network:
++ # connect: Network is unreachable
++ pending "broadcasts messages" do
+ port = free_udp_socket_port
+
+ client = UDPSocket.new(Socket::Family::INET)
diff --git a/dev-lang/crystal/files/crystal-0.24.2-gentoo-tests-sandbox.patch b/dev-lang/crystal/files/crystal-0.24.2-gentoo-tests-sandbox.patch
new file mode 100644
index 000000000000..4bd779a834c8
--- /dev/null
+++ b/dev-lang/crystal/files/crystal-0.24.2-gentoo-tests-sandbox.patch
@@ -0,0 +1,37 @@
+diff --git a/spec/std/file_spec.cr b/spec/std/file_spec.cr
+index 4a08b7d..cb1b28c 100644
+--- a/spec/std/file_spec.cr
++++ b/spec/std/file_spec.cr
+@@ -1026,7 +1026,8 @@ describe "File" do
+ end
+ end
+
+- it "raises if file cannot be accessed" do
++ # On linux it's "Permission denied", not "Operation not permitted"
++ pending "raises if file cannot be accessed" do
+ expect_raises Errno, "Operation not permitted" do
+ File.touch("/bin/ls")
+ end
+diff --git a/spec/std/process_spec.cr b/spec/std/process_spec.cr
+index 4a36f18..0cd63a8 100644
+--- a/spec/std/process_spec.cr
++++ b/spec/std/process_spec.cr
+@@ -115,14 +115,16 @@ describe Process do
+ end
+
+ describe "environ" do
+- it "clears the environment" do
++ #gentoo's sandbox keeps sandbox environment
++ pending "clears the environment" do
+ value = Process.run("env", clear_env: true) do |proc|
+ proc.output.gets_to_end
+ end
+ value.should eq("")
+ end
+
+- it "sets an environment variable" do
++ #gentoo's sandbox keeps sandbox environment
++ pending "sets an environment variable" do
+ env = {"FOO" => "bar"}
+ value = Process.run("env", clear_env: true, env: env) do |proc|
+ proc.output.gets_to_end