Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
796e18f1
Commit
796e18f1
authored
Jan 01, 2017
by
spxtr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a build rule for the boilerplate unit test.
parent
f5d9c430
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
17 deletions
+10
-17
Makefile
Makefile
+1
-1
BUILD
hack/boilerplate/BUILD
+9
-0
verify-boilerplate.sh
hack/verify-boilerplate.sh
+0
-16
No files found.
Makefile
View file @
796e18f1
...
...
@@ -474,4 +474,4 @@ bazel-build:
bazel build //cmd/... //pkg/... //federation/... //plugin/... //build/... //examples/... //test/... //third_party/...
bazel-test
:
bazel
test
--test_output
=
errors //cmd/... //pkg/... //federation/... //plugin/... //build/... //third_party/...
bazel
test
--test_output
=
errors //cmd/... //pkg/... //federation/... //plugin/... //build/... //third_party/...
//hack/...
hack/boilerplate/BUILD
View file @
796e18f1
package(default_visibility = ["//visibility:public"])
exports_files(glob(["*.txt"]))
py_test(
name = "boilerplate_test",
srcs = [
"boilerplate_test.py",
"boilerplate.py",
],
data = glob(["*.txt", "test/*"]),
)
hack/verify-boilerplate.sh
View file @
796e18f1
...
...
@@ -25,22 +25,6 @@ boiler="${boilerDir}/boilerplate.py"
files_need_boilerplate
=(
$(${
boiler
}
"
$@
"
)
)
# Run boilerplate.py unit tests
unitTestOut
=
"
$(
mktemp
)
"
trap
cleanup EXIT
cleanup
()
{
rm
"
${
unitTestOut
}
"
}
pushd
"
${
boilerDir
}
"
>
/dev/null
if
!
python
-m
unittest boilerplate_test 2>
"
${
unitTestOut
}
"
;
then
echo
"boilerplate_test.py failed"
echo
cat
"
${
unitTestOut
}
"
exit
1
fi
popd
>
/dev/null
# Run boilerplate check
if
[[
${#
files_need_boilerplate
[@]
}
-gt
0
]]
;
then
for
file
in
"
${
files_need_boilerplate
[@]
}
"
;
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment