summaryrefslogtreecommitdiff
path: root/tests/ovsdb-monitor.at
diff options
context:
space:
mode:
authorBen Pfaff <blp@ovn.org>2019-09-20 08:30:42 -0700
committerBen Pfaff <blp@ovn.org>2019-09-27 09:23:50 -0700
commit1ca0323e7c29dc7ef5a615c265df0460208f92de (patch)
tree377630fee2130b269cfe2fd348c9e8c6bc5a814a /tests/ovsdb-monitor.at
parent187bb41fbf447acf9fb6ac117dc923bbe649e78c (diff)
downloadopenvswitch-1ca0323e7c29dc7ef5a615c265df0460208f92de.tar.gz
Require Python 3 and remove support for Python 2.
Python 2 reaches end-of-life on January 1, 2020, which is only a few months away. This means that OVS needs to stop depending on in the next release that should occur roughly that same time. Therefore, this commit removes all support for Python 2. It also makes Python 3 a mandatory build dependency. Some of the interesting consequences: - HAVE_PYTHON, HAVE_PYTHON2, and HAVE_PYTHON3 conditionals have been removed, since we now know that Python3 is available. - $PYTHON and $PYTHON2 are removed, and $PYTHON3 is always available. - Many tests for Python 2 support have been removed, and the ones that depended on Python 3 now run unconditionally. This allowed several macros in the testsuite to be removed, making the code clearer. This does make some of the changes to the testsuite files large due to indentation level changes. - #! lines for Python now use /usr/bin/python3 instead of /usr/bin/python. - Packaging depends on Python 3 packages. Acked-by: Numan Siddique <nusiddiq@redhat.com> Tested-by: Numan Siddique <nusiddiq@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'tests/ovsdb-monitor.at')
-rw-r--r--tests/ovsdb-monitor.at20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/ovsdb-monitor.at b/tests/ovsdb-monitor.at
index eb437092c..3b622b3ec 100644
--- a/tests/ovsdb-monitor.at
+++ b/tests/ovsdb-monitor.at
@@ -30,7 +30,7 @@ ovsdb_check_monitor () {
done
OVS_APP_EXIT_AND_WAIT_BY_TARGET([ovsdb-server], [ovsdb-server.pid])
OVS_WAIT_UNTIL([test ! -e ovsdb-client.pid])
- AT_CHECK_UNQUOTED([$PYTHON $srcdir/ovsdb-monitor-sort.py < output | uuidfilt], [0], [$output], [ignore])
+ AT_CHECK_UNQUOTED([$PYTHON3 $srcdir/ovsdb-monitor-sort.py < output | uuidfilt], [0], [$output], [ignore])
}
OVS_END_SHELL_HELPERS
@@ -105,7 +105,7 @@ m4_define([OVSDB_CHECK_MONITOR_COND],
[ignore], [ignore])
AT_CHECK([ovs-appctl -t ovsdb-server -e exit], [0], [ignore], [ignore])
OVS_WAIT_UNTIL([test ! -e ovsdb-server.pid && test ! -e ovsdb-client.pid])
- AT_CHECK([$PYTHON $srcdir/ovsdb-monitor-sort.py < output | uuidfilt], [0], [$7], [ignore])
+ AT_CHECK([$PYTHON3 $srcdir/ovsdb-monitor-sort.py < output | uuidfilt], [0], [$7], [ignore])
AT_CLEANUP])
OVSDB_CHECK_MONITOR([monitor insert into empty table],
@@ -649,7 +649,7 @@ AT_CHECK([ovsdb-client transact unix:socket '[["ordinals"]]'], [0],
[ignore], [ignore])
AT_CHECK([ovs-appctl -t ovsdb-server -e exit], [0], [ignore], [ignore])
OVS_WAIT_UNTIL([test ! -e ovsdb-server.pid && test ! -e ovsdb-client.pid])
-AT_CHECK([$PYTHON $srcdir/ovsdb-monitor-sort.py < output | uuidfilt], [0], [[row,action,name
+AT_CHECK([$PYTHON3 $srcdir/ovsdb-monitor-sort.py < output | uuidfilt], [0], [[row,action,name
<0>,insert,"""ten"""
row,action,name
@@ -701,7 +701,7 @@ AT_CHECK([ovsdb-client transact unix:socket '[["ordinals"]]'], [0],
[ignore], [ignore])
AT_CHECK([ovs-appctl -t ovsdb-server -e exit], [0], [ignore], [ignore])
OVS_WAIT_UNTIL([test ! -e ovsdb-server.pid && test ! -e ovsdb-client.pid])
-AT_CHECK([$PYTHON $srcdir/ovsdb-monitor-sort.py < output | uuidfilt], [0],
+AT_CHECK([$PYTHON3 $srcdir/ovsdb-monitor-sort.py < output | uuidfilt], [0],
[[found: false, last_id: <0>
row,action,name,number,_version
<1>,initial,"""one""",1,"[""uuid"",""<2>""]"
@@ -770,7 +770,7 @@ AT_CHECK([ovsdb-client transact unix:socket '[["ordinals"]]'], [0],
[ignore], [ignore])
AT_CHECK([ovs-appctl -t ovsdb-server -e exit], [0], [ignore], [ignore])
OVS_WAIT_UNTIL([test ! -e ovsdb-server.pid && test ! -e ovsdb-client.pid])
-AT_CHECK([$PYTHON $srcdir/ovsdb-monitor-sort.py < output | uuidfilt], [0],
+AT_CHECK([$PYTHON3 $srcdir/ovsdb-monitor-sort.py < output | uuidfilt], [0],
[[found: true, last_id: <0>
row,action,name,number,_version
<1>,insert,"""ten""",10,"[""uuid"",""<2>""]"
@@ -814,7 +814,7 @@ AT_CHECK([ovsdb-client transact unix:socket '[["ordinals"]]'], [0],
[ignore], [ignore])
AT_CHECK([ovs-appctl -t ovsdb-server -e exit], [0], [ignore], [ignore])
OVS_WAIT_UNTIL([test ! -e ovsdb-server.pid && test ! -e ovsdb-client.pid])
-AT_CHECK([$PYTHON $srcdir/ovsdb-monitor-sort.py < output | uuidfilt], [0],
+AT_CHECK([$PYTHON3 $srcdir/ovsdb-monitor-sort.py < output | uuidfilt], [0],
[[found: true, last_id: <0>
]], [ignore])
AT_CLEANUP
@@ -837,7 +837,7 @@ AT_CHECK([ovsdb-client transact unix:socket '[["ordinals"]]'], [0],
[ignore], [ignore])
AT_CHECK([ovs-appctl -t ovsdb-server -e exit], [0], [ignore], [ignore])
OVS_WAIT_UNTIL([test ! -e ovsdb-server.pid && test ! -e ovsdb-client.pid])
-AT_CHECK([$PYTHON $srcdir/ovsdb-monitor-sort.py < output | uuidfilt], [0],
+AT_CHECK([$PYTHON3 $srcdir/ovsdb-monitor-sort.py < output | uuidfilt], [0],
[[found: false, last_id: <0>
]], [ignore])
AT_CLEANUP
@@ -876,7 +876,7 @@ AT_CHECK([ovsdb-client transact unix:socket '[["ordinals"]]'], [0],
[ignore], [ignore])
AT_CHECK([ovs-appctl -t ovsdb-server -e exit], [0], [ignore], [ignore])
OVS_WAIT_UNTIL([test ! -e ovsdb-server.pid && test ! -e ovsdb-client.pid])
-AT_CHECK([$PYTHON $srcdir/ovsdb-monitor-sort.py < output | uuidfilt], [0],
+AT_CHECK([$PYTHON3 $srcdir/ovsdb-monitor-sort.py < output | uuidfilt], [0],
[[found: false, last_id: <0>
row,action,name,number,_version
<1>,initial,"""one""",1,"[""uuid"",""<2>""]"
@@ -945,7 +945,7 @@ OVS_WAIT_UNTIL([test ! -e ovsdb-server.pid && test ! -e ovsdb-client.pid])
# Transaction shouldn't be found, and last_id returned should always
# be the same (all zero uuid)
-AT_CHECK([$PYTHON $srcdir/ovsdb-monitor-sort.py < output | uuidfilt], [0],
+AT_CHECK([$PYTHON3 $srcdir/ovsdb-monitor-sort.py < output | uuidfilt], [0],
[[found: false, last_id: <0>
row,action,name,number,_version
<1>,initial,"""one""",1,"[""uuid"",""<2>""]"
@@ -1000,7 +1000,7 @@ OVS_WAIT_UNTIL([test ! -e ovsdb-server.pid && test ! -e ovsdb-client.pid])
# Transaction shouldn't be found, and last_id returned should always
# be the same (all zero uuid)
-AT_CHECK([$PYTHON $srcdir/ovsdb-monitor-sort.py < output | uuidfilt], [0],
+AT_CHECK([$PYTHON3 $srcdir/ovsdb-monitor-sort.py < output | uuidfilt], [0],
[[found: false, last_id: <0>
row,action,name,number,_version
<1>,initial,"""one""",1,"[""uuid"",""<2>""]"