Fix auto_build.py on Python 2.7.10 for Windows
authorDavid Antler <david.a.antler@intel.com>
Thu, 6 Oct 2016 00:02:52 +0000 (17:02 -0700)
committerDave Thaler <dthaler@microsoft.com>
Thu, 13 Oct 2016 00:06:50 +0000 (00:06 +0000)
There are two fixes in this build.

* Prior to this change, Python was putting quotes around the SCons call.
  This behavior differs from Python 2.7.0.

* Prior to this change, "python auto_build.py" would try to build Android
  and fail.  Now we limit auto_build.py to only build Windows binaries on
  a Windows host.

Change-Id: I41ec4986c3dc57821cfdbe48f598e547e1934c71
Signed-off-by: David Antler <david.a.antler@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/12841
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Ajay Saini <ajay.saini@intel.com>
Reviewed-by: Mike Fenelon <mike.fenelon@microsoft.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
auto_build.py

index 977a133..a1fdd37 100644 (file)
@@ -37,7 +37,7 @@ def call_scons(build_options, extra_option_str):
 
     print ("Running : " + cmd_line)
     sys.stdout.flush()
-    exit_code = subprocess.Popen([cmd_line], shell=True).wait()
+    exit_code = subprocess.Popen(cmd_line, shell=True).wait()
     if exit_code != 0:
         exit(exit_code)
 
@@ -55,9 +55,9 @@ def build_all(flag, extra_option_str):
         build_linux_secured_with_tcp(flag, extra_option_str)
         build_simulator(flag, extra_option_str)
 
-    build_android(flag, extra_option_str)
-    build_arduino(flag, extra_option_str)
-    build_tizen(flag, extra_option_str)
+        build_android(flag, extra_option_str)
+        build_arduino(flag, extra_option_str)
+        build_tizen(flag, extra_option_str)
 
     if platform.system() == "Windows":
         build_windows(flag, extra_option_str)