Blame SOURCES/0013-test-functions-add-macro-NMCLI_CHECK.patch
|
|
40251c |
From 520420aa83eda967cdb8b30527886eed5dcec8fe Mon Sep 17 00:00:00 2001
|
|
|
40251c |
From: Eric Garver <eric@garver.life>
|
|
|
40251c |
Date: Tue, 19 Nov 2019 13:14:45 -0500
|
|
|
40251c |
Subject: [PATCH 13/37] test: functions: add macro NMCLI_CHECK
|
|
|
40251c |
|
|
|
40251c |
Useful for NetworkManager integration tests.
|
|
|
40251c |
|
|
|
40251c |
(cherry picked from commit 608f00749967ba71b04c4cbb86f5877382aaee07)
|
|
|
40251c |
(cherry picked from commit ca41c60bde8897d218e1046fab2549278a3105da)
|
|
|
40251c |
---
|
|
|
40251c |
src/tests/functions.at | 6 ++++++
|
|
|
40251c |
1 file changed, 6 insertions(+)
|
|
|
40251c |
|
|
|
40251c |
diff --git a/src/tests/functions.at b/src/tests/functions.at
|
|
|
40251c |
index f59eef80c348..e79557350558 100644
|
|
|
40251c |
--- a/src/tests/functions.at
|
|
|
40251c |
+++ b/src/tests/functions.at
|
|
|
40251c |
@@ -586,3 +586,9 @@ m4_define([IF_HOST_SUPPORTS_IPV6_RULES], [
|
|
|
40251c |
IF_HOST_SUPPORTS_IP6TABLES([$1], [$2])
|
|
|
40251c |
])])
|
|
|
40251c |
])
|
|
|
40251c |
+
|
|
|
40251c |
+m4_define([NMCLI_CHECK], [
|
|
|
40251c |
+ AT_SKIP_IF([! NS_CMD([nmcli connection show >/dev/null 2>&1])])
|
|
|
40251c |
+ NS_CHECK([PIPESTATUS0([nmcli $1], [TRIM_WHITESPACE])],
|
|
|
40251c |
+ [$2], [m4_strip([$3])], [m4_strip([$4])], [$5], [$6])
|
|
|
40251c |
+])
|
|
|
40251c |
--
|
|
|
40251c |
2.23.0
|
|
|
40251c |
|