Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(331)

Side by Side Diff: tools/bots/pub.py

Issue 1172623003: Don't hardcode linux as the build os in pub annotated (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 2
3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
4 # for details. All rights reserved. Use of this source code is governed by a 4 # for details. All rights reserved. Use of this source code is governed by a
5 # BSD-style license that can be found in the LICENSE file. 5 # BSD-style license that can be found in the LICENSE file.
6 6
7 """ 7 """
8 Pub buildbot steps. 8 Pub buildbot steps.
9 9
10 Runs tests for pub and the pub packages that are hosted in the main Dart repo. 10 Runs tests for pub and the pub packages that are hosted in the main Dart repo.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 print "Running %s" % ' '.join(command) 46 print "Running %s" % ' '.join(command)
47 return bot.RunProcess(command) 47 return bot.RunProcess(command)
48 48
49 def PubSteps(build_info): 49 def PubSteps(build_info):
50 sdk_bin = os.path.join( 50 sdk_bin = os.path.join(
51 bot_utils.DART_DIR, 51 bot_utils.DART_DIR,
52 utils.GetBuildSdkBin(BUILD_OS, build_info.mode, build_info.arch)) 52 utils.GetBuildSdkBin(BUILD_OS, build_info.mode, build_info.arch))
53 pub_script_name = 'pub.bat' if build_info.system == 'windows' else 'pub' 53 pub_script_name = 'pub.bat' if build_info.system == 'windows' else 'pub'
54 pub_bin = os.path.join(sdk_bin, pub_script_name) 54 pub_bin = os.path.join(sdk_bin, pub_script_name)
55 55
56 pub_copy = os.path.join(utils.GetBuildRoot('linux'), 'pub_copy') 56 pub_copy = os.path.join(utils.GetBuildRoot(BUILD_OS), 'pub_copy')
57 pub_location = os.path.join('third_party', 'pkg', 'pub') 57 pub_location = os.path.join('third_party', 'pkg', 'pub')
58 58
59 with bot.BuildStep('Make copy of pub for testing'): 59 with bot.BuildStep('Make copy of pub for testing'):
60 print 'Removing old copy %s' % pub_copy 60 print 'Removing old copy %s' % pub_copy
61 shutil.rmtree(pub_copy, ignore_errors=True) 61 shutil.rmtree(pub_copy, ignore_errors=True)
62 print 'Copying %s to %s' % (pub_location, pub_copy) 62 print 'Copying %s to %s' % (pub_location, pub_copy)
63 shutil.copytree(pub_location, pub_copy) 63 shutil.copytree(pub_location, pub_copy)
64 64
65 # TODO(nweiz): add logic for testing pub. 65 # TODO(nweiz): add logic for testing pub.
66 with bot.BuildStep('Doing the magic ls'): 66 with bot.BuildStep('Doing the magic ls'):
67 with utils.ChangedWorkingDirectory(pub_copy): 67 with utils.ChangedWorkingDirectory(pub_copy):
68 Run(['ls', '-l']) 68 Run(['ls', '-l'])
69 69
70 with bot.BuildStep('Running pub'): 70 with bot.BuildStep('Running pub'):
71 Run([pub_bin, '--version']) 71 Run([pub_bin, '--version'])
72 72
73 73
74 if __name__ == '__main__': 74 if __name__ == '__main__':
75 bot.RunBot(PubConfig, PubSteps) 75 bot.RunBot(PubConfig, PubSteps)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698