mirror of
https://github.com/dart-lang/sdk
synced 2024-10-04 16:44:59 +00:00
[infra] Remove uses of dart2js, dartanalyzer, and pub from debian package creation
Bug: https://github.com/dart-lang/sdk/issues/46100 Change-Id: I91883bc78aa9d524932e588184bc8ff874d28d3d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231080 Reviewed-by: Jonas Termansen <sortie@google.com> Commit-Queue: William Hesse <whesse@google.com>
This commit is contained in:
parent
984ec03a80
commit
3e6c900d4b
|
@ -52,9 +52,7 @@ def Run(command):
|
|||
|
||||
|
||||
def TestInstallation(assume_installed=True):
|
||||
paths = ['/usr/bin/dart']
|
||||
for tool in ['dart2js', 'pub', 'dart', 'dartanalyzer']:
|
||||
paths.append(os.path.join('/usr/lib/dart/bin', tool))
|
||||
paths = ['/usr/bin/dart', '/usr/lib/dart/bin/dart']
|
||||
for path in paths:
|
||||
if os.path.exists(path):
|
||||
if not assume_installed:
|
||||
|
@ -100,7 +98,7 @@ def SrcSteps():
|
|||
])
|
||||
|
||||
if os.path.exists('/usr/bin/dart') or os.path.exists(
|
||||
'/usr/lib/dart/bin/dart2js'):
|
||||
'/usr/lib/dart/bin/dart'):
|
||||
print("Dart already installed, removing")
|
||||
UninstallDart()
|
||||
TestInstallation(assume_installed=False)
|
||||
|
@ -118,11 +116,11 @@ def SrcSteps():
|
|||
# run as root)
|
||||
Run(['cp', '/usr/bin/dart', 'out/ReleaseX64/dart'])
|
||||
|
||||
# Sanity check dart2js and the analyzer against a hello world program
|
||||
# Check dart, dart compile js, and dart analyze against a hello world program
|
||||
with utils.TempDir() as temp_dir:
|
||||
test_file = CreateDartTestFile(temp_dir)
|
||||
Run(['/usr/lib/dart/bin/dart2js', test_file])
|
||||
Run(['/usr/lib/dart/bin/dartanalyzer', test_file])
|
||||
Run(['/usr/lib/dart/bin/dart', 'compile', 'js', test_file])
|
||||
Run(['/usr/lib/dart/bin/dart', 'analyze', test_file])
|
||||
Run(['/usr/lib/dart/bin/dart', test_file])
|
||||
|
||||
UninstallDart()
|
||||
|
|
Loading…
Reference in a new issue