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

t: mark test sources as .PHONY #3228

Merged
merged 2 commits into from
Sep 5, 2018
Merged

t: mark test sources as .PHONY #3228

merged 2 commits into from
Sep 5, 2018

Conversation

ttaylorr
Copy link
Contributor

@ttaylorr ttaylorr commented Sep 5, 2018

This pull request makes t/t-*.sh targets .PHONY, so that we can repeatedly invoke them as make t-*.sh without having to pass -B.

/cc @git-lfs/core

In preparation to mark test sources as .PHONY, let's keep track of a
list of them so that we can eventually write:

  .PHONY : $(TEST_SRCS)

In the meantime, we'll replace the pattern "./t-%.sh", which will not
introduce a meaningful behavior change.
We have used 'make' in the testing directory 't' to help run integration
tests, including starting and stopping a Git LFS test server, and
environmental setup bits.

We do so by writing a recipe that matches all testing files that we'd
want to run, and then running commands based on which one we picked.

Since we don't generate a file that was missing when running one of
these sources, 'make' will say that the file is up-to-date, unless we
run with 'make -B' (to force a re-make).

This is annoying to type, and can be avoided by marking the test targets
as .PHONY, indicating that they don't produce a file, and are instead
synthetic targets that can be run repeatedly without `make`'s up-to-date
checking.
@ttaylorr ttaylorr added the review label Sep 5, 2018
@ttaylorr ttaylorr added this to the v2.6.0 milestone Sep 5, 2018
@ttaylorr ttaylorr requested a review from bk2204 September 5, 2018 15:00
@bk2204
Copy link
Member

bk2204 commented Sep 5, 2018

Are you reading my mind? This is a feature I just needed today.

@ttaylorr ttaylorr merged commit 80837ef into master Sep 5, 2018
@ttaylorr ttaylorr deleted the ttaylorr/t-tests-are-phony branch September 5, 2018 18:36
@ttaylorr
Copy link
Contributor Author

ttaylorr commented Sep 5, 2018

🔮

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants