cmake: Add serial port for ppp in qemu
In order to simplify ppp testing, use ppp specific serial port when starting qemu. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
parent
02239a99a2
commit
64bdad20b6
1 changed files with 23 additions and 7 deletions
|
@ -75,12 +75,15 @@ endif()
|
||||||
# If we are running a networking application in QEMU, then set proper
|
# If we are running a networking application in QEMU, then set proper
|
||||||
# QEMU variables. This also allows two QEMUs to be hooked together and
|
# QEMU variables. This also allows two QEMUs to be hooked together and
|
||||||
# pass data between them. The QEMU flags are not set for standalone
|
# pass data between them. The QEMU flags are not set for standalone
|
||||||
# tests defined by CONFIG_NET_TEST.
|
# tests defined by CONFIG_NET_TEST. For PPP, the serial port file is
|
||||||
|
# not available if we run unit tests which define CONFIG_NET_TEST.
|
||||||
if(CONFIG_NETWORKING)
|
if(CONFIG_NETWORKING)
|
||||||
if(CONFIG_NET_QEMU_SLIP)
|
if(CONFIG_NET_QEMU_SLIP)
|
||||||
if((CONFIG_NET_SLIP_TAP) OR (CONFIG_IEEE802154_UPIPE))
|
if((CONFIG_NET_SLIP_TAP) OR (CONFIG_IEEE802154_UPIPE))
|
||||||
set(QEMU_NET_STACK 1)
|
set(QEMU_NET_STACK 1)
|
||||||
endif()
|
endif()
|
||||||
|
elseif((CONFIG_NET_QEMU_PPP) AND NOT (CONFIG_NET_TEST))
|
||||||
|
set(QEMU_NET_STACK 1)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -143,15 +146,28 @@ elseif(QEMU_NET_STACK)
|
||||||
# appending the instance name to the pid file we can easily run more
|
# appending the instance name to the pid file we can easily run more
|
||||||
# instances of the same sample.
|
# instances of the same sample.
|
||||||
|
|
||||||
if(${CMAKE_GENERATOR} STREQUAL "Unix Makefiles")
|
if(CONFIG_NET_QEMU_PPP)
|
||||||
set(tmp_file unix:/tmp/slip.sock\${QEMU_INSTANCE})
|
if(${CMAKE_GENERATOR} STREQUAL "Unix Makefiles")
|
||||||
|
set(ppp_path unix:/tmp/ppp\${QEMU_INSTANCE})
|
||||||
|
else()
|
||||||
|
set(ppp_path unix:/tmp/ppp${QEMU_INSTANCE})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
list(APPEND MORE_FLAGS_FOR_${target}
|
||||||
|
-serial ${ppp_path}
|
||||||
|
)
|
||||||
else()
|
else()
|
||||||
set(tmp_file unix:/tmp/slip.sock${QEMU_INSTANCE})
|
if(${CMAKE_GENERATOR} STREQUAL "Unix Makefiles")
|
||||||
|
set(tmp_file unix:/tmp/slip.sock\${QEMU_INSTANCE})
|
||||||
|
else()
|
||||||
|
set(tmp_file unix:/tmp/slip.sock${QEMU_INSTANCE})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
list(APPEND MORE_FLAGS_FOR_${target}
|
||||||
|
-serial ${tmp_file}
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
list(APPEND MORE_FLAGS_FOR_${target}
|
|
||||||
-serial ${tmp_file}
|
|
||||||
)
|
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue