File: test-gemfile

package info (click to toggle)
ruby-multi-test 1.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 124 kB
  • sloc: ruby: 101; sh: 31; makefile: 9
file content (32 lines) | stat: -rwxr-xr-x 633 bytes parent folder | download
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
31
32
#!/bin/bash

set -e

GEMFILE_FOLDER=$1
GEMFILE=$GEMFILE_FOLDER/Gemfile
echo
echo $GEMFILE
echo
scenarios=$(cat $GEMFILE_FOLDER/scenarios)

PLATFORM="$(BUNDLE_GEMFILE=$GEMFILE bundle platform)"
if [[ "$PLATFORM" =~ "Your Ruby version is" ]]; then
	echo "$PLATFORM"
	echo
	echo "Skipping."
	exit 0
fi

for scenario in $scenarios; do
	echo
	echo $scenario
	echo
	scenario_path=test/scenarios/$scenario
	BUNDLE_GEMFILE=$GEMFILE bundle install
	output=$(BUNDLE_GEMFILE=$GEMFILE bundle exec ruby -I lib test/scenarios/$scenario)
	if [[ ! -z $output ]]; then
		echo "Expected output to be empty, but was:"
		echo "$output"
		exit 1
	fi
done