Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
eeb88f43
Unverified
Commit
eeb88f43
authored
Nov 08, 2019
by
Jonah Williams
Committed by
GitHub
Nov 08, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Demonstrate that artifact invalidation works (#44312)" (#44463)
This reverts commit
c1d029b8
.
parent
69a783b8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
114 deletions
+0
-114
test.dart
dev/bots/test.dart
+0
-2
apk_invalidation_test.dart
dev/devicelab/bin/tasks/apk_invalidation_test.dart
+0
-112
No files found.
dev/bots/test.dart
View file @
eeb88f43
...
...
@@ -742,8 +742,6 @@ Future<void> _runHostOnlyDeviceLabTests() async {
// seed is fixed so that issues are reproducible.
final
List
<
ShardRunner
>
tests
=
<
ShardRunner
>[
// Keep this in alphabetical order.
// TODO(jonahwilliams): enable APK invalidation in Windows shard.
if
(!
Platform
.
isWindows
)
()
=>
_runDevicelabTest
(
'apk_invalidation_test'
,
environment:
gradleEnvironment
),
()
=>
_runDevicelabTest
(
'build_aar_module_test'
,
environment:
gradleEnvironment
),
if
(
Platform
.
isMacOS
)
()
=>
_runDevicelabTest
(
'flutter_create_offline_test_mac'
),
if
(
Platform
.
isLinux
)
()
=>
_runDevicelabTest
(
'flutter_create_offline_test_linux'
),
...
...
dev/devicelab/bin/tasks/apk_invalidation_test.dart
deleted
100644 → 0
View file @
69a783b8
// Copyright (c) 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:async'
;
import
'dart:io'
;
import
'package:flutter_devicelab/framework/apk_utils.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/utils.dart'
;
import
'package:path/path.dart'
as
path
;
final
String
gradlew
=
Platform
.
isWindows
?
'gradlew.bat'
:
'gradlew'
;
final
String
gradlewExecutable
=
Platform
.
isWindows
?
'.
\\
$gradlew
'
:
'./
$gradlew
'
;
final
bool
useAndroidEmbeddingV2
=
Platform
.
environment
[
'ENABLE_ANDROID_EMBEDDING_V2'
]
==
'true'
;
/// Tests that the Flutter module project template works and supports
/// adding Flutter to an existing Android app.
Future
<
void
>
main
()
async
{
await
task
(()
async
{
section
(
'Find Java'
);
final
String
javaHome
=
await
findJavaHome
();
if
(
javaHome
==
null
)
return
TaskResult
.
failure
(
'Could not find Java'
);
print
(
'
\n
Using JAVA_HOME=
$javaHome
'
);
section
(
'Create Flutter module project'
);
final
Directory
tempDir
=
Directory
.
systemTemp
.
createTempSync
(
'flutter_module_test.'
);
final
Directory
projectDir
=
Directory
(
path
.
join
(
tempDir
.
path
,
'hello'
));
try
{
await
inDirectory
(
tempDir
,
()
async
{
await
flutter
(
'create'
,
options:
<
String
>[
'--org'
,
'io.flutter.devicelab'
,
'hello'
],
);
});
section
(
'Add assets'
);
final
File
pubspec
=
File
(
path
.
join
(
projectDir
.
path
,
'pubspec.yaml'
));
String
content
=
await
pubspec
.
readAsString
();
content
=
content
.
replaceFirst
(
'
\n
flutter:
\n
'
,
'
\n
flutter:
\n
assets:
\n
- assets/
\n
'
,
);
await
pubspec
.
writeAsString
(
content
,
flush:
true
);
File
(
path
.
join
(
projectDir
.
path
,
'assets'
,
'a.txt'
))
..
createSync
(
recursive:
true
);
File
(
path
.
join
(
projectDir
.
path
,
'assets'
,
'b.txt'
))
..
createSync
();
await
inDirectory
(
projectDir
,
()
async
{
await
flutter
(
'packages'
,
options:
<
String
>[
'get'
],
);
});
section
(
'Build Flutter APK'
);
await
inDirectory
(
projectDir
,
()
async
{
await
flutter
(
'build'
,
options:
<
String
>[
'apk'
,
'--debug'
],
);
});
final
String
apkPath
=
path
.
join
(
projectDir
.
path
,
'build'
,
'app'
,
'outputs'
,
'apk'
,
'debug'
,
'app-debug.apk'
,
);
checkItContains
<
String
>(<
String
>[
...
flutterAssets
,
...
baseApkFiles
,
'assets/flutter_assets/assets/a.txt'
,
'assets/flutter_assets/assets/b.txt'
,
],
await
getFilesInApk
(
apkPath
));
section
(
'Invalidate asset bundle'
);
File
(
path
.
join
(
projectDir
.
path
,
'assets'
,
'b.txt'
))
..
deleteSync
();
await
inDirectory
(
projectDir
,
()
async
{
await
flutter
(
'build'
,
options:
<
String
>[
'apk'
,
'--debug'
],
);
});
checkItDoesNotContain
(<
String
>[
'assets/flutter_assets/assets/b.txt'
,
],
await
getFilesInApk
(
apkPath
));
return
TaskResult
.
success
(
null
);
}
on
TaskResult
catch
(
taskResult
)
{
return
taskResult
;
}
catch
(
e
)
{
return
TaskResult
.
failure
(
e
.
toString
());
}
finally
{
rmTree
(
tempDir
);
}
});
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment