summaryrefslogtreecommitdiff
path: root/Meta
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2021-03-12 19:03:49 +0100
committerAndreas Kling <kling@serenityos.org>2021-03-12 21:27:09 +0100
commit04fc4a813446c71fefcc765a93f13d9a4036fbf1 (patch)
treea6bece50031fe7b8fb2c7e57e872632b64758dde /Meta
parent1c85ce032494811d14cce6dca26eb3746f5ed465 (diff)
downloadserenity-04fc4a813446c71fefcc765a93f13d9a4036fbf1.zip
Meta: Make 'serenity.sh run lagom' run Lagom executables
Running the tests will be moved to a separate test command which can then leverage the availability of different targets and run either unit tests on the host or the image in QEMU in self-test mode. :^)
Diffstat (limited to 'Meta')
-rwxr-xr-xMeta/serenity.sh20
1 files changed, 11 insertions, 9 deletions
diff --git a/Meta/serenity.sh b/Meta/serenity.sh
index 778fb9292b..818ab467af 100755
--- a/Meta/serenity.sh
+++ b/Meta/serenity.sh
@@ -10,16 +10,17 @@ Usage: $ARG0 COMMAND [TARGET] [ARGS...]
build: Compiles the target binaries, [ARGS...] are passed through to ninja
install: Installs the target binary
image: Creates a disk image with the installed binaries
- run: TARGET lagom [specific_test]: Runs the unit tests on the build host,
- or if specific_test is specified only this test.
- All other TARGETs: $ARG0 run [TARGET] [kernel_cmd_line]
+ run: TARGET lagom: $ARG0 run lagom LAGOM_EXECUTABLE
+ Runs the Lagom-built LAGOM_EXECUTABLE on the build host,
+ e.g. 'shell' or 'js'
+ All other TARGETs: $ARG0 run [TARGET] [KERNEL_CMD_LINE]
Runs the built image in QEMU, and optionally passes the
- kernel_cmd_line to the Kernel
+ KERNEL_CMD_LINE to the Kernel
gdb: Same as run, but also starts a gdb remote session.
$ARG0 gdb [TARGET] [kernel_cmd_line] [-ex 'any gdb command']...
If specified, passes the kernel_cmd_line to the Kernel
Passes through '-ex' commands to gdb
- delete: Removes the build environment for the TARGET
+ delete: Removes the build environment for TARGET
recreate: Deletes and re-creates the build environment for TARGET
rebuild: Deletes and re-creates the build environment, and compiles for TARGET
kaddr2line: $ARG0 kaddr2line TARGET ADDRESS
@@ -35,8 +36,8 @@ Usage: $ARG0 COMMAND [TARGET] [ARGS...]
Runs the image in QEMU passing "smp=on" to the kernel command line
$ARG0 run
Runs the image for the default TARGET i686 in QEMU
- $ARG0 run lagom
- Runs the unit tests on the build host
+ $ARG0 run lagom js
+ Runs the Lagom-built js(1) REPL
$ARG0 kaddr2line i686 0x12345678
Resolves the address 0x12345678 in the Kernel binary
$ARG0 addr2line i686 WindowServer 0x12345678
@@ -201,10 +202,11 @@ if [[ "$CMD" =~ ^(build|install|image|run|gdb|rebuild|recreate|kaddr2line|addr2l
build_target image
;;
run)
- build_target
if [ "$TARGET" = "lagom" ]; then
- run_tests "${CMD_ARGS[0]}"
+ build_target "$@"
+ "$BUILD_DIR/Meta/Lagom/${CMD_ARGS[0]}"
else
+ build_target
build_target install
build_target image
if [ -n "${CMD_ARGS[0]}" ]; then