@@ -39,7 +39,7 @@ class FlutterTesterTestDevice extends TestDevice {
3939 @required this .enableObservatory,
4040 @required this .machine,
4141 @required this .host,
42- @required this .buildTestAssets ,
42+ @required this .testAssetDirectory ,
4343 @required this .flutterProject,
4444 @required this .icudtlPath,
4545 @required this .compileExpression,
@@ -66,7 +66,7 @@ class FlutterTesterTestDevice extends TestDevice {
6666 final bool enableObservatory;
6767 final bool machine;
6868 final InternetAddress host;
69- final bool buildTestAssets ;
69+ final String testAssetDirectory ;
7070 final FlutterProject flutterProject;
7171 final String icudtlPath;
7272 final CompileExpression compileExpression;
@@ -93,7 +93,6 @@ class FlutterTesterTestDevice extends TestDevice {
9393 // Let the server choose an unused port.
9494 _server = await bind (host, /*port*/ 0 );
9595 logger.printTrace ('test $id : test harness socket server is running at port:${_server .port }' );
96-
9796 final List <String > command = < String > [
9897 // Until an arm64 flutter tester binary is available, force to run in Rosetta
9998 // to avoid "unexpectedly got a signal in sigtramp" crash.
@@ -128,7 +127,10 @@ class FlutterTesterTestDevice extends TestDevice {
128127 '--enable-dart-profiling' ,
129128 '--non-interactive' ,
130129 '--use-test-fonts' ,
130+ '--disable-asset-fonts' ,
131131 '--packages=${debuggingOptions .buildInfo .packagesPath }' ,
132+ if (testAssetDirectory != null )
133+ '--flutter-assets-dir=$testAssetDirectory ' ,
132134 if (debuggingOptions.nullAssertions)
133135 '--dart-flags=--null_assertions' ,
134136 ...debuggingOptions.dartEntrypointArgs,
@@ -148,8 +150,8 @@ class FlutterTesterTestDevice extends TestDevice {
148150 'FONTCONFIG_FILE' : fontConfigManager.fontConfigFile.path,
149151 'SERVER_PORT' : _server.port.toString (),
150152 'APP_NAME' : flutterProject? .manifest? .appName ?? '' ,
151- if (buildTestAssets )
152- 'UNIT_TEST_ASSETS' : fileSystem.path. join (flutterProject ? .directory ? .path ?? '' , 'build' , 'unit_test_assets' ) ,
153+ if (testAssetDirectory != null )
154+ 'UNIT_TEST_ASSETS' : testAssetDirectory ,
153155 };
154156
155157 logger.printTrace ('test $id : Starting flutter_tester process with command=$command , environment=$environment ' );
0 commit comments