On Windows trying to overwrite the opened ovs-vswitchd.log fails with access denied. Closing it before trying to overwrite it solves the problem
Signed-off-by: Paul-Daniel Boca <pb...@cloudbasesolutions.com> --- tests/ofproto-dpif.at | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at index bf9cf88..f65d391 100644 --- a/tests/ofproto-dpif.at +++ b/tests/ofproto-dpif.at @@ -6923,7 +6923,11 @@ OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log]) AT_CHECK([ovs-vsctl set interface p0 bfd:enable=false]) # check log. OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log]) -AT_CHECK([sed -e '/^.*ofproto_dpif_monitor.*$/d' < ovs-vswitchd.log > tmp && mv tmp ovs-vswitchd.log && ovs-appctl vlog/reopen]) +if test "$IS_WIN32" = "no"; then + AT_CHECK([sed -e '/^.*ofproto_dpif_monitor.*$/d' < ovs-vswitchd.log > tmp && mv tmp ovs-vswitchd.log && ovs-appctl vlog/reopen]) +else + AT_CHECK([sed -e '/^.*ofproto_dpif_monitor.*$/d' < ovs-vswitchd.log > tmp && ovs-appctl.exe vlog/close && mv tmp ovs-vswitchd.log && ovs-appctl vlog/reopen]) +fi # enable cfm on p0. AT_CHECK([ovs-vsctl set interface p0 cfm_mpid=10]) @@ -6933,7 +6937,11 @@ OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log]) AT_CHECK([ovs-vsctl remove interface p0 cfm_mpid 10]) # check log. OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log]) -AT_CHECK([sed -e '/^.*ofproto_dpif_monitor.*$/d' < ovs-vswitchd.log > tmp && mv tmp ovs-vswitchd.log && ovs-appctl vlog/reopen]) +if test "$IS_WIN32" = "no"; then + AT_CHECK([sed -e '/^.*ofproto_dpif_monitor.*$/d' < ovs-vswitchd.log > tmp && mv tmp ovs-vswitchd.log && ovs-appctl vlog/reopen]) +else + AT_CHECK([sed -e '/^.*ofproto_dpif_monitor.*$/d' < ovs-vswitchd.log > tmp && ovs-appctl.exe vlog/close && mv tmp ovs-vswitchd.log && ovs-appctl vlog/reopen]) +fi # enable both bfd and cfm on p0. AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true cfm_mpid=10]) -- 2.7.2.windows.1 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev