first tests for ci (#16)
This commit is contained in:
parent
37eb556e1f
commit
21391856d0
|
@ -1,8 +1,11 @@
|
|||
---
|
||||
platforms:
|
||||
ubuntu1804:
|
||||
build_targets:
|
||||
- "//examples:tests"
|
||||
ubuntu1604:
|
||||
build_targets:
|
||||
- "//examples/..."
|
||||
- "//examples:tests"
|
||||
macos:
|
||||
build_targets:
|
||||
- "//examples/..."
|
||||
- "//examples:tests"
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
test_suite(
|
||||
name = "tests",
|
||||
tests = [
|
||||
"//examples/cmake:test_libpng",
|
||||
"//examples/cmake:test_zlib",
|
||||
],
|
||||
)
|
|
@ -15,10 +15,8 @@ cmake_external(
|
|||
)
|
||||
|
||||
cc_binary(
|
||||
name = "libpng_test",
|
||||
srcs = ["libpng_test.cpp"],
|
||||
args = ["$(location bazel-icon-transparent.png) out.png"],
|
||||
data = ["bazel-icon-transparent.png"],
|
||||
name = "libpng_usage_example",
|
||||
srcs = ["libpng_usage_example.cpp"],
|
||||
deps = [
|
||||
":libpng",
|
||||
":libz",
|
||||
|
@ -30,3 +28,18 @@ cc_binary(
|
|||
srcs = ["zlib-example.cpp"],
|
||||
deps = [":libz"],
|
||||
)
|
||||
|
||||
sh_test(
|
||||
name = "test_zlib",
|
||||
srcs = ["test_zlib.sh"],
|
||||
data = [":zlib_usage_example"],
|
||||
visibility = ["//:__pkg__"]
|
||||
)
|
||||
|
||||
sh_test(
|
||||
name = "test_libpng",
|
||||
srcs = ["test_libpng.sh"],
|
||||
data = [":libpng_usage_example", "bazel-icon-transparent.png",],
|
||||
args = ["$(location bazel-icon-transparent.png) out.png"],
|
||||
visibility = ["//:__pkg__"]
|
||||
)
|
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
${TEST_SRCDIR}/rules_foreign_cc/examples/cmake/libpng_usage_example $@
|
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
${TEST_SRCDIR}/rules_foreign_cc/examples/cmake/zlib_usage_example
|
Loading…
Reference in New Issue