Clean Up for UI Automated Testing
continuous-integration/drone/pr Build was killed Details

This commit is contained in:
Sarah Jamie Lewis 2023-02-01 14:00:40 -08:00
parent 154d1f1cfc
commit 5232e13d95
3 changed files with 7 additions and 13 deletions

View File

@ -66,13 +66,10 @@ steps:
- name: deps
path: /root/.pub-cache
commands:
# - flutter config --enable-linux-desktop
- # todo: add xvfb to openpriv/flutter-desktop:linux-fstable-3.7
- sudo apt update
- sudo apt-get install -y xvfb
- ./fetch-tor.sh
- export PATH=$PATH:$PWD/linux/Tor
- export LD_LIBRARY_PATH="$PWD/linux/Tor/"
- tor --version
- ./run-tests-headless.sh 02_save_load
- name: test-build-android

View File

@ -43,7 +43,6 @@ Future<void> main() async {
LicenseRegistry.addLicense(() => licenses());
WidgetsFlutterBinding.ensureInitialized();
print("runApp()");
print("Testing");
return runApp(Flwtch());
}
@ -66,7 +65,7 @@ class FlwtchState extends State<Flwtch> with WindowListener {
Future<dynamic> shutdownDirect(MethodCall call) async {
print(call);
await cwtch.Shutdown().timeout(Duration(seconds: 1));
cwtch.Shutdown();
return Future.value({});
}
@ -196,9 +195,8 @@ class FlwtchState extends State<Flwtch> with WindowListener {
Future<void> shutdown() async {
globalAppState.SetModalState(ModalState.shutdown);
print("shutting down");
await cwtch.Shutdown().timeout(Duration(seconds: 1));
await cwtch.Shutdown();
// Wait a few seconds as shutting down things takes a little time..
print("done");
{
if (Platform.isAndroid) {
SystemNavigator.pop();
@ -272,9 +270,7 @@ class FlwtchState extends State<Flwtch> with WindowListener {
@override
void dispose() {
globalAppState.SetModalState(ModalState.shutdown);
cwtch.Shutdown().timeout(Duration(seconds: 1), onTimeout: () {
});
cwtch.Shutdown();
windowManager.removeListener(this);
cwtch.dispose();
super.dispose();

View File

@ -5,8 +5,9 @@ sed "s|featurePaths: REPLACED_BY_SCRIPT|featurePaths: <String>[$paths]|" integra
flutter pub run build_runner clean
flutter pub run build_runner build --delete-conflicting-outputs
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"./linux/"
LD_LIBRARY_PATH=$LD_LIBRARY_PATH LOG_FILE=/home/sarah/PARA/projects/cwtch/cwtch.log CWTCH_HOME=$PWD/integration_test/env/temp/ flutter test -d linux --dart-define TEST_MODE=true integration_test/gherkin_suite_test.dart
PATH=$PATH:$PWD/linux/Tor
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"$PWD/linux/":"$PWD/linux/Tor/"
LOG_FILE=/home/sarah/PARA/projects/cwtch/cwtch.log CWTCH_HOME=$PWD/integration_test/env/temp/ flutter test -d linux --dart-define TEST_MODE=true integration_test/gherkin_suite_test.dart
#node index2.js
#if [ "$HEADLESS" = "false" ]; then
# xdg-open integration_test/gherkin/reports/cucumber_report.html