Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / native_client / buildbot / buildbot_pnacl.py
index 9017e5b..1bbd20c 100755 (executable)
@@ -3,8 +3,10 @@
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
+import sys
+
 from buildbot_lib import (
-    BuildContext, BuildStatus, ParseStandardCommandLine,
+    BuildContext, BuildStatus, Command, ParseStandardCommandLine,
     RemoveSconsBuildDirectories, RunBuild, SetupLinuxEnvironment,
     SetupMacEnvironment, SetupWindowsEnvironment, SCons, Step )
 
@@ -14,6 +16,10 @@ def RunSconsTests(status, context):
   with Step('clobber scons', status):
     RemoveSconsBuildDirectories()
 
+  # Run checkdeps script to vet #includes.
+  with Step('checkdeps', status):
+    Command(context, cmd=[sys.executable, 'tools/checkdeps/checkdeps.py'])
+
   # Unlike their arm counterparts we do not run trusted tests on x86 bots.
   # Trusted tests get plenty of coverage by other bots, e.g. nacl-gcc bots.
   # We make the assumption here that there are no "exotic tests" which
@@ -49,6 +55,22 @@ def RunSconsTests(status, context):
     SCons(context, parallel=True, mode=irt_mode,
           args=flags_run + smoke_tests_irt)
 
+  if arch != 'arm' and not context.Windows():
+    # Run a some nacl_clang tests. Eventually we will have bots that just run
+    # buildbot_standard with nacl_clang and this can be split out.
+    context['pnacl'] = False
+    context['nacl_clang'] = True
+    with Step('build_nacl_clang ' + arch, status, halt_on_fail=False):
+      SCons(context, parallel=True, args=flags_build)
+    with Step('smoke_tests_nacl_clang ' + arch, status, halt_on_fail=False):
+      SCons(context, parallel=True,
+            args=flags_run + ['small_tests', 'medium_tests'])
+    with Step('large_tests_nacl_clang ' + arch, status, halt_on_fail=False):
+      SCons(context, parallel=False,
+            args=flags_run + ['large_tests'])
+    context['pnacl'] = True
+    context['nacl_clang'] = False
+
   # Test sandboxed translation
   if not context.Windows() and not context.Mac():
     # TODO(dschuff): The standalone sandboxed translator driver does not have
@@ -88,6 +110,16 @@ def RunSconsTests(status, context):
                  'nonsfi_tests',
                  'nonsfi_tests_irt'])
 
+    # Build with pnacl_generate_pexe=0 to allow using pnacl-clang with
+    # direct-to-native mode. This allows assembly to be used in tests.
+    with Step('nonsfi_tests_nopnacl_generate_pexe ' + arch,
+              status, halt_on_fail=False):
+      SCons(context, parallel=True, mode=irt_mode,
+            args=flags_run +
+                ['nonsfi_nacl=1',
+                 'pnacl_generate_pexe=0',
+                 'nonsfi_tests'])
+
     # Test nonsfi_loader linked against host's libc.
     with Step('nonsfi_tests_host_libc ' + arch, status, halt_on_fail=False):
       # Using skip_nonstable_bitcode=1 here disables the tests for
@@ -114,6 +146,11 @@ def RunSconsTests(status, context):
       SCons(context, parallel=True, mode=irt_mode,
             args=flags_run + ['pnacl_unsandboxed=1'] + tests)
 
+  # Test MinSFI.
+  if not context.Windows() and (arch == 'x86-32' or arch == 'x86-64'):
+    with Step('minsfi_tests ' + arch, status, halt_on_fail=False):
+      SCons(context, parallel=True,
+            args=flags_run + ['minsfi=1', 'minsfi_tests'])
 
 def Main():
   context = BuildContext()