Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix scan-build require line #16

Merged
merged 1 commit into from
Apr 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix scan-build test case
Fix requires and features and scan-view run.
  • Loading branch information
serge-sans-paille committed Apr 25, 2020
commit c29640ee99722250cf504d612b7a964d0e2bf497
4 changes: 2 additions & 2 deletions tests/lit.site.cfg.in
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ enable_program('clangxx', "@CLANGXX_BINARY@")
enable_program('clang', "@CLANG_BINARY@")
enable_program('lldb', "@LLDB_BINARY@")
enable_program('lld', "@LLD_BINARY@")
enable_program('scan-build', "@SCANBUILD_BINARY@")
enable_program('scan-view', "@SCANVIEW_BINARY@")
enable_program('scan-build', "@SCANBUILD@")
enable_program('scan-view', "@SCANVIEW@")

enable_feature("compiler-rt", "@ENABLE_COMPILER_RT@")
enable_feature("libc++", "@ENABLE_LIBCXX@")
10 changes: 6 additions & 4 deletions tests/scanbuild_missing_delete.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
// Tests scan-view runs correctly, see https://bugzilla.redhat.com/show_bug.cgi?id=1647130
// REQUIRES: scanbuild, scanview
// RUN: mkdir %t.out
// RUN: %scan-build -o %t.out %clangxx -c %s -o %t
// RUN: timeout 10 %scan-view --no-browser %t.out/*
// REQUIRES: scan-build, scan-view
// RUN: mkdir %t.out && cd %t.out && rm -rf *
// RUN: %scan-build -o . %clangxx -c %s -o %t
// It's not super satisfying to call sh like this, and not portable on windows.
// Yet that's the only I found to cope with the lack of support for '&' in lit.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ugly indeed :)

// RUN: sh -c "%scan-view --no-browser * & WPID=$! && sleep 5 && kill $WPID"
int main(int argc, char *argv[]) {
while (argc--)
new int();
Expand Down