Unverified Commit b1b0d20a authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

[flutter_tools] revert change to SETLOCAL ENABLEDELAYEDEXPANSION (#86000)

parent 8a022dc2
......@@ -11,6 +11,8 @@ REM work across all platforms!
REM
REM --------------------------------------------------------------------------
SETLOCAL ENABLEDELAYEDEXPANSION
FOR %%i IN ("%~dp0..") DO SET FLUTTER_ROOT=%%~fi
REM Include shared scripts in shared.bat
......
......@@ -11,6 +11,8 @@ REM work across all platforms!
REM
REM --------------------------------------------------------------------------
SETLOCAL ENABLEDELAYEDEXPANSION
FOR %%i IN ("%~dp0..") DO SET FLUTTER_ROOT=%%~fi
REM If available, add location of bundled mingit to PATH
......
// 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 '../src/common.dart';
import 'test_utils.dart' show fileSystem;
import 'test_utils.dart' show fileSystem, platform;
const ProcessManager processManager = LocalProcessManager();
final String flutterRoot = getFlutterRoot();
......@@ -315,7 +315,7 @@ void main() {
} finally {
tryToDelete(fileSystem.directory(tempDirectory));
}
});
}, skip: platform.isWindows);
testWithoutContext('flutter run handle SIGUSR1/2', () async {
final String tempDirectory = fileSystem.systemTempDirectory.createTempSync('flutter_overall_experience_test.').resolveSymbolicLinksSync();
......@@ -591,5 +591,5 @@ void main() {
'',
'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).+"',
]);
expect(result.stdout, contains('args: ["(?!Golden).+"]'));
}, skip: !platform.isWindows);
}, skip: 'Reverted in https://github.com/flutter/flutter/pull/86000');
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment