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

Test clean task in CI #896

Merged
merged 17 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from 10 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
5 changes: 5 additions & 0 deletions checker/bin-devel/test-cftests-junit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@ source "$SCRIPTDIR"/clone-related.sh
# Adding --max-workers=1 to avoid random failures in Github Actions. An alternative solution is to use --no-build-cache.
# https://github.com/eisop/checker-framework/issues/849
./gradlew test -x javadoc -x allJavadoc --console=plain --warning-mode=all --max-workers=1

# Test clean task
./gradlew clean
Ao-senXiong marked this conversation as resolved.
Show resolved Hide resolved
./gradlew clean
./gradlew clean
Ao-senXiong marked this conversation as resolved.
Show resolved Hide resolved
3 changes: 3 additions & 0 deletions checker/bin-devel/test-cftests-nonjunit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ source "$SCRIPTDIR"/clone-related.sh
# Moved example-tests out of all tests because it fails in
# the release script because the newest maven artifacts are not published yet.
./gradlew :checker:exampleTests -x javadoc -x allJavadoc --console=plain --warning-mode=all

Copy link
Member

Choose a reason for hiding this comment

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

Is there any benefit to also test this here? Isn't it enough to test in the junit script?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think :checker:examplesTests are tests run makefiles

task exampleTests(type: Exec, dependsOn: assembleForJavac, group: 'Verification') {

Copy link
Member

Choose a reason for hiding this comment

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

Can you elaborate a bit what your point is?
We already test running ./gradlew clean in junit above. Do you want to clean at the end of every test? Or why is :checker:examplesTests relevant for whether we call clean here?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think Junit test doesn't contain makefile tests such as exampleTests, is that correct? Because exampleTests are the tests for makefiles and ./gradlew clean will also run make clean for makefile tests. I just want to make it works after we actual run makefile tests in CI.

Copy link
Member

Choose a reason for hiding this comment

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

There are no tests that actually ensure that clean cleaned up everything - so you won't know whether this call to clean actually removed all files that were generated from exampleTests.
So what do you learn from calling clean here?

Copy link
Member Author

Choose a reason for hiding this comment

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

okay, I will clean up them. Thanks!

Ao-senXiong marked this conversation as resolved.
Show resolved Hide resolved
# Test clean task
./gradlew clean
Ao-senXiong marked this conversation as resolved.
Show resolved Hide resolved
3 changes: 1 addition & 2 deletions checker/tests/nullness-extra/issue265/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ all:
$(JAVAC) -processor org.checkerframework.checker.nullness.NullnessChecker Delta.java -cp bin/ -d bin/

clean:
rm bin/*.class
rmdir bin
rm -rf bin
2 changes: 1 addition & 1 deletion docs/examples/BazelExample/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ all:
grep -qF "BazelExample.java:25: error: [assignment.type.incompatible] incompatible types in assignment." Out.txt || (echo "FAILURE. Here is file Out.txt:" && cat Out.txt && echo "End of file Out.txt." && false)

clean:
bazelisk clean
-bazelisk clean
rm -f Out.txt
Loading