<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/Makefile, branch v2.44.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.44.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.44.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2024-02-08T21:20:33Z</updated>
<entry>
<title>Merge branch 'jk/unit-tests-buildfix'</title>
<updated>2024-02-08T21:20:33Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-02-08T21:20:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6dbc1eb664fd62b272977d16082bb6440514907b'/>
<id>urn:sha1:6dbc1eb664fd62b272977d16082bb6440514907b</id>
<content type='text'>
Build dependency around unit tests has been fixed.

* jk/unit-tests-buildfix:
  t/Makefile: say the default target upfront
  t/Makefile: get UNIT_TESTS list from C sources
  Makefile: remove UNIT_TEST_BIN directory with "make clean"
  Makefile: use mkdir_p_parent_template for UNIT_TEST_BIN
</content>
</entry>
<entry>
<title>Merge branch 'cp/unit-test-prio-queue'</title>
<updated>2024-02-08T21:20:33Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-02-08T21:20:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=107023e1c9f981476c505e73eab319db6534a536'/>
<id>urn:sha1:107023e1c9f981476c505e73eab319db6534a536</id>
<content type='text'>
The priority queue test has been migrated to the unit testing
framework.

* cp/unit-test-prio-queue:
  tests: move t0009-prio-queue.sh to the new unit testing framework
</content>
</entry>
<entry>
<title>Merge branch 'jc/make-libpath-template'</title>
<updated>2024-02-06T22:31:22Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-02-06T22:31:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=07bbe4caabd8adc0525b9649581465c1022cb2a4'/>
<id>urn:sha1:07bbe4caabd8adc0525b9649581465c1022cb2a4</id>
<content type='text'>
The Makefile often had to say "-L$(path) -R$(path)" that repeats
the path to the same library directory for link time and runtime.
A Makefile template is used to reduce such repetition.

* jc/make-libpath-template:
  Makefile: simplify output of the libpath_template
  Makefile: reduce repetitive library paths
</content>
</entry>
<entry>
<title>Makefile: reduce repetitive library paths</title>
<updated>2024-01-31T18:01:56Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-01-31T17:42:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=354dbf7d649ef75c2f83d0f1d7cc03d1e84279dc'/>
<id>urn:sha1:354dbf7d649ef75c2f83d0f1d7cc03d1e84279dc</id>
<content type='text'>
When we take a library package we depend on (e.g., LIBPCRE) from a
directory other than the default location of the system, we add the
same directory twice on the linker command like, like so:

  EXTLIBS += -L$(LIBPCREDIR)/$(lib) $(CC_LD_DYNPATH)$(LIBPCREDIR)/$(lib)

Introduce a template "libpath_template" that takes the path to the
directory, which can be used like so:

  EXTLIBS += $(call libpath_template,$(LIBPCREDIR)/$(lib))

and expand it into the "-L$(DIR) $(CC_LD_DYNPATH)$(DIR)" form.
Hopefully we can reduce the chance of typoes this way.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Makefile: remove UNIT_TEST_BIN directory with "make clean"</title>
<updated>2024-01-30T05:57:22Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2024-01-30T05:38:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5d5ca1b362b3bb6c436b2fec798446ddcf32c24b'/>
<id>urn:sha1:5d5ca1b362b3bb6c436b2fec798446ddcf32c24b</id>
<content type='text'>
We remove $(UNIT_TEST_PROGS), but that leaves the automatically
generated "bin" dir they reside in. And once we start cleaning that,
there is no point in removing the individual programs, as they'll by
wiped out by the recurse "rm".

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Makefile: use mkdir_p_parent_template for UNIT_TEST_BIN</title>
<updated>2024-01-30T05:57:22Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2024-01-30T05:37:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=318ecda5aaacbc9990a0ef1f792ccbe8660ddba9'/>
<id>urn:sha1:318ecda5aaacbc9990a0ef1f792ccbe8660ddba9</id>
<content type='text'>
We build the UNIT_TEST_BIN directory (t/unit-tests/bin) on the fly with
"mkdir -p". And so the recipe for UNIT_TEST_PROGS, which put their
output in that directory, depend on UNIT_TEST_BIN to make sure it's
there.

But using a normal dependency leads to weird outcomes, because the
timestamp of the directory is important. For example, try this:

  $ make
  [...builds everything...]

  [now re-build one unit test]
  $ touch t/unit-tests/t-ctype.c
  $ make
      SUBDIR templates
      CC t/unit-tests/t-ctype.o
      LINK t/unit-tests/bin/t-ctype

So far so good. Now running make again should build nothing. But it
doesn't!

  $ make
      SUBDIR templates
      LINK t/unit-tests/bin/t-basic
      LINK t/unit-tests/bin/t-mem-pool
      LINK t/unit-tests/bin/t-strbuf

Er, what? Let's rebuild again:

  $ make
      SUBDIR templates
      LINK t/unit-tests/bin/t-ctype

Weird. And now we ping-pong back and forth forever:

  $ make
      SUBDIR templates
      LINK t/unit-tests/bin/t-basic
      LINK t/unit-tests/bin/t-mem-pool
      LINK t/unit-tests/bin/t-strbuf
  $ make
      SUBDIR templates
      LINK t/unit-tests/bin/t-ctype

What happens is that writing t/unit-tests/bin/t-ctype updates the mtime
of the directory t/unit-tests/bin. And then on the next invocation of
make, all of those other tests are now older and so get rebuilt. And
back and forth forever.

We can fix this by making the directory as part of the build recipe for
the programs, using the template from 0b6d0bc924 (Makefiles: add and use
wildcard "mkdir -p" template, 2022-03-03).

Helped-by: SZEDER Gábor &lt;szeder.dev@gmail.com&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'js/oss-fuzz-build-in-ci'</title>
<updated>2024-01-30T00:03:00Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-01-30T00:03:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9869e02a645babb91be500ea11eabddc551850e2'/>
<id>urn:sha1:9869e02a645babb91be500ea11eabddc551850e2</id>
<content type='text'>
oss-fuzz tests are built and run in CI.

* js/oss-fuzz-build-in-ci:
  ci: build and run minimal fuzzers in GitHub CI
  fuzz: fix fuzz test build rules
</content>
</entry>
<entry>
<title>Merge branch 'al/unit-test-ctype'</title>
<updated>2024-01-26T16:54:45Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-01-26T16:54:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b982aa9a9faf93152ed3a1a6b326e0b44a2e939e'/>
<id>urn:sha1:b982aa9a9faf93152ed3a1a6b326e0b44a2e939e</id>
<content type='text'>
Move test-ctype helper to the unit-test framework.

* al/unit-test-ctype:
  unit-tests: rewrite t/helper/test-ctype.c as a unit test
</content>
</entry>
<entry>
<title>tests: move t0009-prio-queue.sh to the new unit testing framework</title>
<updated>2024-01-22T18:55:01Z</updated>
<author>
<name>Chandra Pratap</name>
<email>chandrapratap3519@gmail.com</email>
</author>
<published>2024-01-21T19:28:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=808b77e5d47094ac8178b08d4c20e4893485bfca'/>
<id>urn:sha1:808b77e5d47094ac8178b08d4c20e4893485bfca</id>
<content type='text'>
t/t0009-prio-queue.sh along with t/helper/test-prio-queue.c unit
tests Git's implementation of a priority queue. Migrate the
test over to the new unit testing framework to simplify debugging
and reduce test run-time. Refactor the required logic and add
a new test case in addition to porting over the original ones in
shell.

Signed-off-by: Chandra Pratap &lt;chandrapratap3519@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>ci: build and run minimal fuzzers in GitHub CI</title>
<updated>2024-01-19T22:29:25Z</updated>
<author>
<name>Josh Steadmon</name>
<email>steadmon@google.com</email>
</author>
<published>2024-01-19T21:38:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c4a9cf1df38439ff40b8d64d8982a9cdcd345396'/>
<id>urn:sha1:c4a9cf1df38439ff40b8d64d8982a9cdcd345396</id>
<content type='text'>
To prevent bitrot, we would like to regularly exercise the fuzz tests in
order to make sure they still link &amp; run properly. We already compile
the fuzz test objects as part of the default `make` target, but we do
not link the executables due to the fuzz tests needing specific
compilers and compiler features. This has lead to frequent build
breakages for the fuzz tests.

To remedy this, we can add a CI step to actually link the fuzz
executables, and run them (with finite input rather than the default
infinite random input mode) to verify that they execute properly.

Since the main use of the fuzz tests is via OSS-Fuzz [1], and OSS-Fuzz
only runs tests on Linux [2], we only set up a CI test for the fuzzers
on Linux.

[1] https://github.com/google/oss-fuzz
[2] https://google.github.io/oss-fuzz/further-reading/fuzzer-environment/

Signed-off-by: Josh Steadmon &lt;steadmon@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
