aboutsummaryrefslogtreecommitdiff
path: root/manual tests
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2022-10-02 12:40:43 -0400
committerEli Schwartz <eschwartz@archlinux.org>2022-10-02 14:22:21 -0400
commit72e0a95f7f89128557c745e5801b90f26c0f45e1 (patch)
tree370bb0232665880532645286b43a64ef46760d27 /manual tests
parentc20fb659f600149c08d635fc3750f03632164b9b (diff)
downloadmeson-72e0a95f7f89128557c745e5801b90f26c0f45e1.zip
meson-72e0a95f7f89128557c745e5801b90f26c0f45e1.tar.gz
meson-72e0a95f7f89128557c745e5801b90f26c0f45e1.tar.bz2
Add stable regression test
This tests stable maintenance branches, to ensure that build directories created with older versions of Meson continue to work without wiping, after updating to a bugfix release.
Diffstat (limited to 'manual tests')
-rw-r--r--manual tests/13 builddir upgrade/data/foo.dat0
-rw-r--r--manual tests/13 builddir upgrade/foo.10
-rw-r--r--manual tests/13 builddir upgrade/foo.c6
-rw-r--r--manual tests/13 builddir upgrade/lib.c9
-rw-r--r--manual tests/13 builddir upgrade/meson.build21
-rw-r--r--manual tests/13 builddir upgrade/mod.py1
6 files changed, 37 insertions, 0 deletions
diff --git a/manual tests/13 builddir upgrade/data/foo.dat b/manual tests/13 builddir upgrade/data/foo.dat
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/manual tests/13 builddir upgrade/data/foo.dat
diff --git a/manual tests/13 builddir upgrade/foo.1 b/manual tests/13 builddir upgrade/foo.1
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/manual tests/13 builddir upgrade/foo.1
diff --git a/manual tests/13 builddir upgrade/foo.c b/manual tests/13 builddir upgrade/foo.c
new file mode 100644
index 0000000..f8edd23
--- /dev/null
+++ b/manual tests/13 builddir upgrade/foo.c
@@ -0,0 +1,6 @@
+#include <stdio.h>
+
+int main() {
+ printf("Hello world!\n");
+ return 0;
+}
diff --git a/manual tests/13 builddir upgrade/lib.c b/manual tests/13 builddir upgrade/lib.c
new file mode 100644
index 0000000..2ea9c7d
--- /dev/null
+++ b/manual tests/13 builddir upgrade/lib.c
@@ -0,0 +1,9 @@
+#if defined _WIN32 || defined __CYGWIN__
+#define DLL_PUBLIC __declspec(dllexport)
+#else
+#define DLL_PUBLIC
+#endif
+
+int DLL_PUBLIC foo(void) {
+ return 0;
+}
diff --git a/manual tests/13 builddir upgrade/meson.build b/manual tests/13 builddir upgrade/meson.build
new file mode 100644
index 0000000..34ae39c
--- /dev/null
+++ b/manual tests/13 builddir upgrade/meson.build
@@ -0,0 +1,21 @@
+project('check old builddirs in a stable release', 'c')
+
+lib = both_libraries('lib', 'lib.c')
+exe = executable('foo', 'foo.c', link_with: lib, install: true)
+test('exe', exe)
+
+install_data('data/foo.dat', install_dir: get_option('datadir') / 'foo')
+install_man('foo.1')
+
+py = import('python').find_installation()
+py.install_sources('mod.py', subdir: 'foo')
+install_subdir('data', install_dir: py.get_install_dir())
+
+custom_target(
+ input: 'mod.py',
+ output: 'hello.dat',
+ command: [py, '@INPUT@'],
+ capture: true,
+ install: true,
+ install_dir: get_option('localstatedir') / 'foo',
+)
diff --git a/manual tests/13 builddir upgrade/mod.py b/manual tests/13 builddir upgrade/mod.py
new file mode 100644
index 0000000..60f08aa
--- /dev/null
+++ b/manual tests/13 builddir upgrade/mod.py
@@ -0,0 +1 @@
+print('Hello world!')