| Index: samples/sample_extension/test/sample_extension_test.dart
|
| ===================================================================
|
| --- samples/sample_extension/test/sample_extension_test.dart (revision 32137)
|
| +++ samples/sample_extension/test/sample_extension_test.dart (working copy)
|
| @@ -25,14 +25,14 @@
|
| }
|
| }
|
|
|
| -String getNativeLibraryPath(String buildDirectory) {
|
| +String getNativeLibraryPath(String buildDirectory, String libname) {
|
| switch (Platform.operatingSystem) {
|
| case 'linux':
|
| - return join(buildDirectory, 'lib.target', 'libsample_extension.so');
|
| + return join(buildDirectory, 'lib.target', 'lib${libname}.so');
|
| case 'macos':
|
| - return join(buildDirectory, 'libsample_extension.dylib');
|
| + return join(buildDirectory, 'lib${libname}.dylib');
|
| case 'windows':
|
| - return join(buildDirectory, 'sample_extension.dll');
|
| + return join(buildDirectory, '${libname}.dll');
|
| default:
|
| Expect.fail('Unknown operating system ${Platform.operatingSystem}');
|
| }
|
| @@ -47,16 +47,29 @@
|
|
|
| // Copy sample_extension shared library, sample_extension dart files and
|
| // sample_extension tests to the temporary test directory.
|
| - copyFileToDirectory(getNativeLibraryPath(buildDirectory), testDirectory)
|
| - .then((_) => Future.forEach(['sample_synchronous_extension.dart',
|
| - 'sample_asynchronous_extension.dart',
|
| - 'test_sample_synchronous_extension.dart',
|
| - 'test_sample_asynchronous_extension.dart'],
|
| + copyFileToDirectory(
|
| + getNativeLibraryPath(buildDirectory, "sample_extension"),
|
| + testDirectory)
|
| + .then((_) => copyFileToDirectory(
|
| + getNativeLibraryPath(buildDirectory, "sample_extension_no_autoscope"),
|
| + testDirectory))
|
| + .then((_) => Future.forEach([
|
| + 'sample_synchronous_extension.dart',
|
| + 'sample_asynchronous_extension.dart',
|
| + 'sample_synchronous_extension_no_autoscope.dart',
|
| + 'sample_asynchronous_extension_no_autoscope.dart',
|
| + 'test_sample_synchronous_extension.dart',
|
| + 'test_sample_asynchronous_extension.dart',
|
| + 'test_sample_synchronous_extension_no_autoscope.dart',
|
| + 'test_sample_asynchronous_extension_no_autoscope.dart'],
|
| (file) => copyFileToDirectory(join(sourceDirectory, file), testDirectory)
|
| ))
|
|
|
| - .then((_) => Future.forEach(['test_sample_synchronous_extension.dart',
|
| - 'test_sample_asynchronous_extension.dart'],
|
| + .then((_) => Future.forEach(
|
| + ['test_sample_synchronous_extension.dart',
|
| + 'test_sample_asynchronous_extension.dart',
|
| + 'test_sample_synchronous_extension_no_autoscope.dart',
|
| + 'test_sample_asynchronous_extension_no_autoscope.dart'],
|
| (test) => Process.run(Platform.executable, [join(testDirectory, test)])
|
| .then((ProcessResult result) {
|
| if (result.exitCode != 0) {
|
|
|