Best Python code snippet using autotest_python
SConscript
Source:SConscript
1from building import *2# get current directory3cwd = GetCurrentDir()4# 1. The minimum set of files needed for lwIP.5lwipcore_SRCS = Split("""6src/core/init.c7src/core/def.c8src/core/dns.c9src/core/inet_chksum.c10src/core/ip.c11src/core/memp.c12src/core/netif.c13src/core/pbuf.c14src/core/raw.c15src/core/stats.c16src/core/sys.c17src/core/tcp.c18src/core/tcp_in.c19src/core/tcp_out.c20src/core/timeouts.c21src/core/udp.c22""")23# 1.1 24lwipcore_altcp_SRCS = Split("""25src/core/altcp.c26src/core/altcp_alloc.c27src/core/altcp_tcp.c28""")29# 1.2 30lwipcore4_SRCS = Split("""31src/core/ipv4/autoip.c32src/core/ipv4/dhcp.c33src/core/ipv4/etharp.c34src/core/ipv4/icmp.c35src/core/ipv4/igmp.c36src/core/ipv4/ip4_frag.c37src/core/ipv4/ip4.c38src/core/ipv4/ip4_addr.c39""")40# 1.3 41lwipcore6_SRCS = Split("""42src/core/ipv6/dhcp6.c43src/core/ipv6/ethip6.c44src/core/ipv6/icmp6.c45src/core/ipv6/inet6.c46src/core/ipv6/ip6.c47src/core/ipv6/ip6_addr.c48src/core/ipv6/ip6_frag.c49src/core/ipv6/mld6.c50src/core/ipv6/nd6.c51""")52# 2. APIFILES: The files which implement the sequential and socket APIs.53lwipapi_SRCS = Split("""54src/api/api_lib.c55src/api/api_msg.c56src/api/err.c57src/api/if_api.c58src/api/netbuf.c59src/api/netdb.c60src/api/netifapi.c61src/api/sockets.c62src/api/tcpip.c63""")64# 3. Files implementing various generic network interface functions65lwipnetif_SRCS = Split("""66src/netif/ethernet.c67src/netif/ethernetif.c68""")69# 3.1 Files implementing an IEEE 802.1D bridge by using a multilayer netif approach70lwipnetif_bridgeif_SRCS = Split("""71src/netif/bridgeif.c72src/netif/bridgeif_fdb.c73""")74# 3.2 A generic implementation of the SLIP (Serial Line IP) protocol.75lwipnetif_slipif_SRCS = Split("""76src/netif/slipif.c77""")78# 4. 6LoWPAN79lwipsixlowpan_SRCS = Split("""80src/netif/lowpan6.c81""")82# 4.1 A 6LoWPAN over Bluetooth Low Energy (BLE) implementation as netif,83# according to RFC-7668.84lwipsixlowpan_ble_SRCS = Split("""85src/netif/lowpan6_ble.c86""")87# 4.2 Common 6LowPAN routines for IPv6.88lwipsixlowpan_ipv6_SRCS = Split("""89src/netif/lowpan6_common.c90""")91# 4.3 A netif implementing the ZigBee Encapsulation Protocol (ZEP).92lwipsixlowpan_zep_SRCS = Split("""93src/netif/zepif.c94""")95# 5. PPP96lwipppp_SRCS = Split("""97src/netif/ppp/auth.c98src/netif/ppp/ccp.c99src/netif/ppp/chap-md5.c100src/netif/ppp/chap_ms.c101src/netif/ppp/chap-new.c102src/netif/ppp/demand.c103src/netif/ppp/eap.c104src/netif/ppp/ecp.c105src/netif/ppp/eui64.c106src/netif/ppp/fsm.c107src/netif/ppp/ipcp.c108src/netif/ppp/ipv6cp.c109src/netif/ppp/lcp.c110src/netif/ppp/magic.c111src/netif/ppp/mppe.c112src/netif/ppp/multilink.c113src/netif/ppp/ppp.c114src/netif/ppp/pppapi.c115src/netif/ppp/pppcrypt.c116src/netif/ppp/pppoe.c117src/netif/ppp/pppol2tp.c118src/netif/ppp/pppos.c119src/netif/ppp/upap.c120src/netif/ppp/utils.c121src/netif/ppp/vj.c122src/netif/ppp/polarssl/arc4.c123src/netif/ppp/polarssl/des.c124src/netif/ppp/polarssl/md4.c125src/netif/ppp/polarssl/md5.c126src/netif/ppp/polarssl/sha1.c127""")128# 6. SNMPv3 agent129lwipsnmp_SRCS = Split("""130src/apps/snmp/snmp_asn1.c131src/apps/snmp/snmp_core.c132src/apps/snmp/snmp_mib2.c133src/apps/snmp/snmp_mib2_icmp.c134src/apps/snmp/snmp_mib2_interfaces.c135src/apps/snmp/snmp_mib2_ip.c136src/apps/snmp/snmp_mib2_snmp.c137src/apps/snmp/snmp_mib2_system.c138src/apps/snmp/snmp_mib2_tcp.c139src/apps/snmp/snmp_mib2_udp.c140src/apps/snmp/snmp_snmpv2_framework.c141src/apps/snmp/snmp_snmpv2_usm.c142src/apps/snmp/snmp_msg.c143src/apps/snmp/snmpv3.c144src/apps/snmp/snmp_netconn.c145src/apps/snmp/snmp_pbuf_stream.c146src/apps/snmp/snmp_raw.c147src/apps/snmp/snmp_scalar.c148src/apps/snmp/snmp_table.c149src/apps/snmp/snmp_threadsync.c150src/apps/snmp/snmp_traps.c151""")152# 7. HTTP server + client153lwiphttp_SRCS = Split("""154src/apps/http/altcp_proxyconnect.c155src/apps/http/fs.c156src/apps/http/http_client.c157src/apps/http/httpd.c158""")159# 8. MAKEFSDATA HTTP server host utility160lwipmakefsdata_SRCS = Split("""161src/apps/http/makefsdata/makefsdata.c162""")163# 9. IPERF server164lwipiperf_SRCS = Split("""165src/apps/lwiperf/lwiperf.c166""")167# 10. SMTP client168lwipsmtp_SRCS = Split("""169src/apps/smtp/smtp.c170""")171# 11. SNTP client172lwipsntp_SRCS = Split("""173src/apps/sntp/sntp.c174""")175# 12. MDNS responder176lwipmdns_SRCS = Split("""177src/apps/mdns/mdns.c178""")179# 13. NetBIOS name server180lwipnetbios_SRCS = Split("""181src/apps/netbiosns/netbiosns.c182""")183# 14. TFTP server files184lwiptftp_SRCS = Split("""185src/apps/tftp/tftp_server.c186src/apps/tftp/tftp_port.c187""")188# 15. MQTT client files189lwipmqtt_SRCS = Split("""190src/apps/mqtt/mqtt.c191""")192# 16. ARM MBEDTLS related files of lwIP rep193lwipmbedtls_SRCS = Split("""194src/apps/altcp_tls/altcp_tls_mbedtls.c195src/apps/altcp_tls/altcp_tls_mbedtls_mem.c196src/apps/snmp/snmpv3_mbedtls.c197""")198# 17. ping199lwipping_SRCS = Split("""200src/apps/ping/ping.c201""")202src = Split("""203src/arch/sys_arch.c204""")205src += lwipcore_SRCS # rm mem.c206src += lwipcore_altcp_SRCS207src += lwipapi_SRCS208src += lwipnetif_SRCS209src += lwipsixlowpan_SRCS210src += lwipcore4_SRCS211path = [cwd + '/src',212 cwd + '/src/include',213 cwd + '/src/arch/include',214 cwd + '/src/include/netif']215if not GetDepend('RT_USING_SAL'):216 path += [cwd + '/src/include/compat/posix']217if GetDepend(['RT_LWIP_SNMP']):218 src += lwipsnmp_SRCS219 path += [cwd + '/src/apps/snmp']220if GetDepend(['RT_LWIP_PPP']):221 src += lwipppp_SRCS222 path += [cwd + '/src/netif/ppp']223if GetDepend(['RT_USING_LWIP_IPV6']):224 src += lwipcore6_SRCS225if GetDepend(['RT_LWIP_USING_PING']):226 src += lwipping_SRCS227group = DefineGroup('lwIP', src, depend = ['RT_USING_LWIP', 'RT_USING_LWIP210'], CPPPATH = path)...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!