Brad Bishop | 2f97392 | 2019-11-11 07:58:48 -0500 | [diff] [blame^] | 1 | From 114fe5067b58a2434b44855eee48f865186fe0fa Mon Sep 17 00:00:00 2001 |
| 2 | From: Alex Kiernan <alex.kiernan@gmail.com> |
| 3 | Date: Tue, 5 Nov 2019 22:26:23 +0000 |
| 4 | Subject: [PATCH] build: create tests directory for split builds |
| 5 | |
| 6 | When `--disable-dependency-tracking` is in effect with separate build |
| 7 | directory, the tests directory isn't created as a result of the |
| 8 | dependency generation, which leads to a build race for the tests |
| 9 | directory being created and failures: |
| 10 | |
| 11 | Making all in . |
| 12 | make[2]: Entering directory 'TOPDIR/build/tmp/work/riscv64-yoe-linux-musl/ostree/2019.5-r0/build' |
| 13 | (echo '[Test]' > tests/test-local-pull-depth.sh.test.tmp; \ |
| 14 | echo 'Type=session' >> tests/test-local-pull-depth.sh.test.tmp; \ |
| 15 | echo 'Exec=env G_TEST_SRCDIR=/usr/libexec/installed-tests/libostree G_TEST_BUILDDIR=/usr/libexec/installed-tests/libostree /usr/libexec/installed-tests/libostree/test-local-pull-depth.sh' >> tests/test-local-pull-depth.sh.test.tmp; \ |
| 16 | mv tests/test-local-pull-depth.sh.test.tmp tests/test-local-pull-depth.sh.test) |
| 17 | /bin/sh: tests/test-local-pull-depth.sh.test.tmp: No such file or directory |
| 18 | /bin/sh: line 1: tests/test-local-pull-depth.sh.test.tmp: No such file or directory |
| 19 | /bin/sh: line 2: tests/test-local-pull-depth.sh.test.tmp: No such file or directory |
| 20 | mv: cannot stat 'tests/test-local-pull-depth.sh.test.tmp': No such file or directory |
| 21 | make[2]: *** [Makefile:9282: tests/test-local-pull-depth.sh.test] Error 1 |
| 22 | |
| 23 | Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> |
| 24 | Upstream-Status: Pending |
| 25 | --- |
| 26 | buildutil/glib-tap.mk | 1 + |
| 27 | 1 file changed, 1 insertion(+) |
| 28 | |
| 29 | diff --git a/buildutil/glib-tap.mk b/buildutil/glib-tap.mk |
| 30 | index 34b8f21ea26a..9a944a0acc88 100644 |
| 31 | --- a/buildutil/glib-tap.mk |
| 32 | +++ b/buildutil/glib-tap.mk |
| 33 | @@ -116,6 +116,7 @@ installed_testcases = $(test_programs) $(installed_test_programs) \ |
| 34 | installed_test_meta_DATA = $(installed_testcases:=.test) |
| 35 | |
| 36 | %.test: %$(EXEEXT) Makefile |
| 37 | + @$(MKDIR_P) $(dir $@) |
| 38 | $(AM_V_GEN) (echo '[Test]' > $@.tmp; \ |
| 39 | echo 'Type=session' >> $@.tmp; \ |
| 40 | echo 'Exec=env G_TEST_SRCDIR=$(installed_testdir) G_TEST_BUILDDIR=$(installed_testdir) $(installed_testdir)/$(notdir $<)' >> $@.tmp; \ |
| 41 | -- |
| 42 | 2.17.1 |
| 43 | |