-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathstartTests
More file actions
executable file
·30 lines (23 loc) · 915 Bytes
/
Copy pathstartTests
File metadata and controls
executable file
·30 lines (23 loc) · 915 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env bash
export HTTP_PROXY=
export http_proxy=
DIR=$( cd `dirname $0` && pwd )
# always same order, with description for documentation:
#bundle exec rspec -f d spec/requests/provisioningobjects_spec_private.rb "$@"
#bundle exec rspec -f d spec/requests/provisioningobjects_spec_private2.rb "$@"
perform_tests(){
echo "Datetime: `date`"
echo ""
echo "git info:"
git branch
git log -n 1
echo ""
bundle exec rspec -f d spec/requests/system_settings_spec.rb "$@" &&
bundle exec rspec -f d spec/requests/provisioningobjects_spec.rb "$@"
}
#rake db:migrate RAILS_ENV=test
MILLISECONDS=`date +%N | cut -c1-3`; # did not work, but cut -c1-3 has worked: let MILLISECONDS/=1000000
DATETIME=`date +"%Y-%m-%d-%H-%M"`.$MILLISECONDS
perform_tests "$@" | tee $DIR/log/lasttest.log | tee $DIR/log/test_${DATETIME}.log
# return exitstatus of first command in the pipe:
test ${PIPESTATUS[0]} -eq 0