summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
l---------src/test/Makefile1
-rwxr-xr-xsrc/test/generate-sym-test.py23
-rw-r--r--src/test/meson.build975
-rw-r--r--src/test/test-hashmap-ordered.awk11
4 files changed, 1009 insertions, 1 deletions
diff --git a/src/test/Makefile b/src/test/Makefile
deleted file mode 120000
index d0b0e8e00..000000000
--- a/src/test/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/test/generate-sym-test.py b/src/test/generate-sym-test.py
new file mode 100755
index 000000000..357cce8e4
--- /dev/null
+++ b/src/test/generate-sym-test.py
@@ -0,0 +1,23 @@
+#!/usr/bin/env python3
+import sys, re
+
+print('#include <stdio.h>')
+for header in sys.argv[2:]:
+ print('#include "{}"'.format(header.split('/')[-1]))
+
+print('''
+void* functions[] = {''')
+
+for line in open(sys.argv[1]):
+ match = re.search('^ +([a-zA-Z0-9_]+);', line)
+ if match:
+ print(' {},'.format(match.group(1)))
+
+print('''};
+
+int main(void) {
+ unsigned i;
+ for (i = 0; i < sizeof(functions)/sizeof(void*); i++)
+ printf("%p\\n", functions[i]);
+ return 0;
+}''')
diff --git a/src/test/meson.build b/src/test/meson.build
new file mode 100644
index 000000000..b7b21227e
--- /dev/null
+++ b/src/test/meson.build
@@ -0,0 +1,975 @@
+awkscript = 'test-hashmap-ordered.awk'
+test_hashmap_ordered_c = custom_target(
+ 'test-hashmap-ordered.c',
+ input : [awkscript, 'test-hashmap-plain.c'],
+ output : 'test-hashmap-ordered.c',
+ command : [awk, '-f', '@INPUT0@', '@INPUT1@'],
+ capture : true)
+
+test_include_dir = include_directories('.')
+
+path = run_command('sh', ['-c', 'echo "$PATH"']).stdout()
+test_env = environment()
+#if 0 /// UNNEEDED in elogind
+# test_env.set('SYSTEMD_KBD_MODEL_MAP', kbd_model_map)
+# test_env.set('SYSTEMD_LANGUAGE_FALLBACK_MAP', language_fallback_map)
+#endif // 0
+test_env.set('PATH', path)
+test_env.prepend('PATH', meson.build_root())
+
+############################################################
+
+generate_sym_test_py = find_program('generate-sym-test.py')
+
+test_libelogind_sym_c = custom_target(
+ 'test-libelogind-sym.c',
+ input : [libelogind_sym_path] + systemd_headers,
+ output : 'test-libelogind-sym.c',
+ command : [generate_sym_test_py, libelogind_sym_path] + systemd_headers,
+ capture : true)
+
+#if 0 /// UNNEEDED in elogind
+# test_libudev_sym_c = custom_target(
+# 'test-libudev-sym.c',
+# input : [libudev_sym_path, libudev_h_path],
+# output : 'test-libudev-sym.c',
+# command : [generate_sym_test_py, '@INPUT0@', '@INPUT1@'],
+# capture : true)
+#
+# test_dlopen_c = files('test-dlopen.c')
+#endif // 0
+
+############################################################
+
+tests += [
+#if 0 /// UNNEEDED in elogind
+# [['src/test/test-device-nodes.c'],
+# [],
+# []],
+
+# [['src/test/test-engine.c'],
+# [libcore,
+# libudev,
+# libelogind_internal],
+# [threads,
+# librt,
+# libseccomp,
+# libselinux,
+# libmount,
+# libblkid]],
+
+# [['src/test/test-job-type.c'],
+# [libcore,
+# libshared],
+# [threads,
+# librt,
+# libseccomp,
+# libselinux,
+# libmount,
+# libblkid]],
+
+# [['src/test/test-ns.c'],
+# [libcore,
+# libshared],
+# [threads,
+# librt,
+# libseccomp,
+# libselinux,
+# libmount,
+# libblkid],
+# '', 'manual'],
+
+# [['src/test/test-loopback.c'],
+# [libcore,
+# libshared],
+# [threads,
+# librt,
+# libseccomp,
+# libselinux,
+# libmount,
+# libblkid]],
+
+# [['src/test/test-hostname.c'],
+# [libcore,
+# libshared],
+# [threads,
+# librt,
+# libseccomp,
+# libselinux,
+# libmount,
+# libblkid],
+# '', 'unsafe'],
+
+# [['src/test/test-dns-domain.c'],
+# [libcore,
+# libelogind_network],
+# []],
+
+# [['src/test/test-boot-timestamps.c'],
+# [],
+# [],
+# 'ENABLE_EFI'],
+
+# [['src/test/test-unit-name.c'],
+# [libcore,
+# libshared],
+# [threads,
+# librt,
+# libseccomp,
+# libselinux,
+# libmount,
+# libblkid]],
+
+# [['src/test/test-unit-file.c'],
+# [libcore,
+# libshared],
+# [threads,
+# librt,
+# libseccomp,
+# libselinux,
+# libmount,
+# libblkid]],
+#endif // 0
+
+ [['src/test/test-utf8.c'],
+ [],
+ []],
+
+#if 0 /// UNNEEDED in elogind
+# [['src/test/test-capability.c'],
+# [],
+# [libcap]],
+
+# [['src/test/test-async.c'],
+# [],
+# []],
+#endif // 0
+
+ [['src/test/test-locale-util.c'],
+ [],
+ []],
+
+ [['src/test/test-copy.c'],
+ [libshared_static],
+ []],
+
+#if 0 /// UNNEEDED in elogind
+# [['src/test/test-sigbus.c'],
+# [],
+# []],
+
+# [['src/test/test-condition.c'],
+# [],
+# []],
+
+# [['src/test/test-fdset.c'],
+# [],
+# []],
+
+# [['src/test/test-fstab-util.c'],
+# [],
+# []],
+#endif // 0
+
+ [['src/test/test-random-util.c'],
+ [],
+ []],
+
+#if 0 /// UNNEEDED in elogind
+# [['src/test/test-ratelimit.c'],
+# [],
+# []],
+#endif // 0
+
+ [['src/test/test-util.c'],
+ [],
+ []],
+
+#if 0 /// UNNEEDED in elogind
+# [['src/test/test-mount-util.c'],
+# [],
+# []],
+#endif // 0
+
+ [['src/test/test-exec-util.c'],
+ [],
+ []],
+
+ [['src/test/test-hexdecoct.c'],
+ [],
+ []],
+
+ [['src/test/test-alloc-util.c'],
+ [],
+ []],
+
+#if 0 /// UNNEEDED in elogind
+# [['src/test/test-xattr-util.c'],
+# [],
+# []],
+#endif // 0
+
+ [['src/test/test-io-util.c'],
+ [],
+ []],
+
+#if 0 /// UNNEEDED in elogind
+# [['src/test/test-glob-util.c'],
+# [],
+# []],
+#endif // 0
+
+ [['src/test/test-fs-util.c'],
+ [],
+ []],
+
+ [['src/test/test-proc-cmdline.c'],
+ [],
+ []],
+
+ [['src/test/test-fd-util.c'],
+ [],
+ []],
+
+#if 0 /// UNNEEDED in elogind
+# [['src/test/test-web-util.c'],
+# [],
+# []],
+
+# [['src/test/test-cpu-set-util.c'],
+# [],
+# []],
+#endif // 0
+
+ [['src/test/test-stat-util.c'],
+ [],
+ []],
+
+ [['src/test/test-escape.c'],
+ [],
+ []],
+
+ [['src/test/test-string-util.c'],
+ [],
+ []],
+
+ [['src/test/test-extract-word.c'],
+ [],
+ []],
+
+ [['src/test/test-parse-util.c'],
+ [],
+ []],
+
+ [['src/test/test-user-util.c'],
+ [],
+ []],
+
+#if 0 /// UNNEEDED in elogind
+# [['src/test/test-hostname-util.c'],
+# [],
+# []],
+#endif // 0
+
+ [['src/test/test-process-util.c'],
+ [],
+ []],
+
+#if 0 /// UNNEEDED in elogind
+# [['src/test/test-terminal-util.c'],
+# [],
+# []],
+
+# [['src/test/test-path-lookup.c'],
+# [],
+# []],
+
+# [['src/test/test-uid-range.c'],
+# [],
+# []],
+
+# [['src/test/test-cap-list.c',
+# generated_gperf_headers],
+# [],
+# [libcap]],
+
+# [['src/test/test-socket-util.c'],
+# [],
+# []],
+
+# [['src/test/test-barrier.c'],
+# [],
+# []],
+
+# [['src/test/test-tmpfiles.c'],
+# [],
+# []],
+
+# [['src/test/test-namespace.c'],
+# [libcore,
+# libshared],
+# [threads,
+# libblkid]],
+#endif // 0
+
+ [['src/test/test-verbs.c'],
+ [],
+ []],
+
+#if 0 /// UNNEEDED in elogind
+# [['src/test/test-install-root.c'],
+# [],
+# []],
+
+# [['src/test/test-acl-util.c'],
+# [],
+# [],
+# 'HAVE_ACL'],
+
+# [['src/test/test-seccomp.c'],
+# [],
+# [libseccomp],
+# 'HAVE_SECCOMP'],
+
+# [['src/test/test-rlimit-util.c'],
+# [],
+# []],
+
+# [['src/test/test-ask-password-api.c'],
+# [],
+# [],
+# '', 'manual'],
+
+# [['src/test/test-dissect-image.c'],
+# [],
+# [libblkid],
+# '', 'manual'],
+#endif // 0
+
+ [['src/test/test-signal-util.c'],
+ [],
+ []],
+
+ [['src/test/test-selinux.c'],
+ [],
+ []],
+
+ [['src/test/test-sizeof.c'],
+ [libbasic],
+ []],
+
+ [['src/test/test-hashmap.c',
+ 'src/test/test-hashmap-plain.c',
+ test_hashmap_ordered_c],
+ [],
+ [],
+ '', 'timeout=90'],
+
+ [['src/test/test-set.c'],
+ [],
+ []],
+
+#if 0 /// UNNEEDED in elogind
+# [['src/test/test-bitmap.c'],
+# [],
+# []],
+
+# [['src/test/test-xml.c'],
+# [],
+# []],
+#endif // 0
+
+ [['src/test/test-list.c'],
+ [],
+ []],
+
+ [['src/test/test-unaligned.c'],
+ [],
+ []],
+
+#if 0 /// UNNEEDED in elogind
+# [['src/test/test-tables.c',
+# 'src/shared/test-tables.h',
+# 'src/journal/journald-server.c',
+# 'src/journal/journald-server.h'],
+# [libcore,
+# libjournal_core,
+# libudev_core,
+# libudev_internal,
+# libelogind_network,
+# libshared],
+# [threads,
+# libseccomp,
+# libmount,
+# libxz,
+# liblz4,
+# libblkid],
+# '', '', [], libudev_core_includes],
+#endif // 0
+
+ [['src/test/test-prioq.c'],
+ [],
+ []],
+
+#if 0 /// UNNEEDED in elogind
+# [['src/test/test-fileio.c'],
+# [],
+# []],
+
+# [['src/test/test-time.c'],
+# [],
+# []],
+
+# [['src/test/test-clock.c'],
+# [],
+# []],
+
+# [['src/test/test-architecture.c'],
+# [],
+# []],
+#endif // 0
+
+ [['src/test/test-log.c'],
+ [],
+ []],
+
+ [['src/test/test-ipcrm.c'],
+ [],
+ [],
+ '', 'unsafe'],
+
+#if 0 /// UNNEEDED in elogind
+# [['src/test/test-btrfs.c'],
+# [],
+# [],
+# '', 'manual'],
+
+
+# [['src/test/test-firewall-util.c'],
+# [libshared],
+# [],
+# 'HAVE_LIBIPTC'],
+
+# [['src/test/test-netlink-manual.c'],
+# [],
+# [libkmod],
+# 'HAVE_KMOD', 'manual'],
+#endif // 0
+
+ [['src/test/test-ellipsize.c'],
+ [],
+ []],
+
+#if 0 /// UNNEEDED in elogind
+# [['src/test/test-date.c'],
+# [],
+# []],
+
+# [['src/test/test-sleep.c'],
+# [],
+# []],
+
+# [['src/test/test-replace-var.c'],
+# [],
+# []],
+
+# [['src/test/test-calendarspec.c'],
+# [],
+# []],
+#endif // 0
+
+ [['src/test/test-strip-tab-ansi.c'],
+ [],
+ []],
+
+#if 0 /// UNNEEDED in elogind
+# [['src/test/test-daemon.c'],
+# [],
+# []],
+#endif // 0
+
+ [['src/test/test-cgroup.c'],
+ [],
+ [],
+ '', 'manual'],
+
+
+#if 0 /// UNNEEDED in elogind
+# [['src/test/test-cgroup-mask.c'],
+# [libcore,
+# libshared],
+# [threads,
+# librt,
+# libseccomp,
+# libselinux,
+# libmount,
+# libblkid]],
+
+# [['src/test/test-cgroup-util.c'],
+# [],
+# []],
+
+# [['src/test/test-env-util.c'],
+# [],
+# []],
+
+# [['src/test/test-strbuf.c'],
+# [],
+# []],
+
+# [['src/test/test-strv.c'],
+# [],
+# []],
+#endif // 0
+
+ [['src/test/test-path-util.c'],
+ [],
+ []],
+
+#if 0 /// UNNEEDED in elogind
+# [['src/test/test-path.c'],
+# [libcore,
+# libshared],
+# [threads,
+# librt,
+# libseccomp,
+# libselinux,
+# libmount,
+# libblkid]],
+
+# [['src/test/test-execute.c'],
+# [libcore,
+# libshared],
+# [threads,
+# librt,
+# libseccomp,
+# libselinux,
+# libmount,
+# libblkid]],
+#endif // 0
+
+ [['src/test/test-siphash24.c'],
+ [],
+ []],
+
+#if 0 /// UNNEEDED in elogind
+# [['src/test/test-strxcpyx.c'],
+# [],
+# []],
+
+# [['src/test/test-install.c'],
+# [libcore,
+# libshared],
+# [],
+# '', 'manual'],
+
+# [['src/test/test-watchdog.c'],
+# [],
+# []],
+
+# [['src/test/test-sched-prio.c'],
+# [libcore,
+# libshared],
+# [threads,
+# librt,
+# libseccomp,
+# libselinux,
+# libmount,
+# libblkid]],
+#endif // 0
+
+ [['src/test/test-conf-files.c'],
+ [],
+ []],
+
+ [['src/test/test-conf-parser.c'],
+ [],
+ []],
+
+#if 0 /// UNNEEDED in elogind
+# [['src/test/test-af-list.c',
+# generated_gperf_headers],
+# [],
+# []],
+
+# [['src/test/test-arphrd-list.c',
+# generated_gperf_headers],
+# [],
+# []],
+
+# [['src/test/test-journal-importer.c'],
+# [],
+# []],
+
+# [['src/test/test-libudev.c'],
+# [libshared],
+# []],
+
+# [['src/test/test-udev.c'],
+# [libudev_core,
+# libudev_internal,
+# libelogind_network,
+# libshared],
+# [threads,
+# librt,
+# libblkid,
+# libkmod,
+# libacl],
+# '', 'manual'],
+#endif // 0
+
+ [['src/test/test-id128.c'],
+ [],
+ []],
+
+ [['src/test/test-hash.c'],
+ [],
+ []],
+
+#if 0 /// UNNEEDED in elogind
+# [['src/test/test-nss.c'],
+# [],
+# [libdl],
+# '', 'manual'],
+#endif // 0
+]
+
+############################################################
+
+# define some tests here, because the link_with deps were not defined earlier
+
+#if 0 /// No systemd-journal in elogind, of course
+# tests += [
+# [['src/journal/test-journal.c'],
+# [libjournal_core,
+# libshared],
+# [threads,
+# libxz,
+# liblz4]],
+
+# [['src/journal/test-journal-send.c'],
+# [libjournal_core,
+# libshared],
+# [threads,
+# libxz,
+# liblz4]],
+
+# [['src/journal/test-journal-syslog.c'],
+# [libjournal_core,
+# libshared],
+# [threads,
+# libxz,
+# liblz4,
+# libselinux]],
+
+# [['src/journal/test-journal-match.c'],
+# [libjournal_core,
+# libshared],
+# [threads,
+# libxz,
+# liblz4]],
+
+# [['src/journal/test-journal-enum.c'],
+# [libjournal_core,
+# libshared],
+# [threads,
+# libxz,
+# liblz4]],
+
+# [['src/journal/test-journal-stream.c'],
+# [libjournal_core,
+# libshared],
+# [threads,
+# libxz,
+# liblz4]],
+
+# [['src/journal/test-journal-flush.c'],
+# [libjournal_core,
+# libshared],
+# [threads,
+# libxz,
+# liblz4]],
+
+# [['src/journal/test-journal-init.c'],
+# [libjournal_core,
+# libshared],
+# [threads,
+# libxz,
+# liblz4]],
+
+# [['src/journal/test-journal-verify.c'],
+# [libjournal_core,
+# libshared],
+# [threads,
+# libxz,
+# liblz4]],
+
+# [['src/journal/test-journal-interleaving.c'],
+# [libjournal_core,
+# libshared],
+# [threads,
+# libxz,
+# liblz4]],
+
+# [['src/journal/test-mmap-cache.c'],
+# [libjournal_core,
+# libshared],
+# [threads,
+# libxz,
+# liblz4]],
+
+# [['src/journal/test-catalog.c'],
+# [libjournal_core,
+# libshared],
+# [threads,
+# libxz,
+# liblz4],
+# '', '', '-DCATALOG_DIR="@0@"'.format(build_catalog_dir)],
+
+# [['src/journal/test-compress.c'],
+# [libjournal_core,
+# libshared],
+# [liblz4,
+# libxz]],
+
+# [['src/journal/test-compress-benchmark.c'],
+# [libjournal_core,
+# libshared],
+# [liblz4,
+# libxz],
+# '', 'timeout=90'],
+
+# [['src/journal/test-audit-type.c'],
+# [libjournal_core,
+# libshared],
+# [liblz4,
+# libxz]],
+# ]
+#endif // 0
+
+############################################################
+
+tests += [
+#if 0 /// UNNEEDED in elogind
+# [['src/libelogind/sd-bus/test-bus-marshal.c'],
+# [],
+# [threads,
+# libglib,
+# libgobject,
+# libgio,
+# libdbus]],
+#endif // 0
+
+ [['src/libelogind/sd-bus/test-bus-signature.c'],
+ [],
+ [threads]],
+
+#if 0 /// UNNEEDED in elogind
+# [['src/libelogind/sd-bus/test-bus-chat.c'],
+# [],
+# [threads]],
+
+# [['src/libelogind/sd-bus/test-bus-cleanup.c'],
+# [],
+# [threads,
+# libseccomp]],
+#endif // 0
+
+ [['src/libelogind/sd-bus/test-bus-error.c'],
+ [libshared_static,
+ libelogind_internal],
+ []],
+
+#if 0 /// UNNEEDED in elogind
+# [['src/libelogind/sd-bus/test-bus-track.c'],
+# [],
+# [libseccomp]],
+#endif // 0
+
+ [['src/libelogind/sd-bus/test-bus-server.c'],
+ [],
+ [threads]],
+
+#if 0 /// UNNEEDED in elogind
+# [['src/libelogind/sd-bus/test-bus-objects.c'],
+# [],
+# [threads]],
+#endif // 0
+
+ [['src/libelogind/sd-bus/test-bus-vtable.c'],
+ [],
+ []],
+
+#if 0 /// UNNEEDED in elogind
+# [['src/libelogind/sd-bus/test-bus-gvariant.c'],
+# [],
+# [libglib,
+# libgobject,
+# libgio]],
+
+# [['src/libelogind/sd-bus/test-bus-creds.c'],
+# [],
+# []],
+#endif // 0
+
+ [['src/libelogind/sd-bus/test-bus-match.c'],
+ [],
+ []],
+
+#if 0 /// UNNEEDED in elogind
+# [['src/libelogind/sd-bus/test-bus-kernel.c'],
+# [],
+# []],
+
+# [['src/libelogind/sd-bus/test-bus-kernel-bloom.c'],
+# [],
+# []],
+
+# [['src/libelogind/sd-bus/test-bus-benchmark.c'],
+# [],
+# [threads]],
+
+# [['src/libelogind/sd-bus/test-bus-zero-copy.c'],
+# [],
+# []],
+#endif // 0
+
+ [['src/libelogind/sd-bus/test-bus-introspect.c'],
+ [],
+ []],
+
+ [['src/libelogind/sd-event/test-event.c'],
+ [],
+ []],
+
+#if 0 /// UNNEEDED in elogind
+# [['src/libelogind/sd-netlink/test-netlink.c'],
+# [],
+# []],
+
+# [['src/libelogind/sd-netlink/test-local-addresses.c'],
+# [],
+# []],
+
+# [['src/libelogind/sd-resolve/test-resolve.c'],
+# [],
+# [threads]],
+#endif // 0
+ [['src/libelogind/sd-login/test-login.c'],
+ [],
+ []],
+]
+
+#if 0 /// UNNEEDED in elogind
+# if cxx.found()
+# tests += [
+# [['src/libelogind/sd-bus/test-bus-vtable-cc.cc'],
+# [],
+# []]
+# ]
+# endif
+#endif // 0
+
+############################################################
+
+#if 0 /// UNNEEDED in elogind
+# tests += [
+# [['src/libelogind-network/test-dhcp-option.c',
+# 'src/libelogind-network/dhcp-protocol.h',
+# 'src/libelogind-network/dhcp-internal.h'],
+# [libshared,
+# libelogind_network],
+# []],
+
+# [['src/libelogind-network/test-sd-dhcp-lease.c',
+# 'src/libelogind-network/dhcp-lease-internal.h'],
+# [libshared,
+# libelogind_network],
+# []],
+
+# [['src/libelogind-network/test-dhcp-client.c',
+# 'src/libelogind-network/dhcp-protocol.h',
+# 'src/libelogind-network/dhcp-internal.h',
+# 'src/systemd/sd-dhcp-client.h'],
+# [libshared,
+# libelogind_network],
+# []],
+
+# [['src/libelogind-network/test-dhcp-server.c'],
+# [libshared,
+# libelogind_network],
+# []],
+
+# [['src/libelogind-network/test-ipv4ll.c',
+# 'src/libelogind-network/arp-util.h',
+# 'src/systemd/sd-ipv4ll.h'],
+# [libshared,
+# libelogind_network],
+# []],
+
+# [['src/libelogind-network/test-ipv4ll-manual.c',
+# 'src/systemd/sd-ipv4ll.h'],
+# [libshared,
+# libelogind_network],
+# [],
+# '', 'manual'],
+
+# [['src/libelogind-network/test-acd.c',
+# 'src/systemd/sd-ipv4acd.h'],
+# [libshared,
+# libelogind_network],
+# [],
+# '', 'manual'],
+
+# [['src/libelogind-network/test-ndisc-rs.c',
+# 'src/libelogind-network/dhcp-identifier.h',
+# 'src/libelogind-network/dhcp-identifier.c',
+# 'src/libelogind-network/icmp6-util.h',
+# 'src/systemd/sd-dhcp6-client.h',
+# 'src/systemd/sd-ndisc.h'],
+# [libshared,
+# libelogind_network],
+# []],
+
+# [['src/libelogind-network/test-ndisc-ra.c',
+# 'src/libelogind-network/icmp6-util.h',
+# 'src/systemd/sd-ndisc.h'],
+# [libshared,
+# libelogind_network],
+# []],
+
+# [['src/libelogind-network/test-dhcp6-client.c',
+# 'src/libelogind-network/dhcp-identifier.h',
+# 'src/libelogind-network/dhcp-identifier.c',
+# 'src/libelogind-network/dhcp6-internal.h',
+# 'src/systemd/sd-dhcp6-client.h'],
+# [libshared,
+# libelogind_network],
+# []],
+
+# [['src/libelogind-network/test-lldp.c'],
+# [libshared,
+# libelogind_network],
+# []],
+# ]
+#endif // 0
+
+############################################################
+
+tests += [
+ [['src/login/test-login-shared.c'],
+ [],
+ []],
+
+ [['src/login/test-inhibit.c'],
+ [],
+ [],
+ '', 'manual'],
+
+ [['src/login/test-login-tables.c'],
+ [liblogind_core,
+ libshared],
+ [threads,
+ libaudit,
+ libudev]],
+]
diff --git a/src/test/test-hashmap-ordered.awk b/src/test/test-hashmap-ordered.awk
new file mode 100644
index 000000000..10f4386fa
--- /dev/null
+++ b/src/test/test-hashmap-ordered.awk
@@ -0,0 +1,11 @@
+BEGIN {
+ print "/* GENERATED FILE */";
+ print "#define ORDERED"
+}
+{
+ if (!match($0, "^#include"))
+ gsub(/hashmap/, "ordered_hashmap");
+ gsub(/HASHMAP/, "ORDERED_HASHMAP");
+ gsub(/Hashmap/, "OrderedHashmap");
+ print
+}