Allow passing job sequence by param

pull/11636/head
Javier Torres 8 years ago
parent 8073c41665
commit fd01261fc5

@ -3,8 +3,7 @@
main() {
port=$((6000 + $2))
# Run the rspec
ZEUSSOCK=".zeus$port.sock" bundle exec zeus rspec $1 >> $port.log 2>&1;
#RAILS_ENV=test PARALLEL=true RAILS_DATABASE_FILE=database_${2}.yml REDIS_PORT=$port bundle exec rspec --require ./spec/rspec_configuration.rb $1 >> $port.log 2>&1;
echo ZEUSSOCK=".zeus$port.sock" bundle exec zeus rspec -J#$3 $1
# Give some feedback
if [ $? -eq 0 ]; then
@ -17,5 +16,5 @@ main() {
}
# Init
main $1 $2;
main $1 $2 $3;
exit 0;

@ -1,19 +1,19 @@
#!/bin/bash
# BACKEND PARALLEL
sh generateSpecFull.sh || exit 1
script/ci/generateSpecFull.sh || exit 1
# CLEANER
sh cleaner.sh || exit 1
script/ci/cleaner.sh || exit 1
# WRAPPER
sh wrapper.sh $1 || exit 1
script/ci/wrapper.sh $1 || exit 1
# TESTS
time parallel -j $1 -a specfull.txt ./executor.sh {} {%} || exit 1
time parallel -j $1 -a specfull.txt 'script/ci/executor.sh {} {%} {#}' || exit 1
# SECOND TRY
sh secondTry.sh || exit 1
script/ci/secondTry.sh || exit 1
# REPORTER
sh reporter.sh || exit 1
script/ci/reporter.sh || exit 1

@ -2,6 +2,7 @@
require_relative '../../spec_helper'
require 'helpers/unique_names_helper'
require 'visualization/vizjson'
describe Carto::VisualizationsExportService do
include UniqueNamesHelper

@ -31,6 +31,11 @@ class CustomPlan < Zeus::Rails
end
def test
if ENV['TURBO']
job_index = ARGV.find { |i| i.starts_with?('-J#') }
job_id = ARGV.delete(job_index).split('#')[1] if job_index
ENV['PARALLEL_SEQ'] = job_id || Process.pid.to_s
end
Rails::Sequel.connection.disconnect
exit super

Loading…
Cancel
Save