mirror of
https://github.com/janet-lang/janet
synced 2024-11-24 17:27:18 +00:00
Add --test flag to jpm.
Also test some select packages when testing installation. This is used in CI to make sure that versions of Janet work with the most libraries.
This commit is contained in:
parent
1f55d40a10
commit
8911daaf6c
5
Makefile
5
Makefile
@ -353,7 +353,10 @@ test-install:
|
||||
&& build/testexec \
|
||||
&& jpm --verbose quickbin testexec.janet build/testexec2 \
|
||||
&& build/testexec2 \
|
||||
&& jpm --verbose --modpath=. install https://github.com/janet-lang/json.git
|
||||
&& jpm --verbose --testdeps --modpath=. install https://github.com/janet-lang/json.git
|
||||
cd test/install && jpm --verbose --test --modpath=. install https://github.com/janet-lang/jhydro.git
|
||||
cd test/install && jpm --verbose --test --modpath=. install https://github.com/janet-lang/path.git
|
||||
cd test/install && jpm --verbose --test --modpath=. install https://github.com/janet-lang/argparse.git
|
||||
|
||||
build/embed_janet.o: build/janet.c $(JANET_HEADERS)
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
@ -775,6 +775,8 @@ int main(int argc, const char **argv) {
|
||||
(os/mkdir manifests)
|
||||
(spit manifest (string (string/join installed-files "\n") "\n")))
|
||||
(phony "install" ["uninstall" "build" "manifest"]
|
||||
(when (dyn :test)
|
||||
(do-rule "test"))
|
||||
(print "Installed as '" (meta :name) "'."))
|
||||
|
||||
(phony "install-deps" []
|
||||
@ -857,6 +859,7 @@ Keys are:
|
||||
|
||||
Flags are:
|
||||
--verbose : Print shell commands as they are executed.
|
||||
--test : If passed to jpm install, runs tests before installing. Will run tests recursively on dependencies.
|
||||
`))
|
||||
|
||||
(defn- show-help
|
||||
|
@ -183,6 +183,12 @@ call jpm --verbose quickbin testexec.janet build\testexec2.exe
|
||||
@if errorlevel 1 goto :TESTFAIL
|
||||
call build\testexec2.exe
|
||||
@if errorlevel 1 goto :TESTFAIL
|
||||
call jpm --verbose --test --modpath=. install https://github.com/janet-lang/jhydro.git
|
||||
@if errorlevel 1 goto :TESTFAIL
|
||||
call jpm --verbose --test --modpath=. install https://github.com/janet-lang/path.git
|
||||
@if errorlevel 1 goto :TESTFAIL
|
||||
call jpm --verbose --test --modpath=. install https://github.com/janet-lang/argparse.git
|
||||
@if errorlevel 1 goto :TESTFAIL
|
||||
popd
|
||||
exit /b 0
|
||||
|
||||
|
4
jpm.1
4
jpm.1
@ -28,6 +28,10 @@ More interesting are the local commands. For more information on jpm usage, see
|
||||
.BR \-\-verbose
|
||||
Print detailed messages of what jpm is doing, including compilation commands and other shell commands.
|
||||
|
||||
.TP
|
||||
.BR \-\-test
|
||||
If passed to jpm install, runs tests before installing. Will run tests recursively on dependencies.
|
||||
|
||||
.SH OPTIONS
|
||||
|
||||
.TP
|
||||
|
7
test/install/.gitignore
vendored
7
test/install/.gitignore
vendored
@ -1,4 +1,9 @@
|
||||
/build
|
||||
.cache
|
||||
.manifest
|
||||
.manifests
|
||||
json.*
|
||||
jhydro.*
|
||||
circlet.*
|
||||
argparse.*
|
||||
sqlite3.*
|
||||
path.*
|
||||
|
Loading…
Reference in New Issue
Block a user