about summary refs log tree commit diff
path: root/tools
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2020-10-05 22:27:18 +0200
committerMichael Biebl <biebl@debian.org>2020-10-05 22:27:18 +0200
commitaafc1dbe4712c86189bbc1d4d54ad8cb4c69be7e (patch)
treea2a9bb4d007339a0b1304540388230ccedac32bd /tools
parente7b44ef4c80907346ec7492a09c45277459924fc (diff)
New upstream version 1.27.90 upstream/1.27.90
Diffstat (limited to 'tools')
-rwxr-xr-xtools/check-config-options.sh8
-rwxr-xr-xtools/enums-to-docbook.pl25
-rwxr-xr-xtools/generate-docs-nm-settings-docs-gir.py8
-rwxr-xr-xtools/run-nm-test.sh13
4 files changed, 40 insertions, 14 deletions
diff --git a/tools/check-config-options.sh b/tools/check-config-options.sh
index 659f5490..7a775955 100755
--- a/tools/check-config-options.sh
+++ b/tools/check-config-options.sh
@@ -6,14 +6,14 @@ ret=0
 get_supported_options()
 {
     awk '/START OPTION LIST/{flag=1;next}/END OPTION LIST/{flag=0}flag' "$srcdir/src/nm-config.c" |
-	grep -o 'NM_CONFIG_KEYFILE_KEY_\w*'
+    grep -o 'NM_CONFIG_KEYFILE_KEY_\w*'
 }
 
 get_missing_options()
 {
     grep -v '/\* check-config-options skip \*/' "$srcdir/src/nm-config.h" |
-	grep -o 'NM_CONFIG_KEYFILE_KEY_\w*' |
-	grep -v -Fx -f <(get_supported_options)
+    grep -o 'NM_CONFIG_KEYFILE_KEY_\w*' |
+    grep -v -Fx -f <(get_supported_options)
 }
 
 get_src_con_defaults()
@@ -25,7 +25,7 @@ get_src_con_defaults()
 get_man_con_defaults()
 {
     awk '/start connection defaults/{flag=1;next}/end connection defaults/{flag=0}flag' "$srcdir/man/NetworkManager.conf.xml" |
-	sed -ne 's#.*<varname>\([^<]*\)</varname>.*#\1#p'
+    sed -ne 's#.*<varname>\([^<]*\)</varname>.*#\1#p'
 }
 
 get_missing_con_defaults()
diff --git a/tools/enums-to-docbook.pl b/tools/enums-to-docbook.pl
index 697cb631..f422acbd 100755
--- a/tools/enums-to-docbook.pl
+++ b/tools/enums-to-docbook.pl
@@ -14,6 +14,7 @@
 use strict;
 use warnings;
 
+our $enum_name;
 our $name;
 our $desc;
 our $choice;
@@ -75,6 +76,7 @@ chomp;
 
 if (/^\/\*\*$/) {
 	# Start of a documentation comment
+	$enum_name = undef;
 	$name = '';
 	$desc = '';
 	$choice = undef;
@@ -118,11 +120,24 @@ if (/^\/\*\*$/) {
 } elsif (/^\s+([^,\s]+),?$/) {
 	# A choice without a literal value
 	next unless @choices;
-	die "Saw enum value '$1', but didn't see start of enum before" unless defined $val;
-	my ($this) = grep { $_->[0] eq $1 } @choices;
-	die "Documentation for value '$1' missing" unless $this;
-	$val = inc $val;
-	$this->[2] = "= <literal>$val</literal>";
+
+	if (defined $enum_name) {
+		next unless $enum_name;
+		$val = $1;
+		my ($this) = grep { $_->[0] eq $enum_name } @choices;
+		die "Documentation for value '$1' missing" unless $this;
+		$this->[2] = "= <literal>$val</literal>";
+		$enum_name = undef;
+	} else {
+		die "Saw enum value '$1', but didn't see start of enum before" unless defined $val;
+		my ($this) = grep { $_->[0] eq $1 } @choices;
+		die "Documentation for value '$1' missing" unless $this;
+		$val = inc $val;
+		$this->[2] = "= <literal>$val</literal>";
+	}
+} elsif (/^\s+(\S+)\s+=$/) {
+	next unless @choices;
+	$enum_name = $1
 } elsif (/^\} ([^;]+);/) {
 	# End of an enum
 	next unless defined $name;
diff --git a/tools/generate-docs-nm-settings-docs-gir.py b/tools/generate-docs-nm-settings-docs-gir.py
index ebda9956..317b3297 100755
--- a/tools/generate-docs-nm-settings-docs-gir.py
+++ b/tools/generate-docs-nm-settings-docs-gir.py
@@ -244,8 +244,12 @@ for settingxml in settings:
             "%s needs a gtk-doc block with one-line description" % setting.props.name
         )
     outfile.write(
-        '  <setting name="%s" description="%s" name_upper="%s" >\n'
-        % (setting.props.name, class_desc, get_setting_name_define(settingxml))
+        '  <setting name="%s" description=%s name_upper="%s" >\n'
+        % (
+            setting.props.name,
+            xml_quoteattr(class_desc),
+            get_setting_name_define(settingxml),
+        )
     )
 
     setting_properties = {
diff --git a/tools/run-nm-test.sh b/tools/run-nm-test.sh
index 4df3ab96..f452d9d4 100755
--- a/tools/run-nm-test.sh
+++ b/tools/run-nm-test.sh
@@ -310,13 +310,20 @@ if [ $HAS_ERRORS -eq 0 ]; then
     # valgrind doesn't support setns syscall and spams the logfile.
     # hack around it...
     case "$TEST_NAME" in
+        'test-acd' | \
+        'test-address-linux' | \
+        'test-cleanup-linux' | \
         'test-config' | \
+        'test-l3cfg' | \
         'test-link-linux' | \
-        'test-acd' | \
-        'test-service-providers' | \
+        'test-lldp' | \
+        'test-nm-client' | \
+        'test-platform-general' | \
         'test-remote-settings-client' | \
+        'test-route-linux' | \
         'test-secret-agent' | \
-        'test-nm-client' )
+        'test-service-providers' | \
+        'test-tc-linux' )
             if [ -z "$(sed -e '/^--[0-9]\+-- WARNING: unhandled .* syscall: /,/^--[0-9]\+-- it at http.*\.$/d' "$LOGFILE")" ]; then
                 HAS_ERRORS=1
             fi