Skip to content

Commit cf3f252

Browse files
authored
Parallel build all C tests from top level makefile [AP-1086] (#1394)
# Description @swift-nav/devinfra A small change to speed up builds of C tests when using the top level makefile, as is done in all CI stages. The current makefile has 2 sections which build and run tests. They are similar (one targets a subset of tests for compatibility with big endian machines). They are both written as: ``` make -j4; make do-all-tests ``` Where the first command builds all targets in parallel, and the second runs all the tests sequentially. However, test targets are not built as part of `all` so what really happens is the main `libsbp` target is build in parallel in the first step, then all tests are built and run single threaded in the second stage. This can be easily fixed and sped up by altering the first command to build all test targets using the `-j4` flag: ``` make -j4 build-all-tests; make do-all-tests ``` # API compatibility Does this change introduce a API compatibility risk? No ## API compatibility plan If the above is "Yes", please detail the compatibility (or migration) plan: No # JIRA Reference https://swift-nav.atlassian.net/browse/AP-1086
1 parent e473ea4 commit cf3f252

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ test-c:
378378
cd $(SWIFTNAV_ROOT)/c; \
379379
mkdir -p build/ && cd build/; \
380380
cmake $(CMAKEFLAGS) ../; \
381-
$(MAKE) -j4; \
381+
$(MAKE) -j4 build-all-tests; \
382382
$(MAKE) do-all-tests
383383
$(call announce-end,"Finished running C tests")
384384

@@ -387,7 +387,7 @@ test-c-v4:
387387
cd $(SWIFTNAV_ROOT)/c; \
388388
mkdir -p build/ && cd build/; \
389389
cmake $(CMAKEFLAGS) ../; \
390-
$(MAKE) -j4; \
390+
$(MAKE) -j4 test-libsbp-v4 test-libsbp-cpp-v4; \
391391
$(MAKE) do-test-libsbp-v4 do-test-libsbp-cpp-v4
392392
$(call announce-end,"Finished running C tests")
393393

0 commit comments

Comments
 (0)