[flutter_tools] revert change to SETLOCAL ENABLEDELAYEDEXPANSION (#86000)
This commit is contained in:
parent
8a022dc2f8
commit
b1b0d20a95
@ -11,6 +11,8 @@ REM work across all platforms!
|
|||||||
REM
|
REM
|
||||||
REM --------------------------------------------------------------------------
|
REM --------------------------------------------------------------------------
|
||||||
|
|
||||||
|
SETLOCAL ENABLEDELAYEDEXPANSION
|
||||||
|
|
||||||
FOR %%i IN ("%~dp0..") DO SET FLUTTER_ROOT=%%~fi
|
FOR %%i IN ("%~dp0..") DO SET FLUTTER_ROOT=%%~fi
|
||||||
|
|
||||||
REM Include shared scripts in shared.bat
|
REM Include shared scripts in shared.bat
|
||||||
|
@ -11,6 +11,8 @@ REM work across all platforms!
|
|||||||
REM
|
REM
|
||||||
REM --------------------------------------------------------------------------
|
REM --------------------------------------------------------------------------
|
||||||
|
|
||||||
|
SETLOCAL ENABLEDELAYEDEXPANSION
|
||||||
|
|
||||||
FOR %%i IN ("%~dp0..") DO SET FLUTTER_ROOT=%%~fi
|
FOR %%i IN ("%~dp0..") DO SET FLUTTER_ROOT=%%~fi
|
||||||
|
|
||||||
REM If available, add location of bundled mingit to PATH
|
REM If available, add location of bundled mingit to PATH
|
||||||
|
@ -0,0 +1,62 @@
|
|||||||
|
// Copyright 2014 The Flutter Authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
|
// found in the LICENSE file.
|
||||||
|
|
||||||
|
// @dart = 2.8
|
||||||
|
|
||||||
|
import 'package:file/file.dart';
|
||||||
|
import 'package:flutter_tools/src/base/io.dart';
|
||||||
|
|
||||||
|
import '../src/common.dart';
|
||||||
|
import 'test_utils.dart';
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
final String dartBin = fileSystem.path.join(getFlutterRoot(), 'bin', 'dart');
|
||||||
|
Directory tempDir;
|
||||||
|
|
||||||
|
setUp(() {
|
||||||
|
tempDir = createResolvedTempDirectorySync('exit_code_test.');
|
||||||
|
});
|
||||||
|
|
||||||
|
tearDown(() {
|
||||||
|
tryToDelete(tempDir);
|
||||||
|
});
|
||||||
|
|
||||||
|
testWithoutContext('dart.sh/bat can return a zero exit code', () async {
|
||||||
|
tempDir.childFile('main.dart')
|
||||||
|
.writeAsStringSync('''
|
||||||
|
import 'dart:io';
|
||||||
|
void main() {
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
''');
|
||||||
|
|
||||||
|
final ProcessResult result = await processManager.run(<String>[
|
||||||
|
dartBin,
|
||||||
|
fileSystem.path.join(tempDir.path, 'main.dart'),
|
||||||
|
]);
|
||||||
|
|
||||||
|
print(result.stdout);
|
||||||
|
print(result.stderr);
|
||||||
|
expect(result.exitCode, 0);
|
||||||
|
});
|
||||||
|
|
||||||
|
testWithoutContext('dart.sh/bat can return a non-zero exit code', () async {
|
||||||
|
tempDir.childFile('main.dart')
|
||||||
|
.writeAsStringSync('''
|
||||||
|
import 'dart:io';
|
||||||
|
void main() {
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
''');
|
||||||
|
|
||||||
|
final ProcessResult result = await processManager.run(<String>[
|
||||||
|
dartBin,
|
||||||
|
fileSystem.path.join(tempDir.path, 'main.dart'),
|
||||||
|
]);
|
||||||
|
|
||||||
|
print(result.stdout);
|
||||||
|
print(result.stderr);
|
||||||
|
expect(result.exitCode, 1);
|
||||||
|
});
|
||||||
|
}
|
@ -33,7 +33,7 @@ import 'package:pedantic/pedantic.dart';
|
|||||||
import 'package:process/process.dart';
|
import 'package:process/process.dart';
|
||||||
|
|
||||||
import '../src/common.dart';
|
import '../src/common.dart';
|
||||||
import 'test_utils.dart' show fileSystem;
|
import 'test_utils.dart' show fileSystem, platform;
|
||||||
|
|
||||||
const ProcessManager processManager = LocalProcessManager();
|
const ProcessManager processManager = LocalProcessManager();
|
||||||
final String flutterRoot = getFlutterRoot();
|
final String flutterRoot = getFlutterRoot();
|
||||||
@ -315,7 +315,7 @@ void main() {
|
|||||||
} finally {
|
} finally {
|
||||||
tryToDelete(fileSystem.directory(tempDirectory));
|
tryToDelete(fileSystem.directory(tempDirectory));
|
||||||
}
|
}
|
||||||
});
|
}, skip: platform.isWindows);
|
||||||
|
|
||||||
testWithoutContext('flutter run handle SIGUSR1/2', () async {
|
testWithoutContext('flutter run handle SIGUSR1/2', () async {
|
||||||
final String tempDirectory = fileSystem.systemTempDirectory.createTempSync('flutter_overall_experience_test.').resolveSymbolicLinksSync();
|
final String tempDirectory = fileSystem.systemTempDirectory.createTempSync('flutter_overall_experience_test.').resolveSymbolicLinksSync();
|
||||||
@ -591,5 +591,5 @@ void main() {
|
|||||||
'',
|
'',
|
||||||
'Application finished.',
|
'Application finished.',
|
||||||
]);
|
]);
|
||||||
});
|
}, skip: Platform.isWindows); // TODO(jonahwilliams): Re-enable when this test is reliable on device lab, https://github.com/flutter/flutter/issues/81556
|
||||||
}
|
}
|
||||||
|
@ -17,5 +17,5 @@ void main() {
|
|||||||
'"^(?!Golden).+"',
|
'"^(?!Golden).+"',
|
||||||
]);
|
]);
|
||||||
expect(result.stdout, contains('args: ["(?!Golden).+"]'));
|
expect(result.stdout, contains('args: ["(?!Golden).+"]'));
|
||||||
}, skip: !platform.isWindows);
|
}, skip: 'Reverted in https://github.com/flutter/flutter/pull/86000');
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user