-
-
Notifications
You must be signed in to change notification settings - Fork 616
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a5cc8ed
commit 2d90b06
Showing
6 changed files
with
74 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
-- | ||
-- test_gmake2_clangtidy.lua | ||
-- Test ClangTidy support in Makefiles. | ||
-- | ||
|
||
local suite = test.declare("gmake2_clangtidy") | ||
local gmake2 = premake.modules.gmake2 | ||
|
||
local wks, prj, cfg | ||
|
||
function suite.setup() | ||
wks = workspace("MyWorkspace") | ||
configurations { "Debug", "Release" } | ||
targetname "blink" | ||
kind "StaticLib" | ||
language "C++" | ||
prj = test.createProject(wks) | ||
end | ||
|
||
local function prepare() | ||
wks = test.getWorkspace(wks) | ||
prj = test.getproject(wks, 1) | ||
cfg = test.getconfig(prj, "Debug") | ||
gmake2.cpp.clangtidy(cfg, toolset) | ||
files { "src/hello.cpp", "src/hello2.c" } | ||
|
||
end | ||
|
||
function suite.clangtidyOn() | ||
clangtidy "On" | ||
|
||
prepare() | ||
|
||
test.capture [[ | ||
CLANG_TIDY = clang-tidy | ||
]] | ||
end | ||
|
||
function suite.clangtidyOff() | ||
prepare() | ||
|
||
test.capture [[ | ||
CLANG_TIDY = \# | ||
]] | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters