bazel test //common/storage/sql/sqlite3/...
on that test:
cc_test(
name = "test_sqlite3",
srcs = [
"test_sqlite3.c",
],
data = [":db_file"],
visibility = ["//visibility:public"],
deps = [
"//common/storage/sql/sqlite3:sqlite3_storage",
"//common/trinary:trit_ptrit",
"@unity",
],
)
genrule(
name = "db_file",
srcs = ["//common/storage/sql:schema"],
outs = ["ciri.db"],
cmd = "sqlite3 $@ < $<;",
local = 1,
output_to_bindir = 1,
)
Fails.
but when i exe `chmod 666 ciri.db` and then exe the test binary (test_sqlite3) manually, it passes.
also, when i change the change the `cmd` in genrule to:
cmd = "sqlite3 $(@D)/test.db < $<; cat $(@D)/test.db > $@; chmod 666 $(@D)/test.db",
and in my binary i use test.db instead of "ciri.db", it fails when i run "bazel test ..." but passes when i exe manually (without me having to chmod the db file)
I would be grateful for any help on that matter.
Thanks!
--
*IOTΛ Foundation*
c/o Nextland
Strassburgerstraße 55
10405 Berlin · Germany
Board of Directors: Dominik Schiener, David Sønstebø, Ralf Rottmann
ID/Company No.: 3416/1234/2
--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/deca8e81-33a1-4bdf-b6e4-332f02e949ee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/c8c8c9cf-85b7-4e74-8820-0a064ae8cd5a%40googlegroups.com.