summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorOliver Reiche <oliver.reiche@huawei.com>2024-05-21 18:50:37 +0200
committerOliver Reiche <oliver.reiche@huawei.com>2024-05-22 09:34:58 +0200
commit2eafcd6f473910331f38c029cdb268eb4eae68ae (patch)
tree89e2719cda6d19847ca463ce522812212f91034c /tests
parent0c98de88250eacbce78d5d698a8cc04611c61cd0 (diff)
downloadrules-cc-2eafcd6f473910331f38c029cdb268eb4eae68ae.tar.gz
Add test for creating shared lib from object lib
Diffstat (limited to 'tests')
-rw-r--r--tests/test_cases/deps/TARGETS3
-rw-r--r--tests/test_cases/deps/object/TARGETS7
2 files changed, 9 insertions, 1 deletions
diff --git a/tests/test_cases/deps/TARGETS b/tests/test_cases/deps/TARGETS
index 7e4dd28..2ed2cf4 100644
--- a/tests/test_cases/deps/TARGETS
+++ b/tests/test_cases/deps/TARGETS
@@ -99,10 +99,11 @@
, "object":
{ "type": ["test_rules", "test_case"]
, "name": ["deps_object"]
- , "targets": ["+foo", "+bar", "+main", "+test_main", "+install_main"]
+ , "targets": ["+foo", "+bar", "+baz", "+main", "+test_main", "+install_main"]
, "asserts":
[ "[ -f ./foo/libfoo.so ]"
, "[ -f ./bar/bar/bar.o ]"
+ , "[ -f ./baz/libbaz.so ]"
, "[ -f ./install_main/lib/libfoo.so ]"
, "[ ! -f ./install_main/lib/bar/bar.o ]"
, "[ \"$(./install_main/bin/main)\" = 'Hello World and Galaxy' ]"
diff --git a/tests/test_cases/deps/object/TARGETS b/tests/test_cases/deps/object/TARGETS
index bd69478..98d7bdb 100644
--- a/tests/test_cases/deps/object/TARGETS
+++ b/tests/test_cases/deps/object/TARGETS
@@ -14,6 +14,13 @@
, "srcs": ["bar.cpp"]
, "stage": ["bar"]
}
+, "baz":
+ { "type": ["@", "rules", "CC", "library"]
+ , "name": ["baz"]
+ , "shared": ["yes"]
+ , "deps": ["bar"]
+ , "stage": ["baz"]
+ }
, "main":
{ "type": ["@", "rules", "CC", "binary"]
, "name": ["main"]