Skip to content

Commit

Permalink
invoke perl as ${PERL}
Browse files Browse the repository at this point in the history
as suggested by Ben Pfaff.

Signed-off-by: YAMAMOTO Takashi <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
yamt authored and blp committed Apr 22, 2013
1 parent 06a2213 commit 5c6d062
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 46 deletions.
2 changes: 1 addition & 1 deletion tests/ofproto-macros.at
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ m4_define([OVS_VSWITCHD_START],
/ofproto|INFO|datapath ID changed to fedcba9876543210/d']])

dnl Add bridges, ports, etc.
AT_CHECK([ovs-vsctl -- add-br br0 -- set bridge br0 datapath-type=dummy other-config:datapath-id=fedcba9876543210 other-config:hwaddr=aa:55:aa:55:00:00 protocols=[[OpenFlow10,OpenFlow12,OpenFlow13]] fail-mode=secure -- $1 m4_if([$2], [], [], [| perl $srcdir/uuidfilt.pl])], [0], [$2])
AT_CHECK([ovs-vsctl -- add-br br0 -- set bridge br0 datapath-type=dummy other-config:datapath-id=fedcba9876543210 other-config:hwaddr=aa:55:aa:55:00:00 protocols=[[OpenFlow10,OpenFlow12,OpenFlow13]] fail-mode=secure -- $1 m4_if([$2], [], [], [| ${PERL} $srcdir/uuidfilt.pl])], [0], [$2])
])

m4_divert_push([PREPARE_TESTS])
Expand Down
20 changes: 10 additions & 10 deletions tests/ofproto.at
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ AT_CHECK(
-- --id=@t0 create Flow_Table name=main \
-- --id=@t1 create Flow_Table flow-limit=1024 \
-- set bridge br0 'flow_tables={1=@t1,0=@t0}' \
| perl $srcdir/uuidfilt.pl],
| ${PERL} $srcdir/uuidfilt.pl],
[0], [<0>
<1>
])
Expand Down Expand Up @@ -628,7 +628,7 @@ AT_CHECK(
-- --id=@t0 create Flow_Table name=main \
-- --id=@t1 create Flow_Table flow-limit=1024 \
-- set bridge br0 'flow_tables={1=@t1,0=@t0}' \
| perl $srcdir/uuidfilt.pl],
| ${PERL} $srcdir/uuidfilt.pl],
[0], [<0>
<1>
])
Expand All @@ -650,7 +650,7 @@ AT_CHECK(
[ovs-vsctl \
-- --id=@t0 create Flow_Table flow-limit=4 \
-- set bridge br0 flow_tables:0=@t0 \
| perl $srcdir/uuidfilt.pl],
| ${PERL} $srcdir/uuidfilt.pl],
[0], [<0>
])
# Add 4 flows.
Expand Down Expand Up @@ -694,7 +694,7 @@ AT_CHECK(
[ovs-vsctl \
-- --id=@t0 create Flow_Table flow-limit=4 \
-- set bridge br0 flow_tables:0=@t0 \
| perl $srcdir/uuidfilt.pl],
| ${PERL} $srcdir/uuidfilt.pl],
[0], [<0>
])
# Add 4 flows.
Expand Down Expand Up @@ -733,7 +733,7 @@ AT_CHECK(
[ovs-vsctl \
-- --id=@t0 create Flow_Table flow-limit=4 overflow-policy=evict \
-- set bridge br0 flow_tables:0=@t0 \
| perl $srcdir/uuidfilt.pl],
| ${PERL} $srcdir/uuidfilt.pl],
[0], [<0>
])
# Add 4 flows.
Expand Down Expand Up @@ -791,7 +791,7 @@ AT_CHECK(
[ovs-vsctl \
-- --id=@t0 create Flow_Table flow-limit=4 overflow-policy=evict \
-- set bridge br0 flow_tables:0=@t0 \
| perl $srcdir/uuidfilt.pl],
| ${PERL} $srcdir/uuidfilt.pl],
[0], [<0>
])
# Add 4 flows.
Expand Down Expand Up @@ -852,7 +852,7 @@ AT_CHECK(
overflow-policy=evict \
groups='"NXM_OF_IN_PORT[[]]"' \
-- set bridge br0 flow_tables:0=@t0 \
| perl $srcdir/uuidfilt.pl],
| ${PERL} $srcdir/uuidfilt.pl],
[0], [<0>
])
# Add 4 flows.
Expand Down Expand Up @@ -934,7 +934,7 @@ AT_CHECK(
overflow-policy=evict \
groups='"NXM_OF_IN_PORT[[]]"' \
-- set bridge br0 flow_tables:0=@t0 \
| perl $srcdir/uuidfilt.pl],
| ${PERL} $srcdir/uuidfilt.pl],
[0], [<0>
])
# Add 4 flows.
Expand Down Expand Up @@ -1534,7 +1534,7 @@ sort='
}
print $_ foreach sort(@buffer);
'
AT_CHECK([sed 's/ (xid=0x[[1-9a-fA-F]][[0-9a-fA-F]]*)//' monitor.log | perl -e "$sort"], [0],
AT_CHECK([sed 's/ (xid=0x[[1-9a-fA-F]][[0-9a-fA-F]]*)//' monitor.log | ${PERL} -e "$sort"], [0],
[NXST_FLOW_MONITOR reply (xid=0x0):
event=ADDED table=0 cookie=0 in_port=0,dl_vlan=124 actions=output:2
NXST_FLOW_MONITOR reply (xid=0x0):
Expand Down Expand Up @@ -1657,7 +1657,7 @@ ovs-appctl -t ovs-ofctl ofctl/block

# Add $n_msgs flows.
(echo "in_port=2,actions=output:2"
perl -e '
${PERL} -e '
for ($i = 0; $i < '$n_msgs'; $i++) {
print "cookie=1,reg1=$i,actions=drop\n";
}
Expand Down
16 changes: 8 additions & 8 deletions tests/ovs-vsctl.at
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ cp stdout out1
AT_CHECK([RUN_OVS_VSCTL([list b], [get b br0 _uuid])],
[0], [stdout], [], [OVS_VSCTL_CLEANUP])
cp stdout out2
AT_CHECK([perl $srcdir/uuidfilt.pl out1 out2], [0],
AT_CHECK([${PERL} $srcdir/uuidfilt.pl out1 out2], [0],
[[<0>

_uuid : <0>
Expand Down Expand Up @@ -742,7 +742,7 @@ AT_CHECK([
cp stdout netflow-uuid
AT_CHECK([RUN_OVS_VSCTL([list netflow `cat netflow-uuid`])],
[0], [stdout], [], [OVS_VSCTL_CLEANUP])
AT_CHECK([perl $srcdir/uuidfilt.pl netflow-uuid stdout], [0],
AT_CHECK([${PERL} $srcdir/uuidfilt.pl netflow-uuid stdout], [0],
[[<0>

_uuid : <0>
Expand Down Expand Up @@ -1039,7 +1039,7 @@ AT_CHECK(
[--id=@m create mirror name=mymirror select-dst-port=@eth0 select-src-port=@eth0 output-port=@eth1])],
[0], [stdout], [], [OVS_VSCTL_CLEANUP])
AT_CHECK(
[perl $srcdir/uuidfilt.pl stdout], [0], [dnl
[${PERL} $srcdir/uuidfilt.pl stdout], [0], [dnl



Expand All @@ -1053,7 +1053,7 @@ AT_CHECK(
[list bridge br0])],
[0], [stdout], [], [OVS_VSCTL_CLEANUP])
AT_CHECK(
[sed -n -e '/uuid/p' -e '/name/p' -e '/mirrors/p' -e '/select/p' -e '/output/p' < stdout | perl $srcdir/uuidfilt.pl], [0], [dnl
[sed -n -e '/uuid/p' -e '/name/p' -e '/mirrors/p' -e '/select/p' -e '/output/p' < stdout | ${PERL} $srcdir/uuidfilt.pl], [0], [dnl
[_uuid : <0>
name : "eth0"
_uuid : <1>
Expand All @@ -1079,13 +1079,13 @@ AT_KEYWORDS([ovs-vsctl])
OVS_VSCTL_SETUP
AT_CHECK(
[ovs-vsctl -vPATTERN:console:'%c|%p|%m' --no-wait -vreconnect:emer --db=unix:socket \
-- create Bridge name=br0 | perl $srcdir/uuidfilt.pl],
-- create Bridge name=br0 | ${PERL} $srcdir/uuidfilt.pl],
[0], [<0>
], [vsctl|WARN|applying "create" command to table Bridge without --id option will have no effect
], [OVS_VSCTL_CLEANUP])
AT_CHECK(
[ovs-vsctl -vPATTERN:console:'%c|%p|%m' --no-wait -vreconnect:emer --db=unix:socket \
-- --id=@br0 create Bridge name=br0 | perl $srcdir/uuidfilt.pl],
-- --id=@br0 create Bridge name=br0 | ${PERL} $srcdir/uuidfilt.pl],
[0], [<0>
], [vsctl|WARN|row id "@br0" was created but no reference to it was inserted, so it will not actually appear in the database
], [OVS_VSCTL_CLEANUP])
Expand All @@ -1095,7 +1095,7 @@ AT_CHECK(
-- --id=@eth0 create Port name=eth0 interfaces=@eth0_iface \
-- --id=@m0 create Mirror name=m0 output_port=@eth0 \
-- --id=@br0 create Bridge name=br0 mirrors=@m0 \
-- set Open_vSwitch . bridges=@br0 | perl $srcdir/uuidfilt.pl],
-- set Open_vSwitch . bridges=@br0 | ${PERL} $srcdir/uuidfilt.pl],
[0], [<0>
<1>
<2>
Expand All @@ -1113,7 +1113,7 @@ AT_KEYWORDS([ovs-vsctl])
OVS_VSCTL_SETUP
AT_CHECK([RUN_OVS_VSCTL([--id=@br0 create Bridge name=br0 -- add Open_vSwitch . bridges @br0 -- list b])],
[0], [stdout], [], [OVS_VSCTL_CLEANUP])
AT_CHECK([perl $srcdir/uuidfilt.pl stdout], [0],
AT_CHECK([${PERL} $srcdir/uuidfilt.pl stdout], [0],
[[<0>
_uuid : <1>
controller : []
Expand Down
2 changes: 1 addition & 1 deletion tests/ovsdb-execution.at
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ m4_define([OVSDB_CHECK_EXECUTION],
OVS_RUNDIR=`pwd`; export OVS_RUNDIR
AT_CHECK([test-ovsdb execute "`$2`" m4_foreach([txn], [$3], [ 'txn'])],
[0], [stdout], [])
AT_CHECK([perl $srcdir/uuidfilt.pl stdout], [0], [$4])
AT_CHECK([${PERL} $srcdir/uuidfilt.pl stdout], [0], [$4])
AT_CLEANUP])

OVSDB_CHECK_EXECUTION([uuid-name must be <id>],
Expand Down
6 changes: 3 additions & 3 deletions tests/ovsdb-idl.at
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ m4_define([OVSDB_CHECK_IDL_C],
[AT_CHECK([ovsdb-client transact unix:socket $2], [0], [ignore], [ignore], [kill `cat pid`])])
AT_CHECK([test-ovsdb '-vPATTERN:console:test-ovsdb|%c|%m' -vjsonrpc -t10 idl unix:socket $3],
[0], [stdout], [ignore], [kill `cat pid`])
AT_CHECK([sort stdout | perl $srcdir/uuidfilt.pl]m4_if([$6],,, [[| $6]]),
AT_CHECK([sort stdout | ${PERL} $srcdir/uuidfilt.pl]m4_if([$6],,, [[| $6]]),
[0], [$4], [], [kill `cat pid`])
OVSDB_SERVER_SHUTDOWN
AT_CLEANUP])
Expand All @@ -46,7 +46,7 @@ m4_define([OVSDB_CHECK_IDL_PY],
[AT_CHECK([ovsdb-client transact unix:socket $2], [0], [ignore], [ignore], [kill `cat pid`])])
AT_CHECK([$PYTHON $srcdir/test-ovsdb.py -t10 idl $srcdir/idltest.ovsschema unix:socket $3],
[0], [stdout], [ignore], [kill `cat pid`])
AT_CHECK([sort stdout | perl $srcdir/uuidfilt.pl]m4_if([$6],,, [[| $6]]),
AT_CHECK([sort stdout | ${PERL} $srcdir/uuidfilt.pl]m4_if([$6],,, [[| $6]]),
[0], [$4], [], [kill `cat pid`])
OVSDB_SERVER_SHUTDOWN
AT_CLEANUP])
Expand All @@ -67,7 +67,7 @@ m4_define([OVSDB_CHECK_IDL_TCP_PY],
[AT_CHECK([ovsdb-client transact tcp:127.0.0.1:$TCP_PORT $2], [0], [ignore], [ignore], [kill `cat pid`])])
AT_CHECK([$PYTHON $srcdir/test-ovsdb.py -t10 idl $srcdir/idltest.ovsschema tcp:127.0.0.1:$TCP_PORT $3],
[0], [stdout], [ignore], [kill `cat pid`])
AT_CHECK([sort stdout | perl $srcdir/uuidfilt.pl]m4_if([$6],,, [[| $6]]),
AT_CHECK([sort stdout | ${PERL} $srcdir/uuidfilt.pl]m4_if([$6],,, [[| $6]]),
[0], [$4], [], [kill `cat pid`])
OVSDB_SERVER_SHUTDOWN
AT_CLEANUP])
Expand Down
2 changes: 1 addition & 1 deletion tests/ovsdb-monitor.at
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ m4_define([OVSDB_CHECK_MONITOR],
[ignore], [ignore], [kill `cat server-pid client-pid`])
AT_CHECK([ovs-appctl -t "`pwd`"/unixctl -e exit], [0], [ignore], [ignore])
OVS_WAIT_UNTIL([test ! -e server-pid && test ! -e client-pid])
AT_CHECK([perl $srcdir/ovsdb-monitor-sort.pl < output | perl $srcdir/uuidfilt.pl], [0], [$7], [ignore])
AT_CHECK([${PERL} $srcdir/ovsdb-monitor-sort.pl < output | ${PERL} $srcdir/uuidfilt.pl], [0], [$7], [ignore])
AT_CLEANUP])

OVSDB_CHECK_MONITOR([monitor insert into empty table],
Expand Down
24 changes: 12 additions & 12 deletions tests/ovsdb-server.at
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ m4_define([OVSDB_CHECK_EXECUTION],
[test ! -e pid || kill `cat pid`])
cat stdout >> output
])
AT_CHECK([perl $srcdir/uuidfilt.pl output], [0], [$4], [ignore],
AT_CHECK([${PERL} $srcdir/uuidfilt.pl output], [0], [$4], [ignore],
[test ! -e pid || kill `cat pid`])
OVSDB_SERVER_SHUTDOWN
AT_CLEANUP])
Expand Down Expand Up @@ -77,7 +77,7 @@ AT_DATA([txnfile], [[ovsdb-client transact unix:socket \
]])
AT_CHECK([ovsdb-server --remote=punix:socket --unixctl="`pwd`"/unixctl db --run="sh txnfile"], [0], [stdout], [])
cat stdout >> output
AT_CHECK([perl $srcdir/uuidfilt.pl output], [0],
AT_CHECK([${PERL} $srcdir/uuidfilt.pl output], [0],
[[[{"uuid":["uuid","<0>"]}]
[{"uuid":["uuid","<1>"]}]
[{"rows":[{"_uuid":["uuid","<0>"],"_version":["uuid","<2>"],"name":"zero","number":0},{"_uuid":["uuid","<1>"],"_version":["uuid","<3>"],"name":"one","number":1}]}]
Expand Down Expand Up @@ -125,7 +125,7 @@ AT_DATA([txnfile], [[ovsdb-client transact unix:socket \
]])
AT_CHECK([ovsdb-server --remote=punix:socket --unixctl="`pwd`"/unixctl db --run="sh txnfile"], [0], [stdout], [])
cat stdout >> output
AT_CHECK([perl $srcdir/uuidfilt.pl output], [0],
AT_CHECK([${PERL} $srcdir/uuidfilt.pl output], [0],
[[[{"uuid":["uuid","<0>"]}]
[{"uuid":["uuid","<1>"]}]
[{"rows":[{"_uuid":["uuid","<0>"],"_version":["uuid","<2>"],"name":"zero","number":0},{"_uuid":["uuid","<1>"],"_version":["uuid","<3>"],"name":"one","number":1}]}]
Expand Down Expand Up @@ -222,7 +222,7 @@ AT_CHECK(
"columns": ["target", "is_connected"]}]']],
[0], [stdout], [ignore])
AT_CHECK(
[perl $srcdir/uuidfilt.pl stdout],
[${PERL} $srcdir/uuidfilt.pl stdout],
[0],
[[[{"rows":[{"managers":"punix:socket1"}]},{"rows":[{"is_connected":false,"target":"punix:socket2"}]}]
]],
Expand Down Expand Up @@ -319,7 +319,7 @@ AT_CHECK(
[0], [stdout], [ignore], [test ! -e pid || kill `cat pid`])
cat stdout >> output
AT_CHECK_UNQUOTED(
[perl $srcdir/uuidfilt.pl output], [0],
[${PERL} $srcdir/uuidfilt.pl output], [0],
[[[{"rows":[{"private_key":"$PKIDIR/testpki-privkey2.pem"}]}]
]], [ignore], [test ! -e pid || kill `cat pid`])
OVSDB_SERVER_SHUTDOWN
Expand Down Expand Up @@ -368,7 +368,7 @@ AT_CHECK(
done]],
[0], [stdout], [ignore], [test ! -e pid || kill `cat pid`])
dnl Check that all the crap is in fact in the database log.
AT_CHECK([[perl $srcdir/uuidfilt.pl db | grep -v ^OVSDB | sed 's/"_date":[0-9]*/"_date":0/' | test-json --multiple -]], [0],
AT_CHECK([[${PERL} $srcdir/uuidfilt.pl db | grep -v ^OVSDB | sed 's/"_date":[0-9]*/"_date":0/' | test-json --multiple -]], [0],
[[{"cksum":"12345678 9","name":"ordinals","tables":{"ordinals":{"columns":{"name":{"type":"string"},"number":{"type":"integer"}},"indexes":[["number"]]}},"version":"5.1.3"}
{"_comment":"add row for zero 0","_date":0,"ordinals":{"<0>":{"name":"zero"}}}
{"_comment":"delete row for 0","_date":0,"ordinals":{"<0>":null}}
Expand All @@ -392,7 +392,7 @@ AT_CHECK([[perl $srcdir/uuidfilt.pl db | grep -v ^OVSDB | sed 's/"_date":[0-9]*/
dnl Dump out and check the actual database contents.
AT_CHECK([[ovsdb-client dump unix:socket ordinals]],
[0], [stdout], [ignore])
AT_CHECK([perl $srcdir/uuidfilt.pl stdout], [0], [dnl
AT_CHECK([${PERL} $srcdir/uuidfilt.pl stdout], [0], [dnl
ordinals table
_uuid name number
------------------------------------ ----- ------
Expand Down Expand Up @@ -421,7 +421,7 @@ AT_CHECK([test `wc -l < db` -eq 4], [0], [], [],
dnl And check that the dumped data is the same too:
AT_CHECK([ovsdb-client dump unix:socket ordinals], [0], [stdout], [ignore],
[test ! -e pid || kill `cat pid`])
AT_CHECK([perl $srcdir/uuidfilt.pl stdout], [0], [dnl
AT_CHECK([${PERL} $srcdir/uuidfilt.pl stdout], [0], [dnl
ordinals table
_uuid name number
------------------------------------ ----- ------
Expand All @@ -447,7 +447,7 @@ AT_CHECK([test `wc -l < db` -eq 6], [0], [], [],
dnl Then check that the dumped data is correct.
AT_CHECK([ovsdb-client dump unix:socket ordinals], [0], [stdout], [ignore],
[test ! -e pid || kill `cat pid`])
AT_CHECK([perl $srcdir/uuidfilt.pl stdout], [0], [dnl
AT_CHECK([${PERL} $srcdir/uuidfilt.pl stdout], [0], [dnl
ordinals table
_uuid name number
------------------------------------ ----- ------
Expand Down Expand Up @@ -490,7 +490,7 @@ m4_define([OVSDB_CHECK_EXECUTION],
[test ! -e pid || kill `cat pid`])
cat stdout >> output
])
AT_CHECK([perl $srcdir/uuidfilt.pl output], [0], [$4], [ignore],
AT_CHECK([${PERL} $srcdir/uuidfilt.pl output], [0], [$4], [ignore],
[test ! -e pid || kill `cat pid`])
OVSDB_SERVER_SHUTDOWN
AT_CLEANUP])
Expand Down Expand Up @@ -540,7 +540,7 @@ m4_define([OVSDB_CHECK_EXECUTION],
[test ! -e pid || kill `cat pid`])
cat stdout >> output
])
AT_CHECK([perl $srcdir/uuidfilt.pl output], [0], [$4], [ignore],
AT_CHECK([${PERL} $srcdir/uuidfilt.pl output], [0], [$4], [ignore],
[test ! -e pid || kill `cat pid`])
OVSDB_SERVER_SHUTDOWN
AT_CLEANUP])
Expand Down Expand Up @@ -578,7 +578,7 @@ m4_define([OVSDB_CHECK_EXECUTION],
AT_CHECK([ovsdb-server --remote=punix:socket --unixctl="`pwd`"/unixctl db --run="sh txnfile"], [0], [stdout], [ignore])
cat stdout >> output
])
AT_CHECK([perl $srcdir/uuidfilt.pl output], [0], [$4], [ignore])
AT_CHECK([${PERL} $srcdir/uuidfilt.pl output], [0], [$4], [ignore])
AT_CLEANUP])

EXECUTION_EXAMPLES
Expand Down
Loading

0 comments on commit 5c6d062

Please sign in to comment.