Make DTLSHandshakeCB easier to read/understand.
[platform/upstream/iotivity.git] / auto_build.py
index a1fdd37..a89fdee 100644 (file)
@@ -53,6 +53,8 @@ def build_all(flag, extra_option_str):
         build_linux_unsecured_with_mq(flag, extra_option_str)
         build_linux_unsecured_with_tcp(flag, extra_option_str)
         build_linux_secured_with_tcp(flag, extra_option_str)
+        build_linux_unsecured_with_java(flag, extra_option_str)
+        build_linux_secured_with_java(flag, extra_option_str)
         build_simulator(flag, extra_option_str)
 
         build_android(flag, extra_option_str)
@@ -73,6 +75,7 @@ def build_linux_unsecured(flag, extra_option_str):
     print ("*********** Build for linux ************")
     build_options = {
                         'RELEASE':flag,
+                        'SECURED':0,
                     }
     call_scons(build_options, extra_option_str)
 
@@ -82,7 +85,25 @@ def build_linux_secured_with_tcp(flag, extra_option_str):
                         'RELEASE':flag,
                         'WITH_TCP': 1,
                         'WITH_CLOUD':1,
-                        'SECURED':1,
+                    }
+    call_scons(build_options, extra_option_str)
+
+def build_linux_unsecured_with_java(flag, extra_option_str):
+    print ("*********** Build for linux with Java support ************")
+    build_options = {
+                        'RELEASE':flag,
+                        'BUILD_JAVA': 1,
+                        'TARGET_TRANSPORT': 'IP',
+                    }
+    call_scons(build_options, extra_option_str)
+
+def build_linux_secured_with_java(flag, extra_option_str):
+    print ("*********** Build for linux with Java support and secured ************")
+    build_options = {
+                        'RELEASE':flag,
+                        'BUILD_JAVA': 1,
+                        'TARGET_TRANSPORT': 'IP',
+                        'SECURED': 1,
                     }
     call_scons(build_options, extra_option_str)
 
@@ -92,6 +113,7 @@ def build_linux_unsecured_with_tcp(flag, extra_option_str):
                         'RELEASE':flag,
                         'WITH_TCP': 1,
                         'TARGET_TRANSPORT': 'IP',
+                        'SECURED':0,
                     }
     call_scons(build_options, extra_option_str)
 
@@ -100,6 +122,7 @@ def build_linux_unsecured_with_rm(flag, extra_option_str):
     build_options = {
                         'ROUTING':'GW',
                         'RELEASE':flag,
+                        'SECURED':0,
                     }
     call_scons(build_options, extra_option_str)
 
@@ -107,7 +130,6 @@ def build_linux_secured(flag, extra_option_str):
     print ("*********** Build for linux with Security *************")
     build_options = {
                         'RELEASE':flag,
-                        'SECURED':1,
                     }
     call_scons(build_options, extra_option_str)
 
@@ -117,6 +139,7 @@ def build_linux_unsecured_with_ra(flag, extra_option_str):
                         'RELEASE':flag,
                         'WITH_RA':1,
                         'WITH_RA_IBB':1,
+                        'SECURED':0,
                     }
     call_scons(build_options, extra_option_str)
 
@@ -126,7 +149,6 @@ def build_linux_secured_with_ra(flag, extra_option_str):
                         'RELEASE':flag,
                         'WITH_RA':1,
                         'WITH_RA_IBB':1,
-                        'SECURED':1,
                     }
     call_scons(build_options, extra_option_str)
 
@@ -135,6 +157,7 @@ def build_linux_unsecured_with_rd(flag, extra_option_str):
     build_options = {
                         'RELEASE':flag,
                         'RD_MODE':'all',
+                        'SECURED':0,
                     }
     call_scons(build_options, extra_option_str)
 
@@ -143,7 +166,6 @@ def build_linux_secured_with_rd(flag, extra_option_str):
     build_options = {
                         'RELEASE':flag,
                         'RD_MODE':'all',
-                        'SECURED':1,
                     }
     call_scons(build_options, extra_option_str)
 
@@ -152,6 +174,7 @@ def build_linux_unsecured_with_mq(flag, extra_option_str):
     build_options = {
                         'RELEASE':flag,
                         'WITH_MQ':'PUB,SUB,BROKER',
+                        'SECURED':0,
                     }
     call_scons(build_options, extra_option_str)
 
@@ -160,6 +183,7 @@ def build_linux_unsecured_with_tcp(flag, extra_option_str):
     build_options = {
                         'RELEASE':flag,
                         'WITH_TCP':'1',
+                        'SECURED':0,
                     }
     call_scons(build_options, extra_option_str)
 
@@ -364,7 +388,7 @@ def build_tizen(flag, extra_option_str):
     print ("Running : " + cmd_line)
     subprocess.Popen([cmd_line], shell=True).wait()
 
-    print ("*********** Build for Tizen octbstack lib and sample *************")
+    print ("*********** Build for Tizen octbstack lib and sample with security *************")
     extra_option_str = "-f resource/csdk/stack/samples/tizen/build/SConscript " + extra_option_str
     build_options = {
                         'TARGET_OS':'tizen',
@@ -374,12 +398,11 @@ def build_tizen(flag, extra_option_str):
                     }
     call_scons(build_options, extra_option_str)
 
-    print ("*********** Build for Tizen octbstack lib and sample with Security*************")
-    build_options['SECURED'] = 1
+    print ("*********** Build for Tizen octbstack lib and sample *************")
+    build_options['SECURED'] = 0
     call_scons(build_options, extra_option_str)
 
     print ("*********** Build for Tizen octbstack lib and sample with Routing Manager*************")
-    del build_options['SECURED']
     build_options['ROUTING'] = 'GW'
     call_scons(build_options, extra_option_str)
 
@@ -428,7 +451,6 @@ def build_windows(flag, extra_option_str):
                         'RELEASE':flag,
                         'WITH_RA':0,
                         'TARGET_TRANSPORT':'IP',
-                        'SECURED':1,
                         'WITH_TCP':0,
                         'BUILD_SAMPLE':'ON',
                         'LOGGING':'off',
@@ -447,7 +469,6 @@ def build_msys(flag, extra_option_str):
                         'RELEASE':flag,
                         'WITH_RA':0,
                         'TARGET_TRANSPORT':'IP',
-                        'SECURED':1,
                         'WITH_TCP':0,
                         'BUILD_SAMPLE':'ON',
                         'LOGGING':'off',
@@ -469,21 +490,22 @@ def unit_tests():
     build_options = {
                         'RELEASE':'false',
                     }
-    extra_option_str = "resource -c"
+    extra_option_str = "-c ."
     call_scons(build_options, extra_option_str)
 
     build_options = {
-                        'LOGGING':'false',
+                        'TEST':1,
                         'RELEASE':'false',
+                        'SECURED':0,
                     }
-    extra_option_str = "resource"
+    extra_option_str = ""
     call_scons(build_options, extra_option_str)
 
     build_options = {
                         'TEST':1,
+                        'SECURED':1,
                         'RELEASE':'false',
                     }
-    extra_option_str = "resource"
     call_scons(build_options, extra_option_str)
 
     print ("*********** Unit test Stop *************")
@@ -555,6 +577,14 @@ elif arg_num == 2:
         build_linux_secured_with_tcp("false", "")
         build_linux_secured_with_tcp("true", "")
 
+    elif str(sys.argv[1]) == "linux_unsecured_with_java":
+        build_linux_unsecured_with_java("false", "")
+        build_linux_unsecured_with_java("true", "")
+
+    elif str(sys.argv[1]) == "linux_secured_with_java":
+        build_linux_secured_with_java("false", "")
+        build_linux_secured_with_java("true", "")
+
     elif str(sys.argv[1]) == "android":
         build_android("true", "")
         build_android("false", "")