Skip to content

Commit

Permalink
Merge pull request #232 from bugsnag/tms/unity-test-project
Browse files Browse the repository at this point in the history
Establish repo structure for e2e tests
  • Loading branch information
twometresteve authored Apr 27, 2021
2 parents d35a66b + 21c4876 commit daf9228
Show file tree
Hide file tree
Showing 28 changed files with 72 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ steps:
- Bugsnag.unitypackage
- Bugsnag-with-android-64bit.unitypackage
commands:
- cd test/desktop
- bundle install
- bundle exec bugsnag-maze-runner
concurrency: 2
Expand All @@ -47,6 +48,7 @@ steps:
- Bugsnag.unitypackage
- Bugsnag-with-android-64bit.unitypackage
commands:
- cd test/desktop
- bundle install
- bundle exec bugsnag-maze-runner
concurrency: 2
Expand Down
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ source 'https://rubygems.org'
gem "rake"
gem "xcpretty"
gem "xcodeproj"
gem "bugsnag-maze-runner", git: "/~https://github.com/bugsnag/maze-runner", branch: "v1"
3 changes: 3 additions & 0 deletions test/desktop/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source 'https://rubygems.org'

gem "bugsnag-maze-runner", git: "/~https://github.com/bugsnag/maze-runner", branch: "v1"
55 changes: 55 additions & 0 deletions test/desktop/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
GIT
remote: /~https://github.com/bugsnag/maze-runner
revision: 7377529a77eb7585afc66cd2080fcdc4eea3306a
branch: v1
specs:
bugsnag-maze-runner (1.1.0)
cucumber (~> 3.1.0)
cucumber-expressions (= 5.0.15)
minitest (~> 5.0)
os (~> 1.0.0)
rack (~> 2.0.0)
rake (~> 12.3.3)
test-unit (~> 3.2.0)

GEM
remote: https://rubygems.org/
specs:
backports (3.21.0)
builder (3.2.4)
cucumber (3.1.0)
builder (>= 2.1.2)
cucumber-core (~> 3.1.0)
cucumber-expressions (~> 5.0.4)
cucumber-wire (~> 0.0.1)
diff-lcs (~> 1.3)
gherkin (~> 5.0)
multi_json (>= 1.7.5, < 2.0)
multi_test (>= 0.1.2)
cucumber-core (3.1.0)
backports (>= 3.8.0)
cucumber-tag_expressions (~> 1.1.0)
gherkin (>= 5.0.0)
cucumber-expressions (5.0.15)
cucumber-tag_expressions (1.1.1)
cucumber-wire (0.0.1)
diff-lcs (1.4.4)
gherkin (5.1.0)
minitest (5.14.4)
multi_json (1.15.0)
multi_test (0.1.2)
os (1.0.1)
power_assert (2.0.0)
rack (2.0.9)
rake (12.3.3)
test-unit (3.2.9)
power_assert

PLATFORMS
x86_64-darwin-19

DEPENDENCIES
bugsnag-maze-runner!

BUNDLED WITH
2.2.13
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,41 @@

export PATH="/Applications/Unity/Hub/Editor/$UNITY_VERSION/Unity.app/Contents/MacOS:$PATH"

# Set project_path to the repo root
pushd "${0%/*}"
pushd ../..
pushd ../../../..
package_path=`pwd`
echo "Expecting to find Busnag package in: $package_path"
popd
pushd ../fixtures
git clean -xdf .
log_file="$package_path/unity.log"
project_path="$(pwd)/unity_project"

echo "Creating Unity project in $project_path"
Unity -nographics -quit -batchmode -logFile $log_file \
-createProject $project_path

echo "Importing Bugsnag package $package_path/Bugsnag.unitypackage"
Unity -nographics -quit -batchmode -logFile $log_file \
-projectPath $project_path \
-importPackage "$package_path/Bugsnag.unitypackage"
RESULT=$?
if [ $RESULT -ne 0 ]; then exit $RESULT; fi

cp Main.cs unity_project/Assets/Main.cs
cp -R NativeCrashy.bundle unity_project/Assets/Plugins/OSX/NativeCrashy.bundle

Unity -nographics -quit -batchmode -logFile $log_file \
-projectPath $project_path \
-executeMethod "Main.CreateScene"
RESULT=$?
if [ $RESULT -ne 0 ]; then exit $RESULT; fi

Unity -nographics -quit -batchmode -logFile - \
-projectPath $project_path \
-buildOSXUniversalPlayer "$(pwd)/Mazerunner.app"
RESULT=$?
if [ $RESULT -ne 0 ]; then exit $RESULT; fi
popd
popd
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion unity/PackageProject/ProjectSettings/ProjectVersion.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
m_EditorVersion: 2017.4.3f1
m_EditorVersion: 2017.4.40f1

0 comments on commit daf9228

Please sign in to comment.