Skip to content

Commit

Permalink
Makefile: add test-submodules target
Browse files Browse the repository at this point in the history
...and remove "build" as dependency of "test" target. No need to waste time linking the
deft-app exe when we run tests.
  • Loading branch information
cgay committed Dec 29, 2024
1 parent cb53cb9 commit 1003d80
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ jobs:
run: |
mkdir -p ${DYLAN}
make install
ls -l dylan-root/bin/
ldd dylan-root/bin/deft
- name: Exercise deft
env:
Expand All @@ -55,3 +57,11 @@ jobs:
${exe} list
${exe} build abc-test-suite
_build/bin/abc-test-suite
- name: Run test suite using submodules
env:
DYLAN_CATALOG: ext/pacman-catalog
DYLAN: dylan-root
run: |
mkdir -p ${DYLAN}
make test-submodules
15 changes: 11 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,26 @@ build-with-version:
really-install:
mkdir -p $(DYLAN)/bin
cp _build/sbin/deft-app $(DYLAN)/bin/deft
ln -f $(DYLAN)/bin/deft $(DYLAN)/bin/{deft-app,dylan}
ln -f $(DYLAN)/bin/deft $(DYLAN)/bin/deft-app
ln -f $(DYLAN)/bin/deft $(DYLAN)/bin/dylan

install: build-with-version really-install

# Build and install without the version hacking above.
install-debug: build really-install

# Deft needs to be buildable with submodules so that it can be built on
# new platforms without having to manually install deps.
test: build
# Normal development and testing is done with Deft itself.
test:
$(DEFT_EXE) update
$(DEFT_EXE) build deft-test-suite \
&& DYLAN_CATALOG=ext/pacman-catalog _build/bin/deft-test-suite

# Deft also needs to be buildable with submodules so that it can be built on new
# platforms without having to manually install deps.
test-submodules: distclean
dylan-compiler -build deft-test-suite \
&& DYLAN_CATALOG=ext/pacman-catalog _build/bin/deft-test-suite

dist: distclean install

clean:
Expand Down

0 comments on commit 1003d80

Please sign in to comment.