Skip to content

Commit

Permalink
Showing 6 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion test/truffle/integration/common/test_server.sh.inc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PORT=8080
PORT=14873

function test_server {
serverpid=$!
14 changes: 8 additions & 6 deletions test/truffle/integration/instrumentation-server.sh
Original file line number Diff line number Diff line change
@@ -2,16 +2,18 @@

set -e

ruby -X+T -Xtruffle.instrumentation_server_port=8080 test/truffle/integration/instrumentation-server/subject.rb &
PORT=14873

ruby -X+T -Xtruffle.instrumentation_server_port=$PORT test/truffle/integration/instrumentation-server/subject.rb &
pid=$!

while ! (curl -s http://localhost:8080/stacks > /dev/null);
while ! (curl -s http://localhost:$PORT/stacks > /dev/null);
do
echo -n .
sleep 1
done

if [[ $(curl -s http://localhost:8080/stacks) != *"test/truffle/integration/instrumentation-server/subject.rb:1"* ]]
if [[ $(curl -s http://localhost:$PORT/stacks) != *"test/truffle/integration/instrumentation-server/subject.rb:1"* ]]
then
echo Expected line not found in stacks
exit 1
@@ -21,16 +23,16 @@ kill -9 $pid || true
wait $pid || true

( echo backtrace ; echo 20000+1400 ; echo continue ) > in.txt
ruby -X+T -Xtruffle.instrumentation_server_port=8080 test/truffle/integration/instrumentation-server/subject.rb < in.txt > out.txt &
ruby -X+T -Xtruffle.instrumentation_server_port=$PORT test/truffle/integration/instrumentation-server/subject.rb < in.txt > out.txt &
pid=$!

while ! (curl -s http://localhost:8080/stacks > /dev/null);
while ! (curl -s http://localhost:$PORT/stacks > /dev/null);
do
echo -n .
sleep 1
done

curl -s http://localhost:8080/break
curl -s http://localhost:$PORT/break

sleep 1
kill -9 $pid || true
2 changes: 1 addition & 1 deletion test/truffle/integration/rack-server/rack-server.rb
Original file line number Diff line number Diff line change
@@ -16,5 +16,5 @@ def call(env)

Rack::Handler::WEBrick.run(
Example.new,
:Port => 8080
:Port => 14873
)
2 changes: 1 addition & 1 deletion test/truffle/integration/sinatra-server/sinatra-server.rb
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@

require 'sinatra'

set :port, 8080
set :port, 14873

get '/' do
"Hello Sinatra!"
2 changes: 1 addition & 1 deletion test/truffle/integration/tcp-server/tcp-server.rb
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@

require 'socket'

server = TCPServer.new('localhost', 8080)
server = TCPServer.new('localhost', 14873)

loop do
socket = server.accept
2 changes: 1 addition & 1 deletion test/truffle/integration/webrick-server/webrick-server.rb
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@

require 'webrick'

server = WEBrick::HTTPServer.new(:Port => 8080)
server = WEBrick::HTTPServer.new(:Port => 14873)

server.mount_proc '/' do |req, res|
res.body = "Hello, world!\n"

0 comments on commit 1c6422f

Please sign in to comment.