test: extend examples/deps to include a deep dependency
This commit is contained in:
parent
f187761c2e
commit
83ccf8a15d
10 changed files with 36 additions and 7 deletions
|
|
@ -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
1
examples/deps/bar/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
/build
|
||||
4
examples/deps/bar/Main.lean
Normal file
4
examples/deps/bar/Main.lean
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
import Foo
|
||||
|
||||
def main : IO Unit :=
|
||||
IO.println s!"Hello, bar {foo} {a} {b}!"
|
||||
9
examples/deps/bar/lakefile.lean
Normal file
9
examples/deps/bar/lakefile.lean
Normal 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
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
rm -rf a/build
|
||||
rm -rf b/build
|
||||
rm -rf foo/build
|
||||
rm -rf bar/build
|
||||
|
|
|
|||
|
|
@ -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}!"
|
||||
|
|
|
|||
4
examples/deps/foo/Main.lean
Normal file
4
examples/deps/foo/Main.lean
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
import Foo
|
||||
|
||||
def main : IO Unit :=
|
||||
IO.println s!"Hello, {foo} {a} {b}!"
|
||||
|
|
@ -7,3 +7,4 @@ package where
|
|||
{ name := "a", src := Source.path (FilePath.mk ".." / "a") },
|
||||
{ name := "b", src := Source.path (FilePath.mk ".." / "b") }
|
||||
]
|
||||
binRoot := `Main
|
||||
|
|
|
|||
|
|
@ -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 ..
|
||||
|
|
|
|||
|
|
@ -3,3 +3,4 @@ set -e
|
|||
./clean.sh
|
||||
./package.sh
|
||||
./foo/build/bin/foo
|
||||
./bar/build/bin/bar
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue