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

Unified Diff: chrome/test/mini_installer/test_installer.py

Issue 304673004: Cause mini_installer tests to noop on component builds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Dear Greg. Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/installer/mini_installer/mini_installer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/mini_installer/test_installer.py
diff --git a/chrome/test/mini_installer/test_installer.py b/chrome/test/mini_installer/test_installer.py
index 669ca7bc5aec2209fb058b604d051bc6886f271f..af6b2c3a33108757dd5dc9505d06a2325b18969f 100644
--- a/chrome/test/mini_installer/test_installer.py
+++ b/chrome/test/mini_installer/test_installer.py
@@ -242,6 +242,21 @@ def RunTests(mini_installer_path, config, force_clean):
return result.wasSuccessful()
+def IsComponentBuild(mini_installer_path):
+ """ Invokes the mini_installer asking whether it is a component build.
+
+ Args:
+ mini_installer_path: The path to mini_installer.exe.
+
+ Returns:
+ True if the mini_installer is a component build, False otherwise.
+ """
+ query_command = mini_installer_path + ' --query-component-build'
+ script_dir = os.path.dirname(os.path.abspath(__file__))
+ exit_status = subprocess.call(query_command, shell=True, cwd=script_dir)
+ return exit_status != 0
+
+
def main():
usage = 'usage: %prog [options] config_filename'
parser = optparse.OptionParser(usage, description='Test the installer.')
@@ -261,6 +276,14 @@ def main():
'mini_installer.exe')
assert os.path.exists(mini_installer_path), ('Could not find file %s' %
mini_installer_path)
+
+ # Set the env var used by mini_installer.exe to decide to not show UI.
+ os.environ['MINI_INSTALLER_TEST'] = '1'
+ if IsComponentBuild(mini_installer_path):
+ print ('Component build is currently unsupported by the mini_installer: '
+ 'http://crbug.com/377839')
+ return 0
gab 2014/06/06 16:08:11 Since we return here why do we also need logic via
robertshield 2014/06/06 17:19:21 IsComponentBuild calls mini_installer.
gab 2014/06/06 17:25:03 I see, but couldn't the early return for the query
robertshield 2014/06/06 17:49:06 Sure, that would make mini_installer.cc a bit mess
gab 2014/06/10 18:43:43 "temporary" ;-). Are the mini_installer_tests bac
+
config = ParseConfigFile(config_filename)
if not RunTests(mini_installer_path, config, options.force_clean):
return 1
« no previous file with comments | « chrome/installer/mini_installer/mini_installer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698