Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > it.comp.www.php > #22175 > unrolled thread
| Started by | Flavix <imeil@a.a> |
|---|---|
| First post | 2018-08-09 10:42 +0200 |
| Last post | 2018-08-10 10:20 +0100 |
| Articles | 4 — 2 participants |
Back to article view | Back to it.comp.www.php
entrypoint per eseguire tutti i test di un progetto Flavix <imeil@a.a> - 2018-08-09 10:42 +0200
Re: entrypoint per eseguire tutti i test di un progetto Alessandro Pellizzari <shuriken@amiran.it> - 2018-08-09 11:19 +0100
Re: entrypoint per eseguire tutti i test di un progetto Flavix <imeil@a.a> - 2018-08-09 13:19 +0200
Re: entrypoint per eseguire tutti i test di un progetto Alessandro Pellizzari <shuriken@amiran.it> - 2018-08-10 10:20 +0100
| From | Flavix <imeil@a.a> |
|---|---|
| Date | 2018-08-09 10:42 +0200 |
| Subject | entrypoint per eseguire tutti i test di un progetto |
| Message-ID | <pkgupd$kp4$1@gioia.aioe.org> |
#!/usr/bin/env bash set -ue # cd "$(dirname "$0")" phpunit tests # test unitari ./test-functional.sh # test funzionali # eventuali altri test particolari Questo script come posso chiamarlo (all-tests, test-entrypoint, run-tests, ecc.)? Dove lo metto? Nella directory principale del progetto, o in una sotto-directory (bin/, tests/bin/, ecc.)? Insomma esiste uno standard per nominare il punto centrale da cui far partire *tutti* i test, in modo che chiunque utente posso identificarlo facilmente?
[toc] | [next] | [standalone]
| From | Alessandro Pellizzari <shuriken@amiran.it> |
|---|---|
| Date | 2018-08-09 11:19 +0100 |
| Message-ID | <ft2iq1F3350U1@mid.individual.net> |
| In reply to | #22175 |
On 09/08/2018 09:42, Flavix wrote: > #!/usr/bin/env bash > set -ue > # cd "$(dirname "$0")" > > phpunit tests # test unitari > ./test-functional.sh # test funzionali > # eventuali altri test particolari > > Questo script come posso chiamarlo (all-tests, test-entrypoint, > run-tests, ecc.)? Se usi composer non ti serve uno script. Puoi definire un comando e poi chiamare composer run test Bye.
[toc] | [prev] | [next] | [standalone]
| From | Flavix <imeil@a.a> |
|---|---|
| Date | 2018-08-09 13:19 +0200 |
| Message-ID | <pkh804$16d5$1@gioia.aioe.org> |
| In reply to | #22176 |
Il 09/08/2018 12:19, Alessandro Pellizzari ha scritto:
>
> Se usi composer non ti serve uno script. Puoi definire un comando e poi
> chiamare
>
> composer run test
Ecco il comando che vorrei eseguire
$ docker run -it --rm --volumes-from test_wordpress_1 --network
container:test_wordpress_1 wordpress:cli plugin activate myplugin
Success: Plugin activated.
Ed ecco i soliti capricci:
$ cat composer.json
{
"scripts": {
"test": "docker run -it --rm --volumes-from test_wordpress_1
--network container:test_wordpress_1 wordpress:cli plugin activate myplugin"
}
}
$ composer run-script test
> docker run ... the input device is not a TTY
Script docker run ... handling the test event returned with an error
[RuntimeException]
Error Output: the input device is not a TTY
run-script [--timeout TIMEOUT] [--dev] [--no-dev] [-l|--list] [--]
[<script>] [<args>]...
Sembra tutto bello, tutto facile, tutto scontato, sembra...
[toc] | [prev] | [next] | [standalone]
| From | Alessandro Pellizzari <shuriken@amiran.it> |
|---|---|
| Date | 2018-08-10 10:20 +0100 |
| Message-ID | <ft53mqFkleuU1@mid.individual.net> |
| In reply to | #22178 |
On 09/08/2018 12:19, Flavix wrote: > Il 09/08/2018 12:19, Alessandro Pellizzari ha scritto: >> >> Se usi composer non ti serve uno script. Puoi definire un comando e >> poi chiamare >> >> composer run test > > Ecco il comando che vorrei eseguire Hai cambiato le specifiche del problema! :P > $ docker run -it --rm --volumes-from test_wordpress_1 --network > ... > > docker run ... the input device is not a TTY L'opzione -it di Docker attiva una sessione interattiva (tastiera e schermo). Lanciandolo come script non puoi prendere il controllo della tastiera, da cui l'errore: The input device (la tastiera) is not a TTY (non รจ interattiva) Bye.
[toc] | [prev] | [standalone]
Back to top | Article view | it.comp.www.php
csiph-web