summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtests/projects/package/compatibility/deps_with_version/src/main.c7
-rw-r--r--tests/projects/package/compatibility/deps_with_version/test.lua10
-rw-r--r--tests/projects/package/compatibility/deps_with_version/xmake.lua18
3 files changed, 35 insertions, 0 deletions
diff --git a/tests/projects/package/compatibility/deps_with_version/src/main.c b/tests/projects/package/compatibility/deps_with_version/src/main.c
new file mode 100755
index 000000000..9ae580511
--- /dev/null
+++ b/tests/projects/package/compatibility/deps_with_version/src/main.c
@@ -0,0 +1,7 @@
+#include <stdio.h>
+
+int main(int argc, char** argv)
+{
+ printf("hello world!\n");
+ return 0;
+}
diff --git a/tests/projects/package/compatibility/deps_with_version/test.lua b/tests/projects/package/compatibility/deps_with_version/test.lua
new file mode 100644
index 000000000..a6690754b
--- /dev/null
+++ b/tests/projects/package/compatibility/deps_with_version/test.lua
@@ -0,0 +1,10 @@
+function main(t)
+ -- freebsd ci is slower
+ if is_host("bsd") then
+ return
+ end
+ -- only for x86/x64, because it will take too long time on ci with arm/mips
+ if os.subarch():startswith("x") or os.subarch() == "i386" then
+ t:build()
+ end
+end
diff --git a/tests/projects/package/compatibility/deps_with_version/xmake.lua b/tests/projects/package/compatibility/deps_with_version/xmake.lua
new file mode 100644
index 000000000..f0cc809b9
--- /dev/null
+++ b/tests/projects/package/compatibility/deps_with_version/xmake.lua
@@ -0,0 +1,18 @@
+package("foo")
+ add_deps("zlib >=v1.2.13")
+package_end()
+
+package("bar")
+ add_deps("zlib")
+package_end()
+
+package("test")
+ add_deps("foo", "bar")
+package_end()
+
+add_requires("test")
+
+target("test")
+ set_kind("binary")
+ add_files("src/*.c")
+ add_packages("test")