Skip to content

Commit 94f5848

Browse files
authored
Merge pull request #222 from ccmywish/skip-tests
Add `-T` flag and `RSTAR_NO_TEST` env var to skip module tests
2 parents cf927c8 + 9d95f34 commit 94f5848

2 files changed

Lines changed: 43 additions & 7 deletions

File tree

README.md

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ A *user-friendly* distribution of the [Raku programming language](https://raku.o
2020
## Docker Image
2121

2222
* Please refer to [Rakudo-Star on Docker Hub](https://hub.docker.com/_/rakudo-star) for an image.
23-
* Find the related Docker files on the ["Raku Docker" GitHub repository](https://github.com/Raku/docker)
23+
* Find the related Docker files on the ["Raku Docker" GitHub repository](https://github.com/Raku/docker)
2424

2525
## What's in this GIT repo
2626

@@ -32,6 +32,41 @@ Both tools compile Rakudo and then add some selected modules!
3232

3333
### 1. _RSTAR_ tool
3434

35+
#### Usage
36+
37+
```
38+
rstar install [options] [core] [modules]
39+
```
40+
41+
**Options:**
42+
43+
| Option | Description |
44+
|--------|-------------|
45+
| `-b <backend>` | Set the compiler backend (default: `moar`) |
46+
| `-p <prefix>` | Set the installation prefix |
47+
| `-T` | Skip module tests (`--/test`) during installation |
48+
49+
**Skipping module tests:**
50+
51+
By default, `zef` runs all tests when installing bundled modules. Pass `-T` to
52+
disable this, which can significantly speed up installation:
53+
54+
```sh
55+
rstar install -T modules
56+
```
57+
58+
You can also set the environment variable `RSTAR_NO_TEST` to any non-empty
59+
value to achieve the same effect without modifying the command:
60+
61+
```sh
62+
RSTAR_NO_TEST=1 rstar install modules
63+
```
64+
65+
> Note: When a module fails and is retried with `--force-test`, tests are
66+
> always run regardless of this option.
67+
68+
---
69+
3570
* `bash` based tool, should work on any **Linux OS** (_should also build Rakudo-Star on macOS_!?).
3671
- The `rstar` (bash) tool downloads all requirements, like MoarVM, NQP, Rakudo and some Rakudo modules.
3772
- It then compiles everything into a local Rakudo installation and add's the modules via `zef`.
@@ -47,7 +82,7 @@ Furthermore, all code should be linted against [`shellcheck`](https://www.shellc
4782

4883
* A [Powershell script](https://github.com/rakudo/star/blob/master/tools/build/binary-release/Windows/build-with-choco.ps1), which internally uses `chocolatey` to create a **Windows MSI** package.
4984
- The created MSI package can be used to install Rakudo-Star (Rakudo with some additional modules) on any Windows device.
50-
* *More information to be added* in the [wiki](https://github.com/rakudo/star/wiki)
85+
* *More information to be added* in the [wiki](https://github.com/rakudo/star/wiki)
5186

5287
### 3. Community Modules
5388

@@ -65,7 +100,7 @@ the module, the second the protocol to use, with the third column being the
65100
URL to fetch it from. Columns following the third have different meaning
66101
depending on the protocol.
67102

68-
*Currently all modules are expected to be available via `git` (GitHub) and having `git tags`, similar to the `version` given in the modules `META6.json`*
103+
*Currently all modules are expected to be available via `git` (GitHub) and having `git tags`, similar to the `version` given in the modules `META6.json`*
69104

70105
## Bugs, Feedback and Patches
71106

lib/actions/install.bash

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,12 @@ action() {
1919
local init
2020
local prefix_absolute
2121

22-
while getopts ":b:p:" opt
22+
while getopts ":b:p:T" opt
2323
do
2424
case "$opt" in
2525
b) RSTAR_BACKEND=$OPTARG ;;
2626
p) RSTAR_PREFIX=$OPTARG ;;
27+
T) RSTAR_NO_TEST=1 ;;
2728
*) emerg "Invalid option specified: $opt" ;;
2829
esac
2930
done
@@ -246,17 +247,17 @@ build_prepare() {
246247
install_raku_module() {
247248
if [[ -f "$1/Build.pm6" ]]
248249
then
249-
"$RSTAR_PREFIX/bin/raku" "$RSTAR_PREFIX/share/perl6/site/bin/zef.raku" build --debug "$1"
250+
"$RSTAR_PREFIX/bin/raku" "$RSTAR_PREFIX/share/perl6/site/bin/zef.raku" build --debug ${RSTAR_NO_TEST:+--/test} "$1"
250251
fi
251252

252253
if [[ "$1" =~ /zef ]]
253254
then
254255
pushd "$1" > /dev/null
255256
PATH="$RSTAR_PREFIX/bin/:$PATH"
256-
"$RSTAR_PREFIX/bin/raku" -I. bin/zef --debug install .
257+
"$RSTAR_PREFIX/bin/raku" -I. bin/zef --debug install . ${RSTAR_NO_TEST:+--/test}
257258
popd > /dev/null
258259
else
259-
"$RSTAR_PREFIX/bin/raku" "$RSTAR_PREFIX/share/perl6/site/bin/zef.raku" install --debug "$1"
260+
"$RSTAR_PREFIX/bin/raku" "$RSTAR_PREFIX/share/perl6/site/bin/zef.raku" install --debug ${RSTAR_NO_TEST:+--/test} "$1"
260261
if [[ $? == 130 ]]
261262
then
262263
notice "zef: re-installing module \"$1\" with \"--force-test\" option"

0 commit comments

Comments
 (0)