Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions testing/symbols/verify_exported.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,14 @@ import 'package:path/path.dart' as p;
/// Takes the path to the out directory as the first argument, and the path to
/// the buildtools directory as the second argument.
///
/// If the second argument is not specified, it is assumed that it is the parent
/// of the out directory (for backwards compatibility).
/// If the second argument is not specified, for backwards compatibility, it is
/// assumed that it is ../buildtools relative to the first parameter (the out
/// directory).
void main(List<String> arguments) {
assert(arguments.length == 2 || arguments.length == 1);
if (arguments.isEmpty || arguments.length > 2) {
print('usage: dart verify_exported.dart OUT_DIR [BUILDTOOLS]');
exit(1);
}
final String outPath = arguments.first;
final String buildToolsPath = arguments.length == 1
? p.join(p.dirname(outPath), 'buildtools')
Expand All @@ -39,7 +43,10 @@ void main(List<String> arguments) {
throw UnimplementedError('Script only support running on Linux or MacOS.');
}
final String nmPath = p.join(buildToolsPath, platform, 'clang', 'bin', 'llvm-nm');
assert(Directory(outPath).existsSync());
if (!Directory(outPath).existsSync()) {
print('error: build out directory not found: $outPath');
exit(1);
}

final Iterable<String> releaseBuilds = Directory(outPath).listSync()
.whereType<Directory>()
Expand Down