test: extend examples/deps to include a deep dependency

This commit is contained in:
tydeu 2021-10-01 21:23:31 -04:00
parent f187761c2e
commit 83ccf8a15d
10 changed files with 36 additions and 7 deletions

View file

@ -2,9 +2,11 @@ LAKE ?= ../build/bin/lake
all: check-lake test time-bootstrap check-bootstrap test-bootstrapped
test: test-init test-hello test-io test-deps test-git test-ffi test-ffi-dep test-main
test: test-init test-hello test-io test-deps\
test-git test-ffi test-ffi-dep test-main
clean: clean-init clean-hello clean-io clean-deps clean-git clean-ffi clean-ffi-dep clean-main clean-bootstrap
clean: clean-init clean-hello clean-io clean-deps\
clean-git clean-ffi clean-ffi-dep clean-main clean-bootstrap
check-lake:
$(LAKE) self-check
@ -74,4 +76,5 @@ test-bootstrapped: test-boostrapped-hello
test-boostrapped-hello:
cd hello && ./bootstrapped-test.sh
.PHONY: all check-lake test clean test-bootstrap time-bootstrap check-bootstrap test-bootstrapped
.PHONY: all check-lake test clean\
test-bootstrap time-bootstrap check-bootstrap test-bootstrapped

1
examples/deps/bar/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/build

View file

@ -0,0 +1,4 @@
import Foo
def main : IO Unit :=
IO.println s!"Hello, bar {foo} {a} {b}!"

View file

@ -0,0 +1,9 @@
import Lake
open System Lake DSL
package where
name := "bar"
dependencies := [
{ name := "foo", src := Source.path (FilePath.mk ".." / "foo") }
]
binRoot := `Main

View file

@ -1,3 +1,4 @@
rm -rf a/build
rm -rf b/build
rm -rf foo/build
rm -rf bar/build

View file

@ -2,6 +2,3 @@ import A
import B
import Foo.Bar
import Foo.Baz
def main : IO Unit :=
IO.println s!"Hello, {foo} {a} {b}!"

View file

@ -0,0 +1,4 @@
import Foo
def main : IO Unit :=
IO.println s!"Hello, {foo} {a} {b}!"

View file

@ -7,3 +7,4 @@ package where
{ name := "a", src := Source.path (FilePath.mk ".." / "a") },
{ name := "b", src := Source.path (FilePath.mk ".." / "b") }
]
binRoot := `Main

View file

@ -1,3 +1,11 @@
set -ex
# TODO: flip and fix example (deep deps are currently broken)
cd foo
echo "in directory 'foo'"
${LAKE:-../../../build/bin/lake} build-bin
cd ..
cd bar
${LAKE:-../../../build/bin/lake} build-bin
cd ..

View file

@ -3,3 +3,4 @@ set -e
./clean.sh
./package.sh
./foo/build/bin/foo
./bar/build/bin/bar