-
-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix scripts for testing to use a given build directory
- Loading branch information
Showing
4 changed files
with
68 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Developer's Notes for LuaJIT Language Toolkit | ||
|
||
## Build Instructions | ||
|
||
The standard method to build the luajit language toolkit is to use the Meson build system. | ||
|
||
Here an example of using meson: | ||
|
||
```sh | ||
meson setup build # configure the build | ||
ninja -C build # build | ||
``` | ||
|
||
Of course Meson and Ninja are required. In alternative Meson can use GNU Make as a backend but using Ninja is recommended. | ||
|
||
In addition to Meson a working luajit installed in your path is also needed. | ||
|
||
At your convenience you may install LuaJIT using the [Little Library Helper](https://github.com/franko/lhelper). | ||
Its usage is to create an build environment and to install luajit: | ||
|
||
```bash | ||
lhelper create luajit-env # create a new environment | ||
lhelper activate luajit-env # activate the environment | ||
lhelper install luajit # install luajit executable and library | ||
``` | ||
|
||
The environment will remains and can be later reused using again the 'lhelper activate' command. | ||
|
||
On Linux or other unix-like environment Lhelper can be used or you may install luajit using the standard package manager. | ||
|
||
## Running the tests | ||
|
||
The language toolkit has a large corpus of tests. They can be ran in different modes but it always involves running the standard luajit executable and compare the output with the language toolkit. | ||
|
||
The output can be compared in the following ways: | ||
|
||
1. compare directly the output of the Lua test program | ||
2. compare the listing of the bytecode instructions | ||
3. compare the hexadecimal dump of the bytecode, byte-per-byte | ||
|
||
To run the tests the following commands should be used respectively, depending on the mode: | ||
|
||
1. `python2 scripts/test-output.by <build-directory>` | ||
2. `python2 scripts/test-bytecode.by <build-directory>` | ||
3. `python2 scripts/test-bytecode-hex.by <build-directory>` | ||
|
||
For each command the directory tests/log will be populated with some logs to compare the differences in the output and the listing of the generated bytecode. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters