Contributing: Use meson to run tests

This commit is contained in:
Romain Vigier
2022-04-05 11:25:08 +02:00
parent 1bf9baccc8
commit 305c157407
2 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -42,17 +42,17 @@ We follow the [GNOME Shell coding style](https://gitlab.gnome.org/GNOME/gnome-sh
To make sure your code follows it: To make sure your code follows it:
```bash ```bash
npm run test-lint meson test -C builddir --suite=code
``` ```
### Copyright notice ### Copyright notice
If you make changes to a file, please put your copyright notice to the top of the file, or in a separate file (named `original-file.ext.license`), following the [SPDX specification](https://spdx.dev/). If you make changes to a file, please put your copyright notice to the top of the file, or in a separate file (named `original-file.ext.license`), following the [SPDX specification](https://spdx.dev/).
Run [`reuse`](https://reuse.software/) to check that all the needed information is present: We use [`reuse`](https://reuse.software/) to check that all the needed information is present:
```bash ```bash
reuse lint meson test -C builddir --suite=licensing
``` ```
### Creating new files ### Creating new files
+3 -3
View File
@@ -4,14 +4,14 @@
reuse_exe = find_program('reuse', required: false) reuse_exe = find_program('reuse', required: false)
if reuse_exe.found() if reuse_exe.found()
test( test(
'Comply with REUSE spec', 'reuse',
reuse_exe, reuse_exe,
args: [ args: [
'--root', '--root',
meson.project_source_root(), meson.project_source_root(),
'lint' 'lint'
], ],
suite: 'licenses', suite: 'licensing',
) )
endif endif
@@ -22,7 +22,7 @@ eslint_exe = find_program(
) )
if eslint_exe.found() if eslint_exe.found()
test( test(
'Check JavaScript format', 'eslint',
eslint_exe, eslint_exe,
args: [ meson.project_source_root() / 'src' ], args: [ meson.project_source_root() / 'src' ],
suite: 'code', suite: 'code',