janet-lang / jpm

Janet Project Manager
MIT License
68 stars 22 forks source link

Not locating how to run the tests #36

Closed sogaiu closed 1 year ago

sogaiu commented 2 years ago

Is there documentation on how to run the tests?

I haven't succeeded in finding any so far.

The invocation jpm test, yields the following output here:

$ jpm test
running test/installtest.janet ...
invalid configuration binding :cppflags, expected :string-array, got nil
  in errorf [boot.janet] on line 165, column 3
  in load-config [../jpm/config.janet] on line 146, column 7
  in setup [../jpm/cli.janet] on line 61, column 7
  in _thunk [runtest.janet] (tailcall) on line 11, column 1
command failed with non-zero exit code 1
  in os/execute [src/core/os.c] on line 1031
  in <anonymous> [test/installtest.janet] on line 9, column 3
  in _thunk [test/installtest.janet] (tailcall) on line 8, column 1
non-zero exit code in test/installtest.janet: 1
Failing test scripts: 1

I found that setting JANET_JPM_CONFIG:

$ export JANET_JPM_CONFIG=$HOME/.local/lib/janet/jpm/default-config.janet

before running jpm test seemed to lead to useful looking results.

Is that an appropriate way to get the tests to run?


My jpm installation is from 6b2173e3606dc649f8ac63cf950d2a1b49fe573d and my janet installation is from 9cc4e481.

I typically install janet like:

$ make clean && PREFIX=$HOME/.local make && PREFIX=$HOME/.local make install

and jpm like:

$ PREFIX=$HOME/.local janet bootstrap.janet
sogaiu commented 1 year ago

The following invocation now works for my setup:

PREFIX=$HOME/.local jpm test