#!/bin/sh # script/cibuild: Setup environment for CI to run tests. This is primarily # designed to run on the continuous integration server. set -e cd "$[dirname $0]/.." echo "Tests started at…" date "+%H:%M:%S" # GC customizations export RUBY_GC_MALLOC_LIMIT=79000000 export RUBY_HEAP_MIN_SLOTS=800000 export RUBY_HEAP_FREE_MIN=100000 export RUBY_HEAP_SLOTS_INCREMENT=400000 export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1 # setup environment global RAILS_ROOT := $[cd "$[dirname $0]"/.. && pwd] export RAILS_ROOT export RAILS_ENV="test" export RACK_ROOT="$RAILS_ROOT" export RACK_ENV="$RAILS_ENV" test -d "/usr/share/rbenv/shims" && do { export PATH=/usr/share/rbenv/shims:$PATH } export RBENV_VERSION="2.1.6" export PATH="$RACK_ROOT/bin:$PATH" # run tests echo "Running tests …" date "+%H:%M:%S" # run tests. script/test (CommandList children: [ (C {(set)} {(-e)}) (C {(cd)} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(dirname)} {(DQ ($ VSub_Number "$0"))})]) left_token: spids: [19 25] ) (/..) ) } ) (C {(echo)} {(DQ ("Tests started at\u2026"))}) (C {(date)} {(DQ ("+%H:%M:%S"))}) (C {(export)} {(Lit_VarLike "RUBY_GC_MALLOC_LIMIT=") (79000000)}) (C {(export)} {(Lit_VarLike "RUBY_HEAP_MIN_SLOTS=") (800000)}) (C {(export)} {(Lit_VarLike "RUBY_HEAP_FREE_MIN=") (100000)}) (C {(export)} {(Lit_VarLike "RUBY_HEAP_SLOTS_INCREMENT=") (400000)}) (C {(export)} {(Lit_VarLike "RUBY_HEAP_SLOTS_GROWTH_FACTOR=") (1)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:RAILS_ROOT) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (AndOr children: [ (C {(cd)} { (DQ (CommandSubPart command_list: (CommandList children: [(C {(dirname)} {(DQ ($ VSub_Number "$0"))})] ) left_token: spids: [81 87] ) ) (/..) } ) (C {(pwd)}) ] op_id: Op_DAmp ) ] ) left_token: spids: [77 94] ) ) } spids: [75] ) ] spids: [75] ) (C {(export)} {(RAILS_ROOT)}) (C {(export)} {(Lit_VarLike "RAILS_ENV=") (DQ (test))}) (C {(export)} {(Lit_VarLike "RACK_ROOT=") (DQ ($ VSub_Name "$RAILS_ROOT"))}) (C {(export)} {(Lit_VarLike "RACK_ENV=") (DQ ($ VSub_Name "$RAILS_ENV"))}) (AndOr children: [ (C {(test)} {(-d)} {(DQ (/usr/share/rbenv/shims))}) (BraceGroup children: [ (C {(export)} {(Lit_VarLike "PATH=") (/usr/share/rbenv/shims) (Lit_Other ":") ($ VSub_Name "$PATH")} ) ] spids: [133] ) ] op_id: Op_DAmp ) (C {(export)} {(Lit_VarLike "RBENV_VERSION=") (DQ (2.1.6))}) (C {(export)} {(Lit_VarLike "PATH=") (DQ ($ VSub_Name "$RACK_ROOT") ("/bin:") ($ VSub_Name "$PATH"))} ) (C {(echo)} {(DQ ("Running tests \u2026"))}) (C {(date)} {(DQ ("+%H:%M:%S"))}) (C {(script/test)}) ] )