Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#818 added multimodules #857

Merged
merged 19 commits into from
Jun 22, 2020
Merged

#818 added multimodules #857

merged 19 commits into from
Jun 22, 2020

Conversation

piotradamczyk5
Copy link
Contributor

@piotradamczyk5 piotradamczyk5 commented Jun 17, 2020

configuration similiar to client in #818

Test Plan

How do we know the code works?

Run generateTestApkAndCopyToFixtures.sh <path_name> and check that many modules apk is added to test_runner/src/test/kotlin/ftl/fixtures/tmp/apks/<path_name>

Checklist

  • Documented
  • release_notes.md updated

Copy link
Contributor

@jan-goral jan-goral left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need also script for building and coping apks to fixtures/tmp/apk.

@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The module name is fullyIgnoredModule but this test is not ignored

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch

Comment on lines 2 to 35
app: apk/818/app-multiple-error-debug.apk
test: apk/818/app-multiple-error-debug-androidTest.apk
num-flaky-test-attempts: 2
async: false
environment-variables:
coverage: true
coverageFilePath: /sdcard/
clearPackageData: true
performance-metrics: false
record-video: false
test-targets:
- notAnnotation org.junit.Ignore
use-orchestrator: true
flank:
disable-sharding: false
max-test-shards: 2
num-test-runs: 1
run-timeout: 20m
max-test-shards: 5
legacy-junit-result: 'false'
additional-app-test-apks:
- test: ./src/test/kotlin/ftl/fixtures/tmp/apk/app-single-success-debug-androidTest.apk
- test: ./src/test/kotlin/ftl/fixtures/tmp/apk/app-multiple-flaky-debug-androidTest.apk
- test: ../test_app/apks/invalid.apk
- test: apk/818/app-multiple-error-debug-androidTest.apk
- test: apk/818/app-multiple-success-debug-androidTest.apk
- test: apk/818/fullyIgnoredModule-debug-androidTest.apk
- test: apk/818/testModule-debug-androidTest.apk
- test: apk/818/testModule1-debug-androidTest.apk
- test: apk/818/testModule10-debug-androidTest.apk
- test: apk/818/testModule11-debug-androidTest.apk
- test: apk/818/testModule12-debug-androidTest.apk
- test: apk/818/testModule13-debug-androidTest.apk
- test: apk/818/testModule14-debug-androidTest.apk
- test: apk/818/testModule15-debug-androidTest.apk
- test: apk/818/testModule16-debug-androidTest.apk
- test: apk/818/testModule17-debug-androidTest.apk
- test: apk/818/testModule18-debug-androidTest.apk
- test: apk/818/testModule19-debug-androidTest.apk
- test: apk/818/testModule2-debug-androidTest.apk
- test: apk/818/testModule3-debug-androidTest.apk
- test: apk/818/testModule4-debug-androidTest.apk
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will be better to add new config instead of modifying current.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@piotradamczyk5
Copy link
Contributor Author

We need also script for building and coping apks to fixtures/tmp/apk.

generateTestApkAndCopyToFixtures.sh

@piotradamczyk5 piotradamczyk5 marked this pull request as ready for review June 18, 2020 07:04
fi

mkdir -p ../test_runner/src/test/kotlin/ftl/fixtures/tmp/apks$path
find multi-modules -type f -name "*.apk" -exec cp {} ../test_runner/src/test/kotlin/ftl/fixtures/tmp/apks$path \;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New line

@@ -0,0 +1 @@
/build
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New line


# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New line

val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("com.example.multiapp", appContext.packageName)
}
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New line

</activity>
</application>

</manifest>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New line

app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/textview_first" />
</androidx.constraintlayout.widget.ConstraintLayout>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New line

<color name="colorPrimary">#6200EE</color>
<color name="colorPrimaryDark">#3700B3</color>
<color name="colorAccent">#03DAC5</color>
</resources>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New line


<string name="hello_first_fragment">Hello first fragment</string>
<string name="hello_second_fragment">Hello second fragment. Arg: %1$s</string>
</resources>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New line


<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />

</resources>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New line

fun addition_isCorrect() {
assertEquals(4, 2 + 2)
}
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New line

@bootstraponline
Copy link
Contributor

Merge branch 'master' into #818-added-multimodules

let's not have merge requests in pull requests 🙂 Instead you can setup rebase

git config --global pull.rebase true

@piotradamczyk5
Copy link
Contributor Author

Merge branch 'master' into #818-added-multimodules

let's not have merge requests in pull requests 🙂 Instead you can setup rebase

git config --global pull.rebase true

Next time I will avoid it

@jan-goral jan-goral self-assigned this Jun 22, 2020
@jan-goral jan-goral merged commit c6cd725 into master Jun 22, 2020
@jan-goral jan-goral deleted the #818-added-multimodules branch June 22, 2020 19:12
piotradamczyk5 added a commit that referenced this pull request Jun 23, 2020
* #818 added multi modules with tests

Co-authored-by: Janek Góral <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants