Skip to content

Commit

Permalink
add vcan test filter: prevent vcan tests from running on github-actions
Browse files Browse the repository at this point in the history
  • Loading branch information
driftregion committed Dec 10, 2023
1 parent d539471 commit acbc7ba
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/runtests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ jobs:
with:
submodules: true
- name: build and run unit test
run: bazel test //test:all
run: bazel test //test:all --test_tag_filters=-vcan
4 changes: 2 additions & 2 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ genrule(
name = "isotp_c_wrapped_h",
srcs = glob(["src/tp/isotp-c/*.h"]),
outs = ["isotp_c_wrapped.h"],
cmd = "echo '#if defined(UDS_ISOTP_C)' >> $(OUTS) ; for f in $(SRCS); do cat $$f >> $(OUTS); done ; echo '#endif' >> $(OUTS); cat $(OUTS)",
cmd = "echo '#if defined(UDS_ISOTP_C)' >> $(OUTS) ; for f in $(SRCS); do cat $$f >> $(OUTS); done ; echo '#endif' >> $(OUTS)",
)

genrule(
Expand All @@ -30,7 +30,7 @@ genrule(
":isotp_c_wrapped.h",
],
outs = ["iso14229.h"],
cmd = "echo $(SRCS); (cat ; echo '#ifndef ISO14229_H'; echo '#define ISO14229_H'; echo; echo '#ifdef __cplusplus'; echo 'extern \"C\" {'; echo '#endif'; cat src/sys.h src/sys_arduino.h src/sys_unix.h src/sys_win32.h src/sys_esp32.h src/config.h src/util.h src/tp.h src/uds.h src/client.h src/server.h $(location //:isotp_c_wrapped.h) src/tp/*.h |sed -e 's,#include \".*,,' -e 's,^#pragma once,,' ; echo '#endif'; echo '#ifdef __cplusplus'; echo '}'; echo '#endif';) > $(OUTS) && cat $(OUTS)",
cmd = "echo $(SRCS); (cat ; echo '#ifndef ISO14229_H'; echo '#define ISO14229_H'; echo; echo '#ifdef __cplusplus'; echo 'extern \"C\" {'; echo '#endif'; cat src/sys.h src/sys_arduino.h src/sys_unix.h src/sys_win32.h src/sys_esp32.h src/config.h src/util.h src/tp.h src/uds.h src/client.h src/server.h $(location //:isotp_c_wrapped.h) src/tp/*.h |sed -e 's,#include \".*,,' -e 's,^#pragma once,,' ; echo '#endif'; echo '#ifdef __cplusplus'; echo '}'; echo '#endif';) > $(OUTS)",
)

filegroup(
Expand Down
5 changes: 2 additions & 3 deletions test/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ TEST_NAMES = [ src.split(".c")[0] for src in TEST_SRCS ]
size = "small",
env = { "UDS_TP_TYPE": "1"},
copts = ["-g"],
tags = [ "exclusive", ],
tags = [ "exclusive", "vcan"],
) for name, src in zip(TEST_NAMES, TEST_SRCS)
]

Expand All @@ -78,11 +78,10 @@ TEST_NAMES = [ src.split(".c")[0] for src in TEST_SRCS ]
size = "small",
env = { "UDS_TP_TYPE": "2"},
copts = ["-g"],
tags = [ "exclusive", ],
tags = [ "exclusive", "vcan"],
) for name, src in zip(TEST_NAMES, TEST_SRCS)
]


cc_test(
name = "test_fuzz_server",
srcs = [
Expand Down

0 comments on commit acbc7ba

Please sign in to comment.