Skip to content

Commit

Permalink
Disable android tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nirinchev committed Aug 22, 2019
1 parent 405cf64 commit 80f47dc
Showing 1 changed file with 63 additions and 63 deletions.
126 changes: 63 additions & 63 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -203,69 +203,69 @@ stage('Test') {
reportTests 'TestResults.macOS.xml'
}
},
'Xamarin Android': {
nodeWithCleanup('windows && xamarin.android') {
unstash 'dotnet-source'
dir('Realm/packages') { unstash 'packages' }

dir('Tests/Tests.Android') {
msbuild target: 'SignAndroidPackage', restore: true,
properties: [ AndroidUseSharedRuntime: false, EmbedAssembliesIntoApk: true, RestoreConfigFile: "${env.WORKSPACE}/Tests/Test.NuGet.config" ] << props
dir("bin/${configuration}") {
stash includes: 'io.realm.xamarintests-Signed.apk', name: 'android-tests'
}
}
}
// The android tests fail on CI due to a CompilerServices.Unsafe issue. Uncomment when resolved
// nodeWithCleanup('android-hub') {
// unstash 'android-tests'

// lock("${env.NODE_NAME}-android") {
// boolean archiveLog = true

// try {
// // start logcat
// sh '''
// adb logcat -c
// adb logcat -v time > "logcat.txt" &
// echo $! > logcat.pid
// '''

// sh '''
// adb uninstall io.realm.xamarintests
// adb install io.realm.xamarintests-Signed.apk
// adb shell pm grant io.realm.xamarintests android.permission.READ_EXTERNAL_STORAGE
// adb shell pm grant io.realm.xamarintests android.permission.WRITE_EXTERNAL_STORAGE
// '''

// def instrumentationOutput = sh script: '''
// adb shell am instrument -w -r io.realm.xamarintests/.TestRunner
// adb pull /storage/sdcard0/RealmTests/TestResults.Android.xml TestResults.Android.xml
// adb shell rm /sdcard/Realmtests/TestResults.Android.xml
// ''', returnStdout: true

// def result = readProperties text: instrumentationOutput.trim().replaceAll(': ', '=')
// if (result.INSTRUMENTATION_CODE != '-1') {
// echo instrumentationOutput
// error result.INSTRUMENTATION_RESULT
// }
// archiveLog = false
// } finally {
// // stop logcat
// sh 'kill `cat logcat.pid`'
// if (archiveLog) {
// zip([
// zipFile: 'android-logcat.zip',
// archive: true,
// glob: 'logcat.txt'
// ])
// }
// }
// }

// junit 'TestResults.Android.xml'
// }
},
// The Android tests fail on CI with what seems like a Xamarin.Android bug - it complains of a missing Resource.Designer.cs
// 'Xamarin Android': {
// nodeWithCleanup('windows && xamarin.android') {
// unstash 'dotnet-source'
// dir('Realm/packages') { unstash 'packages' }

// dir('Tests/Tests.Android') {
// msbuild target: 'SignAndroidPackage', restore: true,
// properties: [ AndroidUseSharedRuntime: false, EmbedAssembliesIntoApk: true, RestoreConfigFile: "${env.WORKSPACE}/Tests/Test.NuGet.config" ] << props
// dir("bin/${configuration}") {
// stash includes: 'io.realm.xamarintests-Signed.apk', name: 'android-tests'
// }
// }
// }
// nodeWithCleanup('android-hub') {
// unstash 'android-tests'

// lock("${env.NODE_NAME}-android") {
// boolean archiveLog = true

// try {
// // start logcat
// sh '''
// adb logcat -c
// adb logcat -v time > "logcat.txt" &
// echo $! > logcat.pid
// '''

// sh '''
// adb uninstall io.realm.xamarintests
// adb install io.realm.xamarintests-Signed.apk
// adb shell pm grant io.realm.xamarintests android.permission.READ_EXTERNAL_STORAGE
// adb shell pm grant io.realm.xamarintests android.permission.WRITE_EXTERNAL_STORAGE
// '''

// def instrumentationOutput = sh script: '''
// adb shell am instrument -w -r io.realm.xamarintests/.TestRunner
// adb pull /storage/sdcard0/RealmTests/TestResults.Android.xml TestResults.Android.xml
// adb shell rm /sdcard/Realmtests/TestResults.Android.xml
// ''', returnStdout: true

// def result = readProperties text: instrumentationOutput.trim().replaceAll(': ', '=')
// if (result.INSTRUMENTATION_CODE != '-1') {
// echo instrumentationOutput
// error result.INSTRUMENTATION_RESULT
// }
// archiveLog = false
// } finally {
// // stop logcat
// sh 'kill `cat logcat.pid`'
// if (archiveLog) {
// zip([
// zipFile: 'android-logcat.zip',
// archive: true,
// glob: 'logcat.txt'
// ])
// }
// }
// }

// junit 'TestResults.Android.xml'
// }
// },
'.NET Framework Windows': {
nodeWithCleanup('cph-windows-02 && dotnet') {
unstash 'dotnet-source'
Expand Down

0 comments on commit 80f47dc

Please sign in to comment.