Skip to content

Commit

Permalink
Merge pull request #104 from bugsnag/kattrali/enable-e2e-ci
Browse files Browse the repository at this point in the history
chore(ci): Enable e2e tests
  • Loading branch information
fractalwrench authored Apr 11, 2018
2 parents 60d1e95 + 14a36cc commit faab520
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 6 deletions.
18 changes: 17 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
dist: trusty
language: android
sudo: false

Expand All @@ -8,12 +9,27 @@ android:
- build-tools-27.0.0
- android-27
- sys-img-armeabi-v7a-android-21
- extra-google-m2repository
- extra-android-m2repository

# see https://github.com/travis-ci/travis-ci/issues/8874
before_install:
- yes | sdkmanager "platforms;android-27"
- echo y | sdkmanager "cmake;3.6.4111459"
- echo y | sdkmanager "ndk-bundle"
- echo y | sdkmanager "lldb;3.1"

script: ./gradlew clean install --stacktrace && ./gradlew clean build --stacktrace
- gem install bundler
- bundle install

install:
- curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
- sudo apt-get install -y nodejs

script:
- ./gradlew clean install --stacktrace
- ./gradlew clean build --stacktrace
- bundle exec maze-runner -c --verbose

before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
Expand Down
15 changes: 15 additions & 0 deletions features/fixtures/ndkapp/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,21 @@ android {
path "CMakeLists.txt"
}
}

flavorDimensions "regular"

productFlavors {
x86 {
ndk {
abiFilter "x86"
}
}
arm {
ndk {
abiFilters "armeabi-v7a", "armeabi"
}
}
}
}

dependencies {
Expand Down
16 changes: 13 additions & 3 deletions features/ndk_app.feature
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Feature: Plugin integrated in NDK app

Scenario: NDK apps send requests
When I build the NDK app
Then I should receive 6 requests
Then I should receive 7 requests

And the request 0 is valid for the Build API
And the payload field "appVersion" equals "1.0" for request 0
Expand All @@ -11,14 +11,24 @@ Scenario: NDK apps send requests
And the payload field "buildTool" equals "gradle-android" for request 0
And the payload field "appVersionCode" equals "1" for request 0

And the request 1 is valid for the Android NDK Mapping API
And the request 1 is valid for the Build API
And the payload field "appVersion" equals "1.0" for request 1
And the payload field "apiKey" equals "your-api-key-here" for request 1
And the payload field "builderName" is not null for request 1
And the payload field "buildTool" equals "gradle-android" for request 1
And the payload field "appVersionCode" equals "1" for request 1

And the request 2 is valid for the Android NDK Mapping API
And the request 2 is valid for the Android Mapping API
And the payload field "apiKey" equals "your-api-key-here" for request 2

And the request 3 is valid for the Android NDK Mapping API
And the payload field "apiKey" equals "your-api-key-here" for request 3

And the request 4 is valid for the Android NDK Mapping API
And the payload field "apiKey" equals "your-api-key-here" for request 4

And the request 5 is valid for the Android NDK Mapping API
And the payload field "apiKey" equals "your-api-key-here" for request 5

And the request 6 is valid for the Android Mapping API
And the payload field "apiKey" equals "your-api-key-here" for request 6
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,14 @@ class BugsnagUploadNdkTask extends BugsnagMultiPartUploadTask {
return null
}

if (process.exitValue() == 0) {
if (process.waitFor() == 0) {
return outputFile
} else {
project.logger.error("failed to generate symbols for " + arch + ", see " + errorOutputFile.toString() + " for more details")
return null
}
} catch (Exception e) {
project.logger.error("failed to generate symbols for " + arch + ": " + e.getMessage())
project.logger.error("failed to generate symbols for " + arch + ": " + e.getMessage(), e)
}
} else {
project.logger.error("Unable to upload NDK symbols: Could not find objdump location for " + arch)
Expand Down

0 comments on commit faab520

Please sign in to comment.