Skip to content

Commit

Permalink
pgrouting: fix ENV["CI"] usage.
Browse files Browse the repository at this point in the history
Part of #70493.
  • Loading branch information
MikeMcQuaid committed Feb 8, 2021
1 parent dbf83ca commit 105c628
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions Formula/pgrouting.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,4 @@ def install
lib.install Dir["stage/**/lib/*"]
(share/"postgresql/extension").install Dir["stage/**/share/postgresql/extension/*"]
end

test do
return if ENV["CI"]

pg_bin = Formula["postgresql"].opt_bin
pg_port = "55561"
system "#{pg_bin}/initdb", testpath/"test"
pid = fork { exec "#{pg_bin}/postgres", "-D", testpath/"test", "-p", pg_port }

begin
sleep 2
system "#{pg_bin}/createdb", "-p", pg_port
system "#{pg_bin}/psql", "-p", pg_port, "--command", "CREATE DATABASE test;"
system "#{pg_bin}/psql", "-p", pg_port, "-d", "test", "--command", "CREATE EXTENSION postgis;"
system "#{pg_bin}/psql", "-p", pg_port, "-d", "test", "--command", "CREATE EXTENSION pgrouting;"
ensure
Process.kill 9, pid
Process.wait pid
end
end
end

0 comments on commit 105c628

Please sign in to comment.